Turn off '--show-reachable=yes' valgrind option

--- src/CTestConfig.cmake
+++ src/CTestConfig.cmake
@@ -9,10 +9,11 @@
 set(CTEST_PROJECT_NAME "Lean")
 set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")

-# Specify MEMCHECK Option.
+# Specify MEMCHECK Option: http://valgrind.org/docs/manual/mc-manual.html
 # Note: We use "--trace-children=yes" to valgrind-ise child processes (follow execve)
-SET (VALGRIND_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=yes --show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=50 --trace-children=yes")
-SET (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=yes --show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=50 --trace-children=yes")
+# Note: We turn off "--show-reachable=yes" option.
+SET (VALGRIND_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=yes --workaround-gcc296-bugs=yes --num-callers=50 --trace-children=yes")
+SET (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=yes --workaround-gcc296-bugs=yes --num-callers=50 --trace-children=yes")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "cmacslab2.modck.cs.cmu.edu")


COMP: Make module header tests depend on module libraries

Some header files may be generated at build time while building their
libraries.  Do not compile header test sources until after the libraries
are available to ensure that such generated headers will exist.

Change-Id: If6975d956835555dcd799ae273ca614f31414db7

--- CMake/ITKModuleHeaderTest.cmake
+++ CMake/ITKModuleHeaderTest.cmake
@@ -80,6 +80,7 @@
         )
       add_executable( ${_test_name} ${_header_test_src} )
       target_link_libraries( ${_test_name} ITKCommon )
+      add_dependencies(${_test_name} ${${_name}_LIBRARIES})
       add_dependencies(${_name}-all ${_test_name})
       math( EXPR _test_num "${_test_num} + 1" )
     endforeach()


Tiny bits of cleanup in OIS lib installation for Apple platforms.

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -115,18 +115,10 @@
 		install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
 	  endif ()
 	elseif(APPLE)
-	  if (EXISTS ${OGRE_DEP_DIR}/lib/debug/libOIS.a)
-	        install(FILES
-	          ${OGRE_DEP_DIR}/lib/debug/libOIS.a
-	          DESTINATION lib/debug CONFIGURATIONS Debug
-	        )
-	  endif ()
-	  if (EXISTS ${OGRE_DEP_DIR}/lib/release/libOIS.a)
-	        install(FILES
-	          ${OGRE_DEP_DIR}/lib/release/libOIS.a
-	          DESTINATION lib/release CONFIGURATIONS Release RelWithDebInfo MinSizeRel None ""
-	        )
-	  endif ()
+        install(FILES
+          ${OGRE_DEP_DIR}/lib/$(PLATFORM_NAME)/$(CONFIGURATION)/libOIS.a
+          DESTINATION lib/$(PLATFORM_NAME)/$(CONFIGURATION)
+        )
 	endif ()
 	  endif ()

@@ -291,7 +283,7 @@
       copy_release(libGLESv2.dll)
     endif ()

-  elseif(APPLE)
+  elseif(APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
     # copy the required libs and frameworks to the build directory (configure_file is the only copy-like op I found in CMake)
     copy_debug(libOIS.a)
     copy_release(libOIS.a)


Issue #43: Do not force static builds when doing python, let user decide at top level, which they can do in their own clone of their project.

--- CMake/mpAddPythonBindings.cmake
+++ CMake/mpAddPythonBindings.cmake
@@ -32,13 +32,6 @@
     message("Forcing BUILD_Python_Boost and BUILD_Python_PyBind to OFF as no Python libs were found.")
   endif()

-  if (PythonLibs_FOUND)
-    if(BUILD_Python_Boost OR BUILD_Python_PyBind)
-      set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE)
-      message("Forcing BUILD_SHARED_LIBS to OFF as you want a python module.")
-    endif()
-  endif()
-
   if(BUILD_Python_Boost)
     list(APPEND MYPROJECT_BOOST_LIBS "system")
     if (${PYTHON_VERSION_MAJOR} EQUAL 3 AND WITHIN_SUBBUILD)
@@ -48,5 +41,4 @@
     endif()
     list(REMOVE_DUPLICATES MYPROJECT_BOOST_LIBS)
   endif()
-
 endif()


ManageTranslation: Remove the Dependency check for script mode

--- Modules/ManageTranslation.cmake
+++ Modules/ManageTranslation.cmake
@@ -129,13 +129,8 @@
 INCLUDE(ManageArchive)
 INCLUDE(ManageMessage)
 INCLUDE(ManageFile)
-INCLUDE(ManageDependency)
 INCLUDE(ManageString)
 INCLUDE(ManageVariable)
-
-FUNCTION(MANAGE_TRANSLATION_LOCALES_SET value)
-    SET(MANAGE_TRANSLATION_LOCALES "${value}" CACHE INTERNAL "Translation Locales")
-ENDFUNCTION()

 #######################################
 # GETTEXT support
@@ -169,6 +164,10 @@
     CACHE STRING "xgettext options"
     )

+FUNCTION(MANAGE_TRANSLATION_LOCALES_SET value)
+    SET(MANAGE_TRANSLATION_LOCALES "${value}" CACHE INTERNAL "Translation Locales")
+ENDFUNCTION()
+
 FUNCTION(MANAGE_TRANSLATION_GETTEXT_POT_FILES_SET value)
     SET(MANAGE_TRANSLATION_GETTEXT_POT_FILES "${value}" CACHE INTERNAL "POT files")
 ENDFUNCTION()
@@ -204,6 +203,7 @@
     IF(DEFINED MANAGE_GETTEXT_SUPPORT)
 	RETURN()
     ENDIF()
+    INCLUDE(ManageDependency)
     MANAGE_DEPENDENCY(BUILD_REQUIRES GETTEXT REQUIRED)
     MANAGE_DEPENDENCY(BUILD_REQUIRES FINDUTILS REQUIRED)
     MANAGE_DEPENDENCY(REQUIRES GETTEXT REQUIRED)


[exotica_core] CMake Export: Treat warnings as errors, float conversion

--- exotica_core/cmake/exotica.cmake
+++ exotica_core/cmake/exotica.cmake
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.8.3)

 message(STATUS "Compiling using c++ 11 (required by EXOTica)")
-add_compile_options(-std=c++11)
+add_compile_options(-std=c++11 -Werror -Wfloat-conversion)

 # MoveIt Core Robot Model isnt aligned :'(
 #add_definitions(-DEIGEN_MAX_ALIGN_BYTES=0 -DEIGEN_DONT_VECTORIZE)


OSX: remove the -msse3 option

OSX: remove the -msse3 option

--- cmake-toolchains/osx.cmake
+++ cmake-toolchains/osx.cmake
@@ -23,11 +23,11 @@

 # compiler flags
 set(CMAKE_CXX_FLAGS "-std=c++11 -fstrict-aliasing -Wno-expansion-to-defined -Wno-multichar -Wall -Wextra -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-unused-volatile-lvalue -Wno-deprecated-writable-strings")
-set(CMAKE_CXX_FLAGS_RELEASE "-O3 -msse3 -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
 set(CMAKE_CXX_FLAGS_DEBUG "-O0 -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1 -ggdb")

 set(CMAKE_C_FLAGS "-fstrict-aliasing -Wno-multichar -Wall -Wextra -Wno-expansion-to-defined -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-unused-volatile-lvalue  -Wno-deprecated-writable-strings")
-set(CMAKE_C_FLAGS_RELEASE "-O3 -msse3 -DNDEBUG")
+set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
 set(CMAKE_C_FLAGS_DEBUG "-O0 -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1 -g")

 set(CMAKE_EXE_LINKER_FLAGS "-ObjC -dead_strip -lpthread")


Fix the .deb package prefix.

Fix the .deb package prefix.

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -26,7 +26,7 @@
 #    Build as per default RPM layout, with prefix=/usr
 #
 #  DEB
-#    Build as per STANDALONE, prefix=/opt/mysql-$major.$minor
+#    Build as per STANDALONE, prefix=/opt/mysql/server-$major.$minor
 #
 #  SVR4
 #    Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql
@@ -74,7 +74,7 @@
   IF(INSTALL_LAYOUT MATCHES "RPM")
     SET(default_prefix "/usr")
   ELSEIF(INSTALL_LAYOUT MATCHES "DEB")
-    SET(default_prefix "/opt/${MYSQL_BASE_VERSION}")
+    SET(default_prefix "/opt/mysql/server-${MYSQL_BASE_VERSION}")
     # This is required to avoid "cpack -GDEB" default of prefix=/usr
     SET(CPACK_SET_DESTDIR ON)
   ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")


pw_protobuf_compiler/cmake: Use pw_parse_arguments_strict

Migrates the CMake support in pw_protobuf_compiler to use pw_build's
pw_parse_arguments_strict instead of the underlying
cmake_parse_arguments.

Change-Id: I79244be3de66e1e472970d2dd8e8b480790c3c14
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/117830
Reviewed-by: Wyatt Hepler <cca3bedb37979eacd157a9bceb473582df8aea1e@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <638f134dbc68778d6b859fb04a64baea2b00b021@google.com>
Commit-Queue: Ewout van Bekkum <638f134dbc68778d6b859fb04a64baea2b00b021@google.com>

--- pw_protobuf_compiler/proto.cmake
+++ pw_protobuf_compiler/proto.cmake
@@ -12,6 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 include_guard(GLOBAL)
+
+include($ENV{PW_ROOT}/pw_build/pigweed.cmake)

 # Declares a protocol buffers library. This function creates a library for each
 # supported protocol buffer implementation:
@@ -36,8 +38,13 @@
 #       .options files)
 #
 function(pw_proto_library NAME)
-  cmake_parse_arguments(PARSE_ARGV 1 arg "" "STRIP_PREFIX;PREFIX"
-      "SOURCES;INPUTS;DEPS")
+  set(num_positional_args 1)
+  set(option_args)
+  set(one_value_args STRIP_PREFIX PREFIX)
+  set(multi_value_args SOURCES INPUTS DEPS)
+  pw_parse_arguments_strict(
+      pw_proto_library "${num_positional_args}" "${option_args}"
+      "${one_value_args}" "${multi_value_args}")

   if("${arg_SOURCES}" STREQUAL "")
     message(FATAL_ERROR


Use single shared clang-cpp library starting with LLVM 9 (#1171)

Since 9.0 LLVM defaults to building a single clang-cpp library for
non-developer builds.

As this is just the default, and some distributions enable it only with
LLVM 10 (e.g. Fedora), make the clang-cpp search dependent on the build
mode.

--- src/cmake/modules/FindLLVM.cmake
+++ src/cmake/modules/FindLLVM.cmake
@@ -79,6 +79,18 @@
     set (LLVM_LIBRARY "${LLVM_LIBRARIES}")
 endif ()

+execute_process (COMMAND ${LLVM_CONFIG} --shared-mode
+       OUTPUT_VARIABLE LLVM_SHARED_MODE
+       OUTPUT_STRIP_TRAILING_WHITESPACE)
+if (LLVM_VERSION VERSION_GREATER_EQUAL 9.0 AND (LLVM_SHARED_MODE STREQUAL "shared"))
+    find_library ( _CLANG_CPP_LIBRARY
+		  NAMES "clang-cpp"
+		  PATHS ${LLVM_LIB_DIR})
+    if (_CLANG_CPP_LIBRARY)
+        list (APPEND CLANG_LIBRARIES ${_CLANG_CPP_LIBRARY})
+    endif ()
+endif ()
+
 foreach (COMPONENT clangFrontend clangDriver clangSerialization
                    clangParse clangSema clangAnalysis clangAST clangBasic
                    clangEdit clangLex)


fbcode_builder: update FBPythonBinary.cmake to work on Windows

Summary:
On Windows we have to explicitly invoke `make_fbpy_archive.py` with python.
Therefore use CMake's built-in `FindPythonInterp` module to find the python
executable and use that when invoking `make_fbpy_archive.py`

This is slightly complicated by the effort required to find python with older
versions of CMake.  We ideally still want to support versions of CMake back to
at least 3.8, which means we need to still support finding Python with the
older `FindPythonInterp.cmake` module

Reviewed By: wez

Differential Revision: D17128606

fbshipit-source-id: 3f4beff76848b8a362ebdf21198e7a8bf1b0537f

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -23,18 +23,45 @@
 # library paths.
 #

+# If the caller has not already found Python, do so now.
+# If we fail to find python now we won't fail immediately, but
+# add_fb_python_executable() or add_fb_python_library() will fatal out if they
+# are used.
+if(NOT Python3_EXECUTABLE)
+  # CMake 3.12+ ships with a FindPython3.cmake module.  Try using it first.
+  # We find with QUIET here, since otherwise this generates some noisy warnings
+  # on versions of CMake before 3.12
+  find_package(Python3 COMPONENTS Interpreter QUIET)
+  if(Python3_Interpreter_FOUND)
+    message(STATUS "Found Python 3: ${Python3_EXECUTABLE}")
+  else()
+    # Try with the FindPythonInterp.cmake module available in older CMake
+    # versions.  Check to see if the caller has already searched for this
+    # themselves first.
+    if(NOT PYTHONINTERP_FOUND)
+      set(Python_ADDITIONAL_VERSIONS 3 3.6 3.5 3.4 3.3 3.2 3.1)
+      find_package(PythonInterp)
+    endif()
+    if(PYTHONINTERP_FOUND)
+      if("${PYTHON_VERSION_MAJOR}" GREATER_EQUAL 3)
+        set(Python3_EXECUTABLE "${PYTHON_EXECUTABLE}")
+      else()
+        string(
+          CONCAT FBPY_FIND_PYTHON_ERR
+          "found Python ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}, "
+          "but need Python 3"
+        )
+      endif()
+    endif()
+  endif()
+endif()
+
 # Find our helper program.
 # We typically install this in the same directory as this .cmake file.
 find_program(
-  MAKE_PYTHON_ARCHIVE "make_fbpy_archive.py"
+  FB_MAKE_PYTHON_ARCHIVE "make_fbpy_archive.py"
   PATHS ${CMAKE_MODULE_PATH}
 )
-if (NOT MAKE_PYTHON_ARCHIVE)
-  message(
-    FATAL_ERROR "unable to find make_fbpy_archive.py helper program (it "
-    "should be located in the same directory as FBPythonRules.cmake)"
-  )
-endif()

 # An option to control the default installation location for
 # install_fb_python_library().  This is relative to ${CMAKE_INSTALL_PREFIX}
@@ -52,7 +79,10 @@
 # which module should be started as the __main__ module when the executable is
 # run.  If left unspecified, a __main__.py script must be present in the
 # manifest.
+#
 function(add_fb_python_executable EXE_NAME)
+  fb_py_check_available()
+
   # Parse the arguments
   set(one_value_args BASE_DIR NAMESPACE MAIN_MODULE TYPE)
   set(multi_value_args SOURCES DEPENDS)
@@ -107,19 +137,20 @@
   endif()

   if(DEFINED ARG_MAIN_MODULE)
-    set(main_argument "--main" "${ARG_MAIN_MODULE}")
+    list(APPEND make_py_args "--main" "${ARG_MAIN_MODULE}")
   endif()

   add_custom_command(
     OUTPUT "${output_file}"
     ${extra_cmd_params}
     COMMAND
-      "${MAKE_PYTHON_ARCHIVE}" -o "${EXE_NAME}" ${main_argument}
+      "${Python3_EXECUTABLE}" "${FB_MAKE_PYTHON_ARCHIVE}"
+      -o "${EXE_NAME}"
       ${make_py_args}
     DEPENDS
       ${source_files}
       "${EXE_NAME}.main_lib.py_sources_built"
-      "${MAKE_PYTHON_ARCHIVE}"
+      "${FB_MAKE_PYTHON_ARCHIVE}"
   )

   # Add an "ALL" target that depends on force ${EXE_NAME},
@@ -184,6 +215,8 @@
 #   will then be read at build-time in order to build executables.
 #
 function(add_fb_python_library LIB_NAME)
+  fb_py_check_available()
+
   # Parse the arguments
   # We use fb_cmake_parse_args() rather than cmake_parse_arguments() since
   # cmake_parse_arguments() does not handle empty arguments, and it is common
@@ -332,13 +365,13 @@
       "${build_install_dir}/${LIB_NAME}.manifest"
     COMMAND "${CMAKE_COMMAND}" -E remove_directory "${build_install_dir}"
     COMMAND
-      "${MAKE_PYTHON_ARCHIVE}" --type lib-install
+      "${Python3_EXECUTABLE}" "${FB_MAKE_PYTHON_ARCHIVE}" --type lib-install
       --install-dir "${LIB_NAME}"
       -o "${build_install_dir}/${LIB_NAME}" "${manifest_path}"
     DEPENDS
       "${abs_sources}"
       "${manifest_path}"
-      "${MAKE_PYTHON_ARCHIVE}"
+      "${FB_MAKE_PYTHON_ARCHIVE}"
   )
   add_custom_target(
     "${LIB_NAME}.py_lib_install"
@@ -435,3 +468,22 @@
     get_filename_component("${BASE_DIR_VAR}" "${${BASE_DIR_VAR}}" ABSOLUTE)
   endif()
 endmacro()
+
+function(fb_py_check_available)
+  # Make sure that Python 3 and our make_fbpy_archive.py helper script are
+  # available.
+  if(NOT Python3_EXECUTABLE)
+    if(FBPY_FIND_PYTHON_ERR)
+      message(FATAL_ERROR "Unable to find Python 3: ${FBPY_FIND_PYTHON_ERR}")
+    else()
+      message(FATAL_ERROR "Unable to find Python 3")
+    endif()
+  endif()
+
+  if (NOT FB_MAKE_PYTHON_ARCHIVE)
+    message(
+      FATAL_ERROR "unable to find make_fbpy_archive.py helper program (it "
+      "should be located in the same directory as FBPythonRules.cmake)"
+    )
+  endif()
+endfunction()


boards: mimxrt1020_evk: Enable pyocd runner

Adds support for debugging and flashing the mimxrt1020_evk board via
pyocd.

Signed-off-by: Maureen Helm <87a696db5547fa477bda9f9e0f00013c839c14d3@nxp.com>

--- boards/arm/mimxrt1020_evk/board.cmake
+++ boards/arm/mimxrt1020_evk/board.cmake
@@ -4,5 +4,18 @@
 # SPDX-License-Identifier: Apache-2.0
 #

+set_ifndef(OPENSDA_FW jlink)
+
+if(OPENSDA_FW STREQUAL jlink)
+  set_ifndef(BOARD_DEBUG_RUNNER jlink)
+  set_ifndef(BOARD_FLASH_RUNNER jlink)
+elseif(OPENSDA_FW STREQUAL daplink)
+  set_ifndef(BOARD_DEBUG_RUNNER pyocd)
+  set_ifndef(BOARD_FLASH_RUNNER pyocd)
+endif()
+
+board_runner_args(pyocd "--target=mimxrt1020")
 board_runner_args(jlink "--device=MIMXRT1021xxx5A")
+
+include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
 include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)


Move searching for VC CRT merge files to before we generate the WiX file for the etc directory so we do not get a blank.  Ticket #1783.

--- build/cmake/CondorPackageConfig.cmake
+++ build/cmake/CondorPackageConfig.cmake
@@ -169,19 +169,19 @@

     set (CPACK_WIX_WXS_FILES ${CONDOR_WIX_LOC}/xml/CondorCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorPoolCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorExecCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorDomainCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorEmailCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorJavaCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorPermCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorVMCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorHDFSCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorUpHostDlg.wxs)

+	# At present we only currently support VC90, but we could change
+    find_file( CPACK_VC_MERGE_MODULE
+               Microsoft_VC90_CRT_x86.msm
+               "C:/Program Files/Common Files/Merge Modules";"C:/Program Files (x86)/Common Files/Merge Modules" )
+
+    find_file( CPACK_VC_POLICY_MODULE
+               policy_9_0_Microsoft_VC90_CRT_x86.msm
+               "C:/Program Files/Common Files/Merge Modules";"C:/Program Files (x86)/Common Files/Merge Modules" )
+
 	set (CPACK_WIX_BITMAP_FOLDER Bitmaps)
 	configure_file(${CONDOR_WIX_LOC}/xml/win.xsl.in ${CONDOR_BINARY_DIR}/msconfig/WiX/xml/condor.xsl @ONLY)

 	set (CPACK_WIX_BITMAP_FOLDER ${CONDOR_WIX_LOC}/Bitmaps)
-
-    # At present we only currently support VC90, but we could change
-    find_file( CPACK_VC_MERGE_MODULE
-               Microsoft_VC90_CRT_x86.msm
-               "C:/Program Files/Common Files/Merge Modules";"C:/Program Files (x86)/Common Files/Merge Modules" )
-
-    find_file( CPACK_VC_POLICY_MODULE
-               policy_9_0_Microsoft_VC90_CRT_x86.msm
-               "C:/Program Files/Common Files/Merge Modules";"C:/Program Files (x86)/Common Files/Merge Modules" )

     # the configure file f(n) will replace @CMAKE_XYZ@ with their value
     configure_file(${CONDOR_WIX_LOC}/xml/win.xsl.in ${CONDOR_BINARY_DIR}/msconfig/WiX/xml/win.xsl @ONLY)


Fixed tests builds.

Fixed tests builds.

--- tests/setup_testsubproject.cmake
+++ tests/setup_testsubproject.cmake
@@ -1,10 +1,9 @@
-SET(CMAKE_BUILD_TYPE DebugRelease CACHE STRING "" FORCE)
-   FIND_PACKAGE(deal.II 8.3 REQUIRED HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR})
-   FIND_PACKAGE(deal2lkit 1.0 REQUIRED HINTS ${CMAKE_BINARY_DIR}/../..)
+FIND_PACKAGE(deal.II 8.4 REQUIRED HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR})
+FIND_PACKAGE(deal2lkit 1.0 REQUIRED HINTS ${CMAKE_BINARY_DIR}/../..)
 DEAL_II_INITIALIZE_CACHED_VARIABLES()
 D2K_INITIALIZE_CACHED_VARIABLES()
 PROJECT(testsuite CXX)
-
+SET(CMAKE_BUILD_TYPE ${D2K_BUILD_TYPE} CACHE STRING "" FORCE)

 INCLUDE_DIRECTORIES(${D2K_INCLUDE_DIRS})


allow for detatched heads, for instance when sirikata is a submodule

--- build/modules/GitRevision.cmake
+++ build/modules/GitRevision.cmake
@@ -40,8 +40,12 @@

   set(GIT_REF_FILE ${GIT_DIR}/${_git_ref})
   GET_FILENAME_COMPONENT(GIT_REF_FILE ${GIT_REF_FILE} ABSOLUTE)
-  file(READ ${GIT_REF_FILE} GIT_REF)
-  string(STRIP ${GIT_REF} GIT_REF)
-
-  set(${_git_rev_result} "${GIT_REF}" PARENT_SCOPE)
+  IF(EXISTS ${GIT_REF_FILE})
+    file(READ ${GIT_REF_FILE} GIT_REF)
+    string(STRIP ${GIT_REF} GIT_REF)
+    set(${_git_rev_result} "${GIT_REF}" PARENT_SCOPE)
+  ELSE()
+    MESSAGE(STATUS "Detatched head ${_git_ref}")
+    set(${_git_rev_result} "${_git_ref}" PARENT_SCOPE)
+  ENDIF()
 endfunction()


Fix compatibility with older versions of CMake

The "SONAME_FLAG" was introduced in CMake 2.8.9, while the current CMake scripts require 2.8.4 (first line of CMakeLists.txt). Increasing the required CMake version will block building in less recent OSes (e.g., for Ubuntu 12.04 LTS, the latest version from the official repositories is currently 2.8.7). The more compatible solution will be to use the old variable name, i.e. the one which was used before CMake was patched.

NB: this issue is triggered upon specifying -DBUILD_SHARED_LIBS=ON.

Related bug report: http://public.kitware.com/Bug/view.php?id=13884
Commit which implemented this new variable: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e1409ac5

--- cmake/CMakeCXXInformation.cmake
+++ cmake/CMakeCXXInformation.cmake
@@ -256,7 +256,7 @@
 # create a shared C++ library
 if(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
   set(CMAKE_CXX_CREATE_SHARED_LIBRARY
-      "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+      "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
 endif()

 # create a c++ shared module copy the shared library rule by default


Fix #246

Fix #246

Remove swig targets for doc when WITH_PYTHON_WRAPPER is OFF

--- cmake/LibraryProjectSetup.cmake
+++ cmake/LibraryProjectSetup.cmake
@@ -89,9 +89,10 @@
   # xml files for python docstrings ...
   # xml files are required to build docstrings target
   # and so they must be build during cmake run.
-  include(swig_python_tools)
-  doxy2swig_docstrings(${COMPONENT})
-
+  if(WITH_PYTHON_WRAPPER)
+    include(swig_python_tools)
+    doxy2swig_docstrings(${COMPONENT})
+  endif()

   # update the main doxy file, without building the doc
   if(WITH_${COMPONENT}_DOCUMENTATION)
@@ -157,7 +158,9 @@
     add_subdirectory(swig)
   endif()

-  add_dependencies(${COMPONENT} ${COMPONENT}_docstrings)
-
+  if(WITH_PYTHON_WRAPPER)
+    add_dependencies(${COMPONENT} ${COMPONENT}_docstrings)
+  endif()
+
 endmacro()


Adding a version check for libMesh.

Adding a version check for libMesh.

--- cmake/Modules/FindLIBMESH.cmake
+++ cmake/Modules/FindLIBMESH.cmake
@@ -3,7 +3,7 @@

 include(FindPkgConfig)
 set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${LIBMESH_PC}")
-pkg_check_modules(LIBMESH REQUIRED libmesh IMPORTED_TARGET)
+pkg_check_modules(LIBMESH REQUIRED libmesh>=1.6.0 IMPORTED_TARGET)

 find_path(LIBMESH_PC NAMES libmesh.pc
           HINTS ${LIBMESH_LIBDIR}


cmake: gcc: Remove no_libgcc exclusion for libgcc detection

This commit removes the `NOT no_libgcc` condition for the automatic
libgcc path detection.

The `no_libgcc` variable was previously set in this file to exclude
libgcc detection for the x86-64 targets because the x86-64 arch used
x32 ABI (`-mx32`) and the multilib for this ABI was not commonly
available. This is no longer the case (x86-64 targets now use `-m64`)
and libgcc must always be available.

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

--- cmake/compiler/gcc/target.cmake
+++ cmake/compiler/gcc/target.cmake
@@ -61,23 +61,21 @@
   include(${CMAKE_CURRENT_LIST_DIR}/target_sparc.cmake)
 endif()

-if(NOT no_libgcc)
-  # This libgcc code is partially duplicated in compiler/*/target.cmake
-  execute_process(
-    COMMAND ${CMAKE_C_COMPILER} ${TOOLCHAIN_C_FLAGS} --print-libgcc-file-name
-    OUTPUT_VARIABLE LIBGCC_FILE_NAME
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-    )
+# This libgcc code is partially duplicated in compiler/*/target.cmake
+execute_process(
+  COMMAND ${CMAKE_C_COMPILER} ${TOOLCHAIN_C_FLAGS} --print-libgcc-file-name
+  OUTPUT_VARIABLE LIBGCC_FILE_NAME
+  OUTPUT_STRIP_TRAILING_WHITESPACE
+  )

-  assert_exists(LIBGCC_FILE_NAME)
+assert_exists(LIBGCC_FILE_NAME)

-  get_filename_component(LIBGCC_DIR ${LIBGCC_FILE_NAME} DIRECTORY)
+get_filename_component(LIBGCC_DIR ${LIBGCC_FILE_NAME} DIRECTORY)

-  assert_exists(LIBGCC_DIR)
+assert_exists(LIBGCC_DIR)

-  LIST(APPEND LIB_INCLUDE_DIR "-L\"${LIBGCC_DIR}\"")
-  LIST(APPEND TOOLCHAIN_LIBS gcc)
-endif()
+LIST(APPEND LIB_INCLUDE_DIR "-L\"${LIBGCC_DIR}\"")
+LIST(APPEND TOOLCHAIN_LIBS gcc)

 if(SYSROOT_DIR)
   # The toolchain has specified a sysroot dir that we can use to set


CMake: Updated library dependencies.

CMake: Updated library dependencies.

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

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -2,7 +2,7 @@
 set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMARMInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMARMInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaCodeGen LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget)
@@ -11,12 +11,12 @@
 set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBlackfinInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
 set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
@@ -31,7 +31,7 @@
 set(MSVC_LIB_DEPS_LLVMMC LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMMSIL LLVMAnalysis LLVMCodeGen LLVMCore LLVMMSILInfo LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
 set(MSVC_LIB_DEPS_LLVMMSILInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430CodeGen LLVMMSP430Info LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMSystem LLVMTarget)
@@ -40,17 +40,17 @@
 set(MSVC_LIB_DEPS_LLVMPIC16 LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPIC16AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPIC16 LLVMPIC16Info LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPIC16Info LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
 set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMSystem )
-set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMSystemZInfo LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMSystemZCodeGen LLVMSystemZInfo LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSystemZCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystemZInfo LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport LLVMSystem)
@@ -60,7 +60,7 @@
 set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Info LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMXCore LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMXCoreInfo)
-set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMXCoreInfo)
+set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMXCore LLVMXCoreInfo)
 set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)


cmake: Pass the -m32 flag to modules if LLVM_BUILD_32_BITS is enabled

This was previously only done for executables and shared libraries, but not
for modules. As modules are essentially shared libraries (that need to be
dlopened explicitly), threating them the same as shared libraries seems
reasonable. This fixes the LLVM_BUILD_32_BITS build of Polly.

Contributed by: Ondra Hosek  <ondra.hosek@gmail.com>

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -107,6 +107,7 @@
     add_llvm_definitions( -m32 )
     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32")
     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32")
+    set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -m32")
   endif( LLVM_BUILD_32_BITS )
 endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )


fix gtest not handled properly when found

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -438,7 +438,11 @@
   #
   find_program(GTEST_EXE NAMES gtest-config DOC "gtest-config executable" ONLY_CMAKE_FIND_ROOT_PATH)
   if (NOT GTEST_EXE)
-    set(_gtest_LIBRARIES -lgtest)
+    if (GTEST_LIBRARIES)
+      set(_gtest_LIBRARIES -l${GTEST_LIBRARIES})
+    else(GTEST_LIBRARIES)
+      set(_gtest_LIBRARIES -lgtest)
+    endif(GTEST_LIBRARIES)
     # Couldn't find gtest-config. Hoping that gtest is in our path either in the system install or where ROS_BINDEPS points to
   else (NOT GTEST_EXE)


Small Correction in CMake (#4)

Small Correction in CMake (#4)

* Modifications by Thomas Dressehaus

Libecpint does not run with C++11 by default. These changes should fix
them.

* Reduced the required CMake version

* Update CMakeLists.txt

Fix for CMake submodule loadability.

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

automatically determine library type

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Add export target

* Add export target

* Do not generate into src dir

* Do not generate into src dir

* Revert qgen.hpp changes

* Revert qgen.hpp changes

* Make path to CMakeLists.txt.in relative

* Make path to CMakeLists.txt.in relative

* Update external imports

* Compile Faddeeva with -fPiC

* revert qgen.hpp

* Make ecpint target depend on pugixml target

* Update CMakeLists.txt

* Update ImportPugiXML.cmake

Co-authored-by: m_bens05 <2225ea5205144ce730d6770bf8c843e27c134c24@uni-muenster.de>

--- external/ImportPugiXML.cmake
+++ external/ImportPugiXML.cmake
@@ -23,6 +23,7 @@
   set(PUGIXML_INCLUDE_DIR ${EXTERNAL_BUILD_DIR}/pugixml/src/pugixml_external/src)

   add_library(libpugixml STATIC IMPORTED)
+  add_dependencies(libpugixml pugixml_external)
   set_target_properties(libpugixml PROPERTIES IMPORTED_LOCATION ${PUGIXML_LIBRARY})

 else()


changed cmake message for mbed

changed cmake message for mbed

--- firmware/mbed/arm_mbed.cmake
+++ firmware/mbed/arm_mbed.cmake
@@ -28,7 +28,7 @@
 #
 # MBED_VENDOR -> CPU Manufacturer
 #
-message(STATUS "building for ${MBED_TARGET}")
+message(STATUS "MBED target set to ${MBED_TARGET}")
 # the settings for mbed is really messed up ;)
 if(MBED_TARGET MATCHES "LPC1768")
   set(MBED_VENDOR "NXP")


update CTestConfig file for my.cdash.org

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -3,11 +3,11 @@
 ## project to incorporate the testing dashboard.
 ## # The following are required to uses Dart and the Cdash dashboard
 ##   ENABLE_TESTING()
-##   INCLUDE(Dart)
+##   INCLUDE(CTest)
 set(CTEST_PROJECT_NAME "Eigen")
 set(CTEST_NIGHTLY_START_TIME "05:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "www.cdash.org")
-set(CTEST_DROP_LOCATION "/CDashPublic/submit.php?project=Eigen")
+set(CTEST_DROP_SITE "my.cdash.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=Eigen")
 set(CTEST_DROP_SITE_CDASH TRUE)


Added a macro for fetching sub directories

--- build/macros.cmake
+++ build/macros.cmake
@@ -217,6 +217,21 @@
 #File section
 ####################

+function(get_sub_directories parent_directory_ var_)
+	if(NOT IS_DIRECTORY "${parent_directory_}")
+		message(FATAL_ERROR "Invalid directory: ${parent_directory_}")
+	endif()
+	file(GLOB _sub_paths "${parent_directory_}/*")
+
+	foreach(_curr_path ${_sub_paths})
+		if(IS_DIRECTORY "${_curr_path}")
+			list(APPEND _dirs_only "${_curr_path}")
+		endif()
+	endforeach()
+
+	set(${var_} "${_dirs_only}" PARENT_SCOPE)
+endfunction()
+
 function(file_2_strings path_to_file_ var_)
 	if(NOT EXISTS "${path_to_file_}")
 		message(FATAL_ERROR "File does not exist: ${path_to_file_}")


ENH: Add antsJointFusion to executable list install

--- DTI-Reg.cmake
+++ DTI-Reg.cmake
@@ -99,7 +99,8 @@
 if(ANTs_DIR)
   set(ants_tools
     ANTS
-    WarpImageMultiTransform)
+    WarpImageMultiTransform
+    antsJointFusion)

   foreach(ants_bin ${ants_tools})


Enable dark mode when building old sdk (#42)

IB-6189

Signed-off-by: Raul Metsma <8b52b6b714585648fd300da0dbc0fa0678553280@metsma.ee>

--- prefPane/Info.plist.cmake
+++ prefPane/Info.plist.cmake
@@ -32,5 +32,9 @@
 	<string>ID-updater</string>
 	<key>NSPrincipalClass</key>
 	<string>ID_updater</string>
+	<key>NSRequiresAquaSystemAppearance</key>
+	<false/>
+	<key>NSPrefPaneSupportsAutoLayout</key>
+	<true/>
 </dict>
 </plist>


Make sure that we can, once again, test things from within Qt Creator, Xcode, as well as from the command line [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -28,24 +28,38 @@
         ENDIF()
     ENDIF()

-    # Make sure that all the binaries we generate end up in our build folder
-    # Note: this is particularly useful with MSVC and Xcode since otherwise the
-    #       binaries will end up in a folder, which name is related to the type
-    #       of the build...
+    # Determine the effective build directory

     SET(PROJECT_BUILD_DIR ${CMAKE_BINARY_DIR})

-    SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BUILD_DIR})
-    SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BUILD_DIR})
-    SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BUILD_DIR})
-
-    SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BUILD_DIR})
-    SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BUILD_DIR})
-    SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BUILD_DIR})
-
-    SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BUILD_DIR})
-    SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BUILD_DIR})
-    SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BUILD_DIR})
+    IF(APPLE AND "${CMAKE_GENERATOR}" STREQUAL "Xcode")
+        # With Xcode, we have a configuration directory, but it messes up our
+        # build system, so ask for all the binaries to be generated in our build
+        # folder
+
+        SET(XCODE TRUE)
+
+        SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BUILD_DIR})
+        SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BUILD_DIR})
+        SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BUILD_DIR})
+
+        SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BUILD_DIR})
+        SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BUILD_DIR})
+        SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BUILD_DIR})
+
+        SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BUILD_DIR})
+        SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BUILD_DIR})
+        SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BUILD_DIR})
+    ELSE()
+        # Check whether there is a configuration directory (the case with MSVC)
+        # and, if so, make use of it
+
+        SET(XCODE FALSE)
+
+        IF(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
+            SET(PROJECT_BUILD_DIR ${PROJECT_BUILD_DIR}/${CMAKE_CFG_INTDIR})
+        ENDIF()
+    ENDIF()

     # Make sure that we are building on a supported architecture
     # Note: normally, we would check the value of CMAKE_SIZEOF_VOID_P, but in
@@ -279,7 +293,7 @@
         ENDIF()
     ENDIF()

-    # Location of our plugins so that we don't have to deploy OpenCOR on
+    # Destination of our plugins so that we don't have to deploy OpenCOR on
     # Windows and Linux before being able to test it

     IF(APPLE)
@@ -615,7 +629,20 @@
         ENDIF()
     ENDFOREACH()

-    # Move the plugin to our plugins directory
+    # Location of our plugin
+
+    IF(XCODE)
+        SET(PLUGIN_BUILD_DIR ${PROJECT_BUILD_DIR})
+    ELSE()
+        STRING(REPLACE "${${CMAKE_PROJECT_NAME}_SOURCE_DIR}/" "" PLUGIN_BUILD_DIR ${PROJECT_SOURCE_DIR})
+        SET(PLUGIN_BUILD_DIR ${CMAKE_BINARY_DIR}/${PLUGIN_BUILD_DIR})
+
+        IF(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
+            SET(PLUGIN_BUILD_DIR ${PLUGIN_BUILD_DIR}/${CMAKE_CFG_INTDIR})
+        ENDIF()
+    ENDIF()
+
+    # Copy the plugin to our plugins directory
     # Note: this is done so that we can, on Windows and Linux, test the use of
     #       plugins in OpenCOR without first having to package OpenCOR, as well
     #       as, on Windows, test things from within Qt Creator...
@@ -623,8 +650,8 @@
     SET(PLUGIN_FILENAME ${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})

     ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
-                       COMMAND ${CMAKE_COMMAND} -E rename ${PROJECT_BUILD_DIR}/${PLUGIN_FILENAME}
-                                                          ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME})
+                       COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BUILD_DIR}/${PLUGIN_FILENAME}
+                                                        ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME})

     # A few OS X specific things

@@ -660,7 +687,7 @@
     # already been copied

     IF(NOT APPLE)
-        INSTALL(FILES ${PROJECT_BUILD_DIR}/${PLUGIN_FILENAME}
+        INSTALL(FILES ${PLUGIN_BUILD_DIR}/${PLUGIN_FILENAME}
                 DESTINATION plugins/${CMAKE_PROJECT_NAME})
     ENDIF()

@@ -769,8 +796,14 @@

                 SET(TEST_FILENAME ${TEST_NAME}${CMAKE_EXECUTABLE_SUFFIX})

+                IF(WIN32)
+                    ADD_CUSTOM_COMMAND(TARGET ${TEST_NAME} POST_BUILD
+                                       COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BUILD_DIR}/${TEST_FILENAME}
+                                                                        ${PROJECT_BUILD_DIR}/${TEST_FILENAME})
+                ENDIF()
+
                 ADD_CUSTOM_COMMAND(TARGET ${TEST_NAME} POST_BUILD
-                                   COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BUILD_DIR}/${TEST_FILENAME}
+                                   COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BUILD_DIR}/${TEST_FILENAME}
                                                                     ${DEST_TESTS_DIR}/${TEST_FILENAME})

                 # A few OS X specific things


Didn't make macOS happy so reverting.

Didn't make macOS happy so reverting.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -139,7 +139,6 @@
         )
         set(_DISABLED_READABILITY_CHECKS
           -readability-named-parameter
-          -readability-use-anyofallof
         )
     endif()


fix typo

fix typo

--- cmake/config.cmake
+++ cmake/config.cmake
@@ -44,7 +44,7 @@
 set(ecto_LIBRARIES ecto)

 if (ROS_GROOVY_OR_ABOVE_FOUND)
-configure_file(${ecto_SOURCE_DIR}/cmake/config.hpp.in ${CATKIN_BUILD_PREFIX}/$CATKIN_PROJECT_INCLUDE_DESTINATION}/config.hpp)
+configure_file(${ecto_SOURCE_DIR}/cmake/config.hpp.in ${CATKIN_BUILD_PREFIX}/${CATKIN_PROJECT_INCLUDE_DESTINATION}/config.hpp)
 else()
 configure_file(${ecto_SOURCE_DIR}/cmake/config.hpp.in ${CMAKE_BINARY_DIR}/gen/cpp/ecto/config.hpp)
 endif()


cmake(dotnet): Fix windows build

cmake(dotnet): Fix windows build

--- cmake/dotnet.cmake
+++ cmake/dotnet.cmake
@@ -141,6 +141,7 @@
     ${OR_TOOLS_DOTNET_NATIVE}/${OR_TOOLS_DOTNET_NATIVE}.targets
   WORKING_DIRECTORY dotnet
   )
+  set(DOTNET_TARGETS dotnet/${OR_TOOLS_DOTNET_NATIVE}/${OR_TOOLS_DOTNET_NATIVE}.targets)
 endif()

 add_custom_target(dotnet_native ALL
@@ -149,6 +150,7 @@
     Dotnet${PROJECT_NAME}_proto
     google-ortools-native
     dotnet/${OR_TOOLS_DOTNET_NATIVE}/${OR_TOOLS_DOTNET_NATIVE}.csproj
+    ${DOTNET_TARGETS}
   COMMAND ${CMAKE_COMMAND} -E make_directory packages
   COMMAND ${DOTNET_EXECUTABLE} build -c Release /p:Platform=x64 ${OR_TOOLS_DOTNET_NATIVE}/${OR_TOOLS_DOTNET_NATIVE}.csproj
   COMMAND ${DOTNET_EXECUTABLE} pack -c Release ${OR_TOOLS_DOTNET_NATIVE}/${OR_TOOLS_DOTNET_NATIVE}.csproj


RETURN doesn't exactly return from the macro...

--- cmake/plugin.cmake
+++ cmake/plugin.cmake
@@ -32,16 +32,15 @@

 MACRO(PLUGIN_APPEND_COLLECTIONS plugin)
   SET(fcopied "${CMAKE_CURRENT_SOURCE_DIR}/tests/collections/FilesCopied")
-  IF(EXISTS ${fcopied})
-    RETURN()
-  ENDIF()
-  FILE(GLOB collections ${CMAKE_CURRENT_SOURCE_DIR}/tests/collections/*)
-  FOREACH(cfile ${collections})
-    FILE(READ ${cfile} contents)
-    GET_FILENAME_COMPONENT(fname ${cfile} NAME)
-    FILE(APPEND ${CMAKE_SOURCE_DIR}/mysql-test/collections/${fname} "${contents}")
-    FILE(APPEND ${fcopied} "${fname}\n")
-  ENDFOREACH()
+  IF(NOT EXISTS ${fcopied})
+    FILE(GLOB collections ${CMAKE_CURRENT_SOURCE_DIR}/tests/collections/*)
+    FOREACH(cfile ${collections})
+      FILE(READ ${cfile} contents)
+      GET_FILENAME_COMPONENT(fname ${cfile} NAME)
+      FILE(APPEND ${CMAKE_SOURCE_DIR}/mysql-test/collections/${fname} "${contents}")
+      FILE(APPEND ${fcopied} "${fname}\n")
+    ENDFOREACH()
+  ENDIF()
 ENDMACRO()

 MACRO(MYSQL_ADD_PLUGIN)


Fix failing test cases on pushbuild

Fix failing test cases on pushbuild

--- cmake/plugin.cmake
+++ cmake/plugin.cmake
@@ -113,9 +113,12 @@
     SET (MYSQLD_STATIC_PLUGIN_LIBS ${MYSQLD_STATIC_PLUGIN_LIBS}
       ${target} CACHE INTERNAL "" FORCE)

-    IF(NOT ARG_MANDATORY)
+    IF(ARG_MANDATORY)
+      SET(${with_var} ON CACHE INTERNAL "Link ${plugin} statically to the server"
+       FORCE)
+    ELSE()
       SET(${with_var} ON CACHE BOOL "Link ${plugin} statically to the server"
-        FORCE)
+       FORCE)
     ENDIF()

     IF(ARG_MANDATORY)


pw_protobuf_compiler: Add missing dep in CMake

Previously, pw_proto_library was missing a dependency on the
${NAME}._sources target. Proto builds would work if the ._sources target
had been run previously, but a clean build would fail.

Change-Id: I163ab1a5d765845abdcec6ec1cbcc984c1f146a8
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/47361
Pigweed-Auto-Submit: Wyatt Hepler <cca3bedb37979eacd157a9bceb473582df8aea1e@google.com>
Commit-Queue: Auto-Submit <14637eda5603879df170705285bf30f5996692f0@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Alexei Frolov <a1b001416a8cf9aaea32a3411f8f3c0793ebc0b5@google.com>

--- pw_protobuf_compiler/proto.cmake
+++ pw_protobuf_compiler/proto.cmake
@@ -165,14 +165,15 @@
     OUTPUT
       ${outputs}
   )
-  add_custom_target("${TARGET}" DEPENDS ${outputs})
+  add_custom_target("${TARGET}._generate.${LANGUAGE}" DEPENDS ${outputs})
+  add_dependencies("${TARGET}._generate.${LANGUAGE}" "${TARGET}._sources")
 endfunction(_pw_generate_protos)

 # Internal function that creates a pwpb proto library.
 function(_pw_pwpb_library NAME SOURCES INPUTS DEPS INCLUDE_FILE OUT_DIR)
   list(TRANSFORM DEPS APPEND .pwpb)

-  _pw_generate_protos("${NAME}._generate.pwpb"
+  _pw_generate_protos("${NAME}"
       pwpb
       "$ENV{PW_ROOT}/pw_protobuf/py/pw_protobuf/plugin.py"
       ".pwpb.h"
@@ -194,7 +195,7 @@
 function(_pw_raw_rpc_library NAME SOURCES INPUTS DEPS INCLUDE_FILE OUT_DIR)
   list(TRANSFORM DEPS APPEND .raw_rpc)

-  _pw_generate_protos("${NAME}._generate.raw_rpc"
+  _pw_generate_protos("${NAME}"
       raw_rpc
       "$ENV{PW_ROOT}/pw_rpc/py/pw_rpc/plugin_raw.py"
       ".raw_rpc.pb.h"
@@ -241,9 +242,13 @@
     if("${SOURCES}" MATCHES "nanopb\\.proto")
       add_custom_target("${NAME}._generate.nanopb")  # Nothing to do
       add_library("${NAME}.nanopb" INTERFACE)
-      target_link_libraries("${NAME}.nanopb" INTERFACE pw_third_party.nanopb ${DEPS})
+      target_link_libraries("${NAME}.nanopb"
+        INTERFACE
+          pw_third_party.nanopb
+          ${DEPS}
+      )
     else()
-      _pw_generate_protos("${NAME}._generate.nanopb"
+      _pw_generate_protos("${NAME}"
           nanopb
           "${dir_pw_third_party_nanopb}/generator/protoc-gen-nanopb"
           ".pb.h;.pb.c"
@@ -274,7 +279,7 @@
   # Determine the names of the output files.
   list(TRANSFORM DEPS APPEND .nanopb_rpc)

-  _pw_generate_protos("${NAME}._generate.nanopb_rpc"
+  _pw_generate_protos("${NAME}"
       nanopb_rpc
       "$ENV{PW_ROOT}/pw_rpc/py/pw_rpc/plugin_nanopb.py"
       ".rpc.pb.h"


Macos, though bsd-like, calls it "gnutar", not "gtar"

--- build/cmake/macros/TarGz.cmake
+++ build/cmake/macros/TarGz.cmake
@@ -1,14 +1,16 @@
 if (NOT WINDOWS)
     # BSD has both BSD tar, named "tar", and GNU tar, named "gtar" in ports...
     if (not BSD_UNIX)
-	set( TAR_COMMAND tar)
+		set( TAR_COMMAND tar)
     else()
-	# but old batlab has gnu tar named "tar" in the path first, and no gtar
-	FIND_PROGRAM(TAR_COMMAND "gtar")
-	if (NOT TAR_COMMAND)
-		# Could not find gtar, use "tar" and hope for the best
-		set( TAR_COMMAND tar)
-	endif()
+		# Macos is _like_ bsd, but calls it "gnutuar"
+		FIND_PROGRAM(TAR_COMMAND NAMES "gtar" "gnutar")
+
+		# but old batlab has gnu tar named "tar" in the path first, and no gtar
+		if (NOT TAR_COMMAND)
+			# Could not find gtar, use "tar" and hope for the best
+			set( TAR_COMMAND tar)
+		endif()
     endif()

     add_custom_command(


using parent scope

using parent scope

--- cmake/lib.cmake
+++ cmake/lib.cmake
@@ -67,6 +67,6 @@

 set(ETHCRYPTO_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/include ${LIBSCRYPT_INCLUDE_DIRS} ${SECP256K1_INCLUDE_DIRS} ${CRYPTOPP_INCLUDE_DIRS} ${ETHCRYPTO_CONFIG_INCLUDE_DIR} PARENT_SCOPE)
-set(ETHCRYPTO_LIBRARY ethcrypto)
-set(ETHCRYPTO_LIBRARIES ${ETHCRYPTO_LIBRARY})
+set(ETHCRYPTO_LIBRARY ethcrypto PARENT_SCOPE)
+set(ETHCRYPTO_LIBRARIES ${ETHCRYPTO_LIBRARY} PARENT_SCOPE)


indented and explicitly specified the msvc version for windows

--- cmake-modules/Findassimp.cmake
+++ cmake-modules/Findassimp.cmake
@@ -1,90 +1,73 @@
 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-	set(ASSIMP_ARCHITECTURE "64")
+    set(ASSIMP_ARCHITECTURE "64")
 elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
-	set(ASSIMP_ARCHITECTURE "32")
+    set(ASSIMP_ARCHITECTURE "32")
 endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
-
+
 if(WIN32)
-	set(ASSIMP_ROOT_DIR CACHE PATH "ASSIMP root directory")
-	message(STATUS "CMAKE Finding assimp ${ASSIMP_ROOT_DIR}")
+    set(ASSIMP_ROOT_DIR CACHE PATH "ASSIMP root directory")
+    message(STATUS "CMAKE Finding assimp ${ASSIMP_ROOT_DIR}")

-	# Find path of each library
-	find_path(assimp_INCLUDE_DIRS
-		NAMES
-			assimp/anim.h
-		HINTS
-			${ASSIMP_ROOT_DIR}/include
-	)
+    # Find path of each library
+    find_path(assimp_INCLUDE_DIRS
+        NAMES
+            assimp/anim.h
+        HINTS
+            ${ASSIMP_ROOT_DIR}/include
+    )

-	if(MSVC12)
-		set(ASSIMP_MSVC_VERSION "vc120")
-	elseif(MSVC14)
-		set(ASSIMP_MSVC_VERSION "vc140")
-	endif(MSVC12)
+    # todo: determine version based on the compiler settings...
+    set(ASSIMP_MSVC_VERSION "vc142")

-	message(STATUS "CMAKE assimp msvc version ${ASSIMP_MSVC_VERSION}")
-
-	if(MSVC12 OR MSVC14)
-
-		find_path(ASSIMP_LIBRARY_DIR
-			NAMES
-				assimp-${ASSIMP_MSVC_VERSION}-mt.lib
-			HINTS
-				${ASSIMP_ROOT_DIR}/lib${ASSIMP_ARCHITECTURE}
-				${ASSIMP_ROOT_DIR}/lib
-		)
+    message(STATUS "CMAKE assimp msvc version ${ASSIMP_MSVC_VERSION}")
+
+    find_path(ASSIMP_LIBRARY_DIR
+        NAMES
+            assimp-${ASSIMP_MSVC_VERSION}-mt.lib
+        HINTS
+            ${ASSIMP_ROOT_DIR}/lib${ASSIMP_ARCHITECTURE}
+            ${ASSIMP_ROOT_DIR}/lib
+    )

-		message(STATUS "Assimp library directory ${ASSIMP_LIBRARY_DIR}")
+    message(STATUS "Assimp library directory ${ASSIMP_LIBRARY_DIR}")

-		# release should be assimp-vc140-mt.dll
-		find_library(ASSIMP_LIBRARY_RELEASE				assimp-${ASSIMP_MSVC_VERSION}-mt.lib 			PATHS ${ASSIMP_LIBRARY_DIR})
-		find_library(ASSIMP_LIBRARY_DEBUG				assimp-${ASSIMP_MSVC_VERSION}-mtd.lib			PATHS ${ASSIMP_LIBRARY_DIR})
+    # release should be assimp-vc140-mt.dll
+    find_library(ASSIMP_LIBRARY_RELEASE assimp-${ASSIMP_MSVC_VERSION}-mt.lib  PATHS ${ASSIMP_LIBRARY_DIR})
+    find_library(ASSIMP_LIBRARY_DEBUG   assimp-${ASSIMP_MSVC_VERSION}-mtd.lib PATHS ${ASSIMP_LIBRARY_DIR})

-		if(ASSIMP_LIBRARY_DEBUG)
-      set(assimp_LIBRARIES
-        optimized 	${ASSIMP_LIBRARY_RELEASE}
-        debug		${ASSIMP_LIBRARY_DEBUG}
-      )
-		else()
-      set(assimp_LIBRARIES ${ASSIMP_LIBRARY_RELEASE} )
-		endif()
-
-		FUNCTION(ASSIMP_COPY_BINARIES TargetDirectory)
-			ADD_CUSTOM_TARGET(AssimpCopyBinaries
-				COMMAND ${CMAKE_COMMAND} -E copy ${ASSIMP_ROOT_DIR}/bin${ASSIMP_ARCHITECTURE}/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll 	${TargetDirectory}/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll
-				COMMAND ${CMAKE_COMMAND} -E copy ${ASSIMP_ROOT_DIR}/bin${ASSIMP_ARCHITECTURE}/assimp-${ASSIMP_MSVC_VERSION}-mt.dll 		${TargetDirectory}/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll
-			COMMENT "Copying Assimp binaries to '${TargetDirectory}'"
-			VERBATIM)
-		ENDFUNCTION(ASSIMP_COPY_BINARIES)
-
-	endif()
-
+    if(ASSIMP_LIBRARY_DEBUG)
+        set(assimp_LIBRARIES
+            optimized 	${ASSIMP_LIBRARY_RELEASE}
+            debug		${ASSIMP_LIBRARY_DEBUG}
+        )
+    else()
+        set(assimp_LIBRARIES ${ASSIMP_LIBRARY_RELEASE} )
+    endif()
 else(WIN32)

-	find_path(
-	  assimp_INCLUDE_DIRS
-	  NAMES assimp/postprocess.h assimp/scene.h assimp/version.h assimp/config.h assimp/cimport.h
-	  PATHS /usr/local/include/
-	)
+    find_path(
+        assimp_INCLUDE_DIRS
+        NAMES assimp/postprocess.h assimp/scene.h assimp/version.h assimp/config.h assimp/cimport.h
+        PATHS /usr/local/include/
+    )

-	find_library(
-	  assimp_LIBRARIES
-	  NAMES assimp
-	  PATHS /usr/local/lib/
-	)
+    find_library(
+        assimp_LIBRARIES
+        NAMES assimp
+        PATHS /usr/local/lib/
+    )

-	if (assimp_INCLUDE_DIRS AND assimp_LIBRARIES)
-	  SET(assimp_FOUND TRUE)
-	ENDIF (assimp_INCLUDE_DIRS AND assimp_LIBRARIES)
+    if (assimp_INCLUDE_DIRS AND assimp_LIBRARIES)
+        SET(assimp_FOUND TRUE)
+    ENDIF (assimp_INCLUDE_DIRS AND assimp_LIBRARIES)

-	if (assimp_FOUND)
-	  if (NOT assimp_FIND_QUIETLY)
-		# message(STATUS "Found asset importer library: ${assimp_LIBRARIES}")
-	  endif (NOT assimp_FIND_QUIETLY)
-	else (assimp_FOUND)
-	  if (assimp_FIND_REQUIRED)
-		message(FATAL_ERROR "Could not find asset importer library")
-	  endif (assimp_FIND_REQUIRED)
-	endif (assimp_FOUND)
-
+    if (assimp_FOUND)
+        if (NOT assimp_FIND_QUIETLY)
+            # message(STATUS "Found asset importer library: ${assimp_LIBRARIES}")
+        endif (NOT assimp_FIND_QUIETLY)
+    else (assimp_FOUND)
+        if (assimp_FIND_REQUIRED)
+            message(FATAL_ERROR "Could not find asset importer library")
+        endif (assimp_FIND_REQUIRED)
+    endif (assimp_FOUND)
 endif(WIN32)


cmake 3.15+ MSVC runtime library fix, check for policy NEW

--- cmake-toolchains/windows.cmake
+++ cmake-toolchains/windows.cmake
@@ -48,23 +48,37 @@
     set(FIPS_VS_EXCEPTION_FLAGS "/EHsc")
 endif()

-if (FIPS_DYNAMIC_CRT OR FIPS_UWP)
-    set(FIPS_VS_CRT_FLAGS "/MD")
-else()
-    set(FIPS_VS_CRT_FLAGS "/MT")
-endif()
-
+# define C++ flags
 set(CMAKE_CXX_FLAGS "${FIPS_VS_EXCEPTION_FLAGS} /MP /DWIN32")
 set(CMAKE_CXX_FLAGS_DEBUG "/Zi /Od /D_DEBUG /DFIPS_DEBUG=1")
 set(CMAKE_CXX_FLAGS_RELEASE "/O2 /DNDEBUG /WX")
-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FIPS_VS_CRT_FLAGS}d")
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${FIPS_VS_CRT_FLAGS}")

+# define C flags
 set(CMAKE_C_FLAGS "/MP /DWIN32")
 set(CMAKE_C_FLAGS_DEBUG "/Zi /Od /D_DEBUG /DFIPS_DEBUG=1")
 set(CMAKE_C_FLAGS_RELEASE "/O2 /DNDEBUG /WX")
-set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${FIPS_VS_CRT_FLAGS}d")
-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${FIPS_VS_CRT_FLAGS}")
+
+# define static (/MT) or dynamic (/MD) linking for MSVC runtime library
+cmake_policy(GET CMP0091 has_policy_cmp0091)
+if ("${has_policy_cmp0091}" STREQUAL "NEW")
+    # CMake 3.15+
+    # see: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html
+    if (FIPS_DYNAMIC_CRT OR FIPS_UWP)
+        set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
+    else()
+        set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
+    endif()
+else()
+    if (FIPS_DYNAMIC_CRT OR FIPS_UWP)
+        set(FIPS_VS_CRT_FLAGS "/MD")
+    else()
+        set(FIPS_VS_CRT_FLAGS "/MT")
+    endif()
+    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FIPS_VS_CRT_FLAGS}d")
+    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${FIPS_VS_CRT_FLAGS}")
+    set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${FIPS_VS_CRT_FLAGS}d")
+    set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${FIPS_VS_CRT_FLAGS}")
+endif()

 # define exe linker/librarian flags
 set(CMAKE_EXE_LINKER_FLAGS "/STACK:${FIPS_WINDOWS_STACK_SIZE} /machine:${FIPS_WINDOWS_PLATFORM_NAME}")


Use LLPC_BUILD_TESTS in CompilerStandalone.cmake

LLPC_BUILD_LIT is deprecated.

--- cmake/CompilerStandalone.cmake
+++ cmake/CompilerStandalone.cmake
@@ -28,7 +28,7 @@
 endif(COMMAND cmake_policy)

 set(ICD_BUILD_LLPC ON)
-set(LLPC_BUILD_LIT ON)
+set(LLPC_BUILD_TESTS ON)

 set(XGL_VKGC_PATH ${CMAKE_CURRENT_SOURCE_DIR})


removed cmake opencl module for now (using libopencl-stub instead)

--- cmake/Modules/FindOpenCL.cmake
+++ cmake/Modules/FindOpenCL.cmake
@@ -1,166 +0,0 @@
-# ########################################################################
-# Copyright 2015 Advanced Micro Devices, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ########################################################################
-
-# Locate an OpenCL implementation.
-# Currently supports AMD APP SDK (http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx/)
-#
-# Defines the following variables:
-#
-#   OPENCL_FOUND - Found the OPENCL framework
-#   OPENCL_INCLUDE_DIRS - Include directories
-#
-# Also defines the library variables below as normal
-# variables.  These contain debug/optimized keywords when
-# a debugging library is found.
-#
-#   OPENCL_LIBRARIES - libopencl
-#
-# Accepts the following variables as input:
-#
-#   OPENCL_ROOT - (as a CMake or environment variable)
-#                The root directory of the OpenCL implementation found
-#
-#   FIND_LIBRARY_USE_LIB64_PATHS - Global property that controls whether findOpenCL should search for
-#                              64bit or 32bit libs
-#-----------------------
-# Example Usage:
-#
-#    find_package(OPENCL REQUIRED)
-#    include_directories(${OPENCL_INCLUDE_DIRS})
-#
-#    add_executable(foo foo.cc)
-#    target_link_libraries(foo ${OPENCL_LIBRARIES})
-#
-#-----------------------
-include( CheckSymbolExists )
-include( CMakePushCheckState )
-
-if( DEFINED OPENCL_ROOT OR DEFINED ENV{OPENCL_ROOT})
-  message( STATUS "Defined OPENCL_ROOT: ${OPENCL_ROOT}, ENV{OPENCL_ROOT}: $ENV{OPENCL_ROOT}" )
-endif( )
-
-find_path(OPENCL_INCLUDE_DIRS
-  NAMES OpenCL/cl.h CL/cl.h
-  HINTS
-    ${OPENCL_ROOT}/include
-    $ENV{OPENCL_ROOT}/include
-    $ENV{AMDAPPSDKROOT}/include
-    $ENV{CUDA_PATH}/include
-  PATHS
-    /usr/include
-    /usr/local/include
-    /usr/local/cuda/include
-  DOC "OpenCL header file path"
-)
-mark_as_advanced( OPENCL_INCLUDE_DIRS )
-message( STATUS "OPENCL_INCLUDE_DIRS: ${OPENCL_INCLUDE_DIRS}" )
-
-set( OpenCL_VERSION "0.0" )
-
-cmake_push_check_state( RESET )
-set( CMAKE_REQUIRED_INCLUDES "${OPENCL_INCLUDE_DIRS}" )
-
-# Bug in check_symbol_exists prevents us from specifying a list of files, so we loop
-# Only 1 of these files will exist on a system, so the other file will not clobber the output variable
-if( APPLE )
-   set( CL_HEADER_FILE "OpenCL/cl.h" )
-else( )
-   set( CL_HEADER_FILE "CL/cl.h" )
-endif( )
-
-check_symbol_exists( CL_VERSION_2_0 ${CL_HEADER_FILE} HAVE_CL_2_0 )
-check_symbol_exists( CL_VERSION_1_2 ${CL_HEADER_FILE} HAVE_CL_1_2 )
-check_symbol_exists( CL_VERSION_1_1 ${CL_HEADER_FILE} HAVE_CL_1_1 )
-# message( STATUS "HAVE_CL_2_0: ${HAVE_CL_2_0}" )
-# message( STATUS "HAVE_CL_1_2: ${HAVE_CL_1_2}" )
-# message( STATUS "HAVE_CL_1_1: ${HAVE_CL_1_1}" )
-
-# set OpenCL_VERSION to the highest detected version
-if( HAVE_CL_2_0 )
-  set( OpenCL_VERSION "2.0" )
-elseif( HAVE_CL_1_2 )
-  set( OpenCL_VERSION "1.2" )
-elseif( HAVE_CL_1_1 )
-  set( OpenCL_VERSION "1.1" )
-endif( )
-
-cmake_pop_check_state( )
-
-# Search for 64bit libs if FIND_LIBRARY_USE_LIB64_PATHS is set to true in the global environment, 32bit libs else
-get_property( LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS )
-if( LIB64 )
-  message( STATUS "FindOpenCL searching for 64-bit libraries" )
-else( )
-  message( STATUS "FindOpenCL searching for 32-bit libraries" )
-endif( )
-
-if( LIB64 )
-  find_library( OPENCL_LIBRARIES
-    NAMES OpenCL
-    HINTS
-      ${OPENCL_ROOT}/lib
-      $ENV{OPENCL_ROOT}/lib
-      $ENV{AMDAPPSDKROOT}/lib
-      $ENV{CUDA_PATH}/lib
-    DOC "OpenCL dynamic library path"
-    PATH_SUFFIXES x86_64 x64 x86_64/sdk
-    PATHS
-    /usr/lib
-    /usr/local/cuda/lib
-  )
-else( )
-  find_library( OPENCL_LIBRARIES
-    NAMES OpenCL
-    HINTS
-      ${OPENCL_ROOT}/lib
-      $ENV{OPENCL_ROOT}/lib
-      $ENV{AMDAPPSDKROOT}/lib
-      $ENV{CUDA_PATH}/lib
-    DOC "OpenCL dynamic library path"
-    PATH_SUFFIXES x86 Win32
-    PATHS
-    /usr/lib
-    /usr/local/cuda/lib
-  )
-endif( )
-mark_as_advanced( OPENCL_LIBRARIES )
-
-# message( STATUS "OpenCL_FIND_VERSION: ${OpenCL_FIND_VERSION}" )
-if( OpenCL_VERSION VERSION_LESS OpenCL_FIND_VERSION )
-    message( FATAL_ERROR "Requested OpenCL version: ${OpenCL_FIND_VERSION}, Found OpenCL version: ${OpenCL_VERSION}" )
-endif( )
-
-# If we asked for OpenCL 1.2, and we found a version installed greater than that, pass the 'use deprecated' flag
-if( (OpenCL_FIND_VERSION VERSION_LESS "2.0") AND (OpenCL_VERSION VERSION_GREATER OpenCL_FIND_VERSION) )
-    add_definitions( -DCL_USE_DEPRECATED_OPENCL_2_0_APIS )
-
-    # If we asked for OpenCL 1.1, and we found a version installed greater than that, pass the 'use deprecated' flag
-    if( (OpenCL_FIND_VERSION VERSION_LESS "1.2") AND (OpenCL_VERSION VERSION_GREATER OpenCL_FIND_VERSION) )
-        add_definitions( -DCL_USE_DEPRECATED_OPENCL_1_1_APIS )
-    endif( )
-endif( )
-
-include( FindPackageHandleStandardArgs )
-FIND_PACKAGE_HANDLE_STANDARD_ARGS( OPENCL
-    REQUIRED_VARS OPENCL_LIBRARIES OPENCL_INCLUDE_DIRS
-    VERSION_VAR OpenCL_VERSION
-    )
-
-if( NOT OPENCL_FOUND )
-    message( STATUS "FindOpenCL looked for libraries named: OpenCL" )
-else( )
-    message(STATUS "FindOpenCL ${OPENCL_LIBRARIES}, ${OPENCL_INCLUDE_DIRS}")
-endif()


Allow PYTHON_LIBRARY and PYTHON_INCLUDE_DIR to actually be overridden

--- cmake/OpenCVDetectPython.cmake
+++ cmake/OpenCVDetectPython.cmake
@@ -75,10 +75,10 @@

     if(NOT ANDROID AND NOT IOS)
       ocv_check_environment_variables(${library_env} ${include_dir_env})
-      if(${${library_env}})
+      if(NOT ${${library_env}} EQUAL "")
           set(PYTHON_LIBRARY "${${library_env}}")
       endif()
-      if(${${include_dir_env}})
+      if(NOT ${${include_dir_env}} EQUAL "")
           set(PYTHON_INCLUDE_DIR "${${include_dir_env}}")
       endif()


OSPRay uses Embree as shared lib

OSPRay uses Embree as shared lib

--- cmake/build_embree_2.7.1.cmake
+++ cmake/build_embree_2.7.1.cmake
@@ -59,6 +59,8 @@
 SET(RTCORE_BUFFER_STRIDE ON)
 SET(RTCORE_IGNORE_INVALID_RAYS ON)
 SET(RTCORE_RAY_PACKETS ON)
+
+SET(ENABLE_STATIC_LIB OFF)

 CONFIGURE_FILE(
@@ -246,7 +248,7 @@
 ENDIF()

 SET(ISPC_DLLEXPORT "yes") # workaround for bug #1085 in ISPC 1.8.2: ospray_embree should export, but export in ospray cause link errors
-OSPRAY_ADD_LIBRARY(ospray_embree ${EMBREE_LIB_TYPE} ${EMBREE_LIBRARY_FILES})
+OSPRAY_ADD_LIBRARY(ospray_embree${OSPRAY_LIB_SUFFIX} SHARED ${EMBREE_LIBRARY_FILES})
 UNSET(ISPC_DLLEXPORT)
 SET_PROPERTY(TARGET ospray_embree PROPERTY FOLDER kernels)

@@ -306,7 +308,7 @@
   )
 ENDIF()

-TARGET_LINK_LIBRARIES(ospray_embree
+TARGET_LINK_LIBRARIES(ospray_embree${OSPRAY_LIB_SUFFIX}
   ${EMBREE_LIBRARIES}
   sys
   simd


Fix logic of handling dependencies when NO_CXXMODULE is specified

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -562,11 +562,15 @@
   #---Get the library and module dependencies-----------------
   if(ARG_DEPENDENCIES)
     foreach(dep ${ARG_DEPENDENCIES})
-      set(dependent_pcm ${libprefix}${dep}_rdict.pcm)
-      if (runtime_cxxmodules)
-        set(dependent_pcm ${dep}.pcm)
-      endif()
-      set(newargs ${newargs} -m  ${dependent_pcm})
+      set(dict "$<TARGET_NAME_IF_EXISTS:G__${dep}>")
+      set(dependent_pcm ${libprefix}${dep}_rdict.pcm})
+      if(runtime_cxxmodules)
+        #---Check for NO_CXXMODULE flag in a dependent module---
+        set(dependent_pcm "$<IF:$<BOOL:$<TARGET_PROPERTY:${dict},ARG_NO_MODULE>>,,-m ${dep}.pcm>")
+        set(newargs ${newargs} ${dependent_pcm})
+      else()
+        set(newargs ${newargs} -m ${dependent_pcm})
+      endif()
     endforeach()
   endif()

@@ -643,7 +647,7 @@
   # would not happen if we used target_sources() directly with the dictionary source.
   if(TARGET "${ARG_MODULE}" AND NOT "${ARG_MODULE}" STREQUAL "${dictionary}")
     add_library(${dictionary} OBJECT ${dictionary}.cxx)
-    set_target_properties(${dictionary} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
+    set_target_properties(${dictionary} PROPERTIES POSITION_INDEPENDENT_CODE TRUE ARG_NO_MODULE ${ARG_NO_CXXMODULE})
     target_sources(${ARG_MODULE} PRIVATE $<TARGET_OBJECTS:${dictionary}>)

     target_compile_options(${dictionary} PRIVATE


Comment out recent fix to pkg-config.cmake since Alan's patch handles the Qt issue explicitly and so this is not currently required.

svn path=/trunk/; revision=9947

--- cmake/modules/pkg-config.cmake
+++ cmake/modules/pkg-config.cmake
@@ -102,18 +102,21 @@
   # N.B. ${_link_flags_in} must be a string and not a list.

   # First strip out optimized / debug options which are not needed
-  # Currently only FindQt4 seems to need this.
-  if(CMAKE_BUILD_TYPE MATCHES "Debug")
-    string(REGEX REPLACE "(^|;)optimized;[^;]*;" "\\1" ${_link_flags_out} "${_link_flags_in}")
-    string(REGEX REPLACE "(^|;)debug;" "\\1" ${_link_flags_out} "${${_link_flags_out}}")
-  else(CMAKE_BUILD_TYPE MATCHES "Debug")
-    string(REGEX REPLACE "(^|;)debug;[^;]*;" "\\1" ${_link_flags_out} "${_link_flags_in}")
-    string(REGEX REPLACE "(^|;)optimized;" "\\1" ${_link_flags_out} "${${_link_flags_out}}")
-  endif(CMAKE_BUILD_TYPE MATCHES "Debug")
+  # Currently only FindQt4 seems to need this so it is handled
+  # explicitly in the Qt code.
+  # Leave this for reference in case it turns out there is a more
+  # general need for it.
+  #if(CMAKE_BUILD_TYPE MATCHES "Debug")
+  #  string(REGEX REPLACE "(^|;)optimized;[^;]*;" "\\1" ${_link_flags_out} "${_link_flags_in}")
+  #  string(REGEX REPLACE "(^|;)debug;" "\\1" ${_link_flags_out} "${${_link_flags_out}}")
+  #else(CMAKE_BUILD_TYPE MATCHES "Debug")
+  #  string(REGEX REPLACE "(^|;)debug;[^;]*;" "\\1" ${_link_flags_out} "${_link_flags_in}")
+  #  string(REGEX REPLACE "(^|;)optimized;" "\\1" ${_link_flags_out} "${${_link_flags_out}}")
+  #endif(CMAKE_BUILD_TYPE MATCHES "Debug")

   #message("(original link flags) = ${_link_flags_in}")
   # Convert link flags to a blank-delimited string.
-  string(REGEX REPLACE ";" " " ${_link_flags_out} "${${_link_flags_out}}")
+  string(REGEX REPLACE ";" " " ${_link_flags_out} "${_link_flags_in}")
   #message("(blanks) ${_link_flags_out} = ${${_link_flags_out}}")

   # Replace actual library names with the -LPATHNAME and -lLIBRARYNAME form


py/mkrules.cmake: Add MPY_LIB_DIR and BOARD_DIR to makemanifest call.

So that the FROZEN_MANIFEST option in cmake works the same as make.

Signed-off-by: Damien George <99e6b749acbfbe2a596df99e91d24d6e1fdbee00@micropython.org>

--- py/mkrules.cmake
+++ py/mkrules.cmake
@@ -125,9 +125,13 @@
         MICROPY_MODULE_FROZEN_MPY=\(1\)
     )

+    if(NOT MICROPY_LIB_DIR)
+        set(MICROPY_LIB_DIR ${MICROPY_DIR}/../micropython-lib)
+    endif()
+
     add_custom_command(
         OUTPUT ${MICROPY_FROZEN_CONTENT}
-        COMMAND ${Python3_EXECUTABLE} ${MICROPY_DIR}/tools/makemanifest.py -o ${MICROPY_FROZEN_CONTENT} -v "MPY_DIR=${MICROPY_DIR}" -v "PORT_DIR=${MICROPY_PORT_DIR}" -b "${CMAKE_BINARY_DIR}" -f${MICROPY_CROSS_FLAGS} ${MICROPY_FROZEN_MANIFEST}
+        COMMAND ${Python3_EXECUTABLE} ${MICROPY_DIR}/tools/makemanifest.py -o ${MICROPY_FROZEN_CONTENT} -v "MPY_DIR=${MICROPY_DIR}" -v "MPY_LIB_DIR=${MICROPY_LIB_DIR}" -v "PORT_DIR=${MICROPY_PORT_DIR}" -v "BOARD_DIR=${MICROPY_BOARD_DIR}" -b "${CMAKE_BINARY_DIR}" -f${MICROPY_CROSS_FLAGS} ${MICROPY_FROZEN_MANIFEST}
         DEPENDS MICROPY_FORCE_BUILD
             ${MICROPY_QSTRDEFS_GENERATED}
         VERBATIM


Remove --64 when building zlib in seastar

Remove the default parameter --64 when building submodule zlib in seastar.

Change-Id: Id697626c7832d79f5d2e0fdef8a01886b368b209
Signed-off-by: Richael Zhuang <27c3a243e4707156d71fec975b5dfe67c92f729c@arm.com>
Message-Id: <20190124110425.281580-1-27c3a243e4707156d71fec975b5dfe67c92f729c@arm.com>

--- recipe/dev.cmake
+++ recipe/dev.cmake
@@ -123,7 +123,7 @@
   EXTERNAL_PROJECT_ARGS
     URL https://zlib.net/zlib-1.2.11.tar.gz
     URL_MD5 1c9f62f0778697a09d36121ead88e08e
-    CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --64
+    CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
     BUILD_COMMAND <DISABLE>
     INSTALL_COMMAND ${make_command} install)


test parallel mesh generation and adaptation

--- test/testing.cmake
+++ test/testing.cmake
@@ -77,4 +77,15 @@
   "ghost_4_.smb"
   "${MDIR}/ocean_QU_240km.nc"
   "mpas_part_")
+set(MDIR ${MESHES}/upright)
+add_test(parallel_meshgen
+  ${MPIRUN} ${MPIRUN_PROCFLAG} 4
+  generate
+  "${MDIR}/upright.smd"
+  "67k")
+add_test(adapt_meshgen
+  ${MPIRUN} ${MPIRUN_PROCFLAG} 4
+  ma_test
+  "${MDIR}/upright.smd"
+  "67k/")
 #todo - ph_test on crossflow, fusion (fan.cc), etc...


updates to .gitlab-ci.yml

updates to .gitlab-ci.yml

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -62,7 +62,6 @@
     RESULT_VARIABLE retcode)
   check_result()
 ENDMACRO()
-

 EXECUTE_PROCESS(
   COMMAND "wget" "http://10.123.110.90/CDash"


DOC: Improve FindDCMTK.cmake documentation

Adapter from commontk/CTK@33ade88b

Change-Id: I4b59127db20224ef40cb67c7b372e8a59f04821c

--- Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake
+++ Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake
@@ -1,9 +1,7 @@
-# adapted version of FindDCMTK, better suited for super-builds
-
 # - find DCMTK libraries and applications
-#
-
-#  DCMTK_INCLUDE_DIRS   - Directories to include to use DCMTK
+# The module defines the following variables:
+#
+#  DCMTK_INCLUDE_DIRS  - Directories to include to use DCMTK
 #  DCMTK_LIBRARIES     - Files to link against to use DCMTK
 #  DCMTK_FOUND         - If false, don't try to use DCMTK
 #  DCMTK_DIR           - (optional) Source directory for DCMTK
@@ -12,7 +10,90 @@
 # directories and compiled libraries if you've just compiled it in the
 # source tree. Just set it to the root of the tree where you extracted
 # the source (default to /usr/include/dcmtk/)
-
+#
+#
+# This file is able to find version of DCMTK that do or do not export
+# a DCMTKConfig.cmake file.
+#
+# IMPORTANT: A set of patches has been contributed to DCMTK
+# maintainers, as soon as:
+#   (1) it has been integrated upstream so that it is available in
+#   an official release (for example X.Y.Z),
+#   (2) code bases have been updated to build against X.Y.Z
+# This file could be removed.
+#
+# The set of patches is listed here: https://github.com/commontk/DCMTK/compare/79030ba...f461865
+#
+#
+# Waiting for this to happen, build systems will have to be able
+# to support different versions of DCMTK.
+#
+# On any given system, the following combination of DCMTK version could be
+# considered:
+#
+#         |   SYSTEM DCMTK      +      LOCAL DCMTK      |     Supported ?   |
+# ---------------------------------------------------------------------------
+# Case A  |   NA                +      [ ] DCMTKConfig  |         YES       |
+# ------------------------------------------------------|--------------------
+# Case B  |   NA                +      [X] DCMTKConfig  |         YES       |
+# ------------------------------------------------------|--------------------
+# Case C  |   [ ] DCMTKConfig   +      NA               |         YES       |
+# ------------------------------------------------------|--------------------
+# Case D  |   [X] DCMTKConfig   +      NA               |         YES       |
+# ------------------------------------------------------|--------------------
+# Case E  |   [ ] DCMTKConfig   +      [ ] DCMTKConfig  |         YES (*)   |
+# ------------------------------------------------------|--------------------
+# Case F  |   [X] DCMTKConfig   +      [ ] DCMTKConfig  |         NO        |
+# ------------------------------------------------------|--------------------
+# Case G  |   [ ] DCMTKConfig   +      [X] DCMTKConfig  |         YES       |
+# ------------------------------------------------------|--------------------
+# Case H  |   [X] DCMTKConfig   +      [X] DCMTKConfig  |         YES       |
+# ---------------------------------------------------------------------------
+#
+#  (*) See Troubleshooting section.
+#
+# Legend:
+#
+#   NA ...............: Means that no System or Local DCMTK is available
+#
+#   [ ] DCMTKConfig ..: Means that the version of DCMTK does NOT export a DCMTKConfig.cmake file.
+#
+#   [X] DCMTKConfig ..: Means that the version of DCMTK exports a DCMTKConfig.cmake file.
+#
+#
+#
+# In CTK commits 52d953 and 74b4b07, the FindDCMTK.cmake module has been updated to be able
+# to find both version of DCMTK ([ ] DCMTKConfig and [X] DCMTKConfig).
+#
+# It is a two steps process:
+#
+#   * Step 1:  Attempt to find DCMTK version providing a DCMTKConfig.cmake file. This is done
+#              with the help of ''
+#
+#   * Step 2:  If step 1 failed, rely on FindDCMTK.cmake to set DCMTK_* variables details below.
+#
+#
+#
+# Troubleshooting:
+#
+#    What to do if my project find a different version of DCMTK ?
+#
+#    Remove DCMTK entry from the CMake registry.
+#    Search for "CMake user package registry" on http://www.cmake.org/cmake/help/v2.8.9/cmake.html#command:find_package
+#
+#    Details: As some point, the DCMTK build tree was exported [1][2][3]. Indeed, before the set of
+#    patches discussed above has been contributed to upstream DCMTK, an initial implementation of
+#    a DCMTK build system exporting its build tree has been implemented and has been tested by some
+#    folks. This had the effect of populating the CMake registry.
+#
+#    Since Step1 does not exclude the CMake registry, when dealing with case E, the incorrect version of
+#    DCMTK could be found.
+#
+#    [1] http://slicer-devel.65872.n3.nabble.com/Packaging-seems-to-work-again-tp4028121p4028134.html
+#    [2] https://www.assembla.com/spaces/slicerrt/tickets/244-dcmtk_dir-vs--dcmtkconfig-cmake?comment=267984263#comment:267984263
+#    [3] http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:export
+#
+#
 #=============================================================================
 # Copyright 2004-2009 Kitware, Inc.
 # Copyright 2009-2010 Mathieu Malaterre <mathieu.malaterre@gmail.com>
@@ -37,7 +118,8 @@
 set(_SAVED_DCMTK_DIR ${DCMTK_DIR})

 #
-# First, try to use NO_MODULE
+# Step1: Attempt to find a version of DCMTK providing a DCMTKConfig.cmake file.
+#
 message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake")
 find_package(DCMTK QUIET NO_MODULE)
 if(DCMTK_FOUND
@@ -53,6 +135,11 @@

 # Restore the value reset by the previous call to 'find_package(DCMTK QUIET NO_MODULE)'
 set(DCMTK_DIR ${_SAVED_DCMTK_DIR} CACHE PATH "The directory containing a CMake configuration file for DCMTK." FORCE)
+
+
+#
+# Step2: Attempt to find a version of DCMTK that does NOT provide a DCMTKConfig.cmake file.
+#

 # prefer DCMTK_DIR over default system paths like /usr/lib
 if(DCMTK_DIR)


small fix

small fix

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

--- cmake/AddCXXCompileOptions.cmake
+++ cmake/AddCXXCompileOptions.cmake
@@ -177,7 +177,7 @@
 if (NOT DEFINED CMAKE_CXX_STANDARD)
   set(CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD_DEFAULT} CACHE INTERNAL "")
 else()
-  if ( "x${CMAKE_CXX_STANDARD}" STREQUAL "x98")
+  if ( NOT "x${CMAKE_CXX_STANDARD}" STREQUAL "x98")
     if ( ${CMAKE_CXX_STANDARD} LESS ${CMAKE_CXX_STANDARD_DEFAULT})
          message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++${CMAKE_CXX_STANDARD}.")
     endif()


cmake: RequireC++11: Set minimum GCC version to 4.6

--- cmake/Modules/RequireC++11.cmake
+++ cmake/Modules/RequireC++11.cmake
@@ -1,8 +1,8 @@
 # Make sure the current compiler has proper C++11 support
 if(CMAKE_COMPILER_IS_GNUCXX)
 	execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
-	if(GCC_VERSION VERSION_LESS 4.4.1)
-		message(FATAL_ERROR "You need GCC 4.4.1 or later")
+	if(GCC_VERSION VERSION_LESS 4.6)
+		message(FATAL_ERROR "You need GCC 4.6 or later")
 	endif()
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
 elseif(MSVC)


[cmake] Skip regex when CMAKE_STATIC_LIBRARY_PREFIX is empty.

In platforms like Windows, there's no prefix for static libraries.
Interpolating it in the regex will end up with a regex "^", which seems
not to be valid. Since the regex was removing the prefix, we can simply
skip the operation and the result will be the same.

Also do the same for CMAKE_STATIC_LIBRARY_SUFFIX, even if in that case,
Windows will have a value (but if it is empty, it will fail trying to
create the regex).

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -153,8 +153,12 @@
     add_library(${target}-static STATIC ${objs})
     add_dependencies(${target}-static ${AST_DEPENDS})
     get_filename_component(ast_output_bn ${AST_OUTPUT} NAME)
-    string(REGEX REPLACE "^${CMAKE_STATIC_LIBRARY_PREFIX}" "" ast_output_bn ${ast_output_bn})
-    string(REGEX REPLACE "${CMAKE_STATIC_LIBRARY_SUFFIX}$" "" ast_output_bn ${ast_output_bn})
+    if(NOT CMAKE_STATIC_LIBRARY_PREFIX STREQUAL "")
+      string(REGEX REPLACE "^${CMAKE_STATIC_LIBRARY_PREFIX}" "" ast_output_bn ${ast_output_bn})
+    endif()
+    if(NOT CMAKE_STATIC_LIBRARY_SUFFIX STREQUAL "")
+      string(REGEX REPLACE "${CMAKE_STATIC_LIBRARY_SUFFIX}$" "" ast_output_bn ${ast_output_bn})
+    endif()
     get_filename_component(ast_output_dn ${AST_OUTPUT} DIRECTORY)
     set_target_properties(${target}-static
                           PROPERTIES


CMake: sample-based-testing: verify that SHA1 hashes match.

They will be used in lnt integration for consistency checking.

--- cmake/sample-based-testing.cmake
+++ cmake/sample-based-testing.cmake
@@ -15,15 +15,24 @@

 foreach(STR ${_REFERENCE_SAMPLES})
   # There are two schemes:
-  #   <hash><space><space><filename>      <- read in text mode
-  #   <hash><space><asterisk><filename>   <- read in binary mode
-  # Which for our purpose means:
-  #   <40 chars><char><char><filename>    <- i.e. we just skip first 42 chars.
+  #   <40-char SHA1><space><space><filename>      <- read in text mode
+  #   <40-char SHA1><space><asterisk><filename>   <- read in binary mode
+  # We ignore read mode, so it becomes:
+  #   <40-char SHA1><char><char><filename>
+  string(SUBSTRING "${STR}" 0 40 SAMPLEHASH)
   string(SUBSTRING "${STR}" 42 -1 SAMPLENAME)
   set(SAMPLENAME "${RAWSPEED_REFERENCE_SAMPLE_ARCHIVE}/${SAMPLENAME}")

   if(NOT EXISTS "${SAMPLENAME}")
     message(SEND_ERROR "The sample \"${SAMPLENAME}\" does not exist!")
+  endif()
+
+  # Check the hash.
+  file(SHA1 "${SAMPLENAME}" ACTUALSAMPLEHASH)
+  string(COMPARE EQUAL "${ACTUALSAMPLEHASH}" "${SAMPLEHASH}" DOHASHESMATCH)
+  if(NOT "${DOHASHESMATCH}")
+    message(SEND_ERROR "SHA1 hash for sample \"${SAMPLENAME}\" mismatch!")
+    message(SEND_ERROR "${ACTUALSAMPLEHASH} instead of ${SAMPLEHASH}")
   endif()

   list(APPEND REFERENCE_SAMPLES "${SAMPLENAME}")


Update T265 FW to 0.0.18.4577

Update T265 FW to 0.0.18.4577

--- third-party/libtm/versions.cmake
+++ third-party/libtm/versions.cmake
@@ -4,8 +4,8 @@
 # If FW source = Remote - FW versions are defined below
 # If FW source = Local - FW versions are defined according to /resources/remote_versions.log
 # If FW source = Internal - FW versions are defined according to fw.h, CentralAppFw.h, CentralBlFw.h
-set(INTERNAL_HOST_VERSION "0.19.3.1428")
-set(INTERNAL_FW_VERSION "0.0.18.4386")
+set(INTERNAL_HOST_VERSION "0.19.3.1505")
+set(INTERNAL_FW_VERSION "0.0.18.4577")
 set(INTERNAL_CENTRAL_APP_VERSION "2.0.19.271")
 set(INTERNAL_CENTRAL_BL_VERSION "1.0.1.112")
 set(INTERNAL_FW_SOURCE "Remote" CACHE STRING "Select TM2 FW archive: Remote/Local (to avoid FW polling from remote server)")


Cosmetic change to .pc.cmake file

Cosmetic change to .pc.cmake file

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

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


SVN_SILENT made messages (.desktop file)

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -32,6 +32,7 @@
 Name[pt_BR]=VLC
 Name[ro]=VLC
 Name[ru]=VLC
+Name[sl]=VLC
 Name[sr]=ВЛЦ
 Name[sr@ijekavian]=ВЛЦ
 Name[sr@ijekavianlatin]=VLC
@@ -66,6 +67,7 @@
 Comment[pt_BR]=Infraestrutura do VLC para o Phonon
 Comment[ro]=Suportul VLC pentru Phonon
 Comment[ru]=Механизм VLC для Phonon
+Comment[sl]=Zaledje VLC za Phonon
 Comment[sr]=ВЛЦ као позадина Фонона
 Comment[sr@ijekavian]=ВЛЦ као позадина Фонона
 Comment[sr@ijekavianlatin]=VLC kao pozadina Phonona


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -26,6 +26,7 @@
 Name[nb]=VLC
 Name[nl]=VLC
 Name[nn]=VLC
+Name[pl]=VLC
 Name[pt_BR]=VLC
 Name[sk]=VLC
 Name[sr]=ВЛЦ
@@ -53,6 +54,7 @@
 Comment[nb]=Phonon VLC-motor
 Comment[nl]=VLC-backend van Phonon
 Comment[nn]=VLC-motor for Phonon
+Comment[pl]=Silnik VLC Phonona
 Comment[pt_BR]=Infraestrutura VLC do Phonon
 Comment[sk]=Backend Phonon VLC
 Comment[sr]=ВЛЦ као позадина Фонона


Revert conan BUILD tag to missing

Revert conan BUILD tag to missing

Former-commit-id: 9608e784db4840637c46f9f182d8a0630938bdbf

--- cmake-modules/SetupDependenciesConan.cmake
+++ cmake-modules/SetupDependenciesConan.cmake
@@ -128,8 +128,7 @@
                 PROFILE_AUTO ALL
                 ${DMRG_CONAN_OPTIONS}
                 KEEP_RPATHS
-#                BUILD missing
-                BUILD glog
+                BUILD missing
         )

     endif()


Use Itk 4.5.2

Use Itk 4.5.2

--- cmake/externals/projects_modules/ITK.cmake
+++ cmake/externals/projects_modules/ITK.cmake
@@ -49,7 +49,7 @@
 ## Define repository where get the sources
 ## #############################################################################

-set(tag "v4.5.0")
+set(tag "v4.5.2")
 if (NOT DEFINED ${ep}_SOURCE_DIR)
     set(location GIT_REPOSITORY "git://itk.org/ITK.git" GIT_TAG ${tag})
 endif()


Perform clean up to ensure the headers are correctly "installed".

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -1723,6 +1723,9 @@
                 # Source is a directory
                 if (ARG_USE_FILE_SYMLINK OR ARG_ACCUMULATE)
                     # Use file symlink for each individual files in the source directory
+                    if (IS_SYMLINK ${ARG_DESTINATION})
+                        execute_process (COMMAND ${CMAKE_COMMAND} -E remove ${ARG_DESTINATION})
+                    endif ()
                     set (GLOBBING_EXPRESSION RELATIVE ${INSTALL_SOURCE})
                     if (ARG_FILES_MATCHING)
                         foreach (PATTERN ${ARG_PATTERN})
@@ -1745,6 +1748,9 @@
                     endforeach ()
                 else ()
                     # Use a single symlink pointing to the source directory
+                    if (NOT IS_SYMLINK ${ARG_DESTINATION})
+                        execute_process (COMMAND ${CMAKE_COMMAND} -E remove_directory ${ARG_DESTINATION})
+                    endif ()
                     create_symlink (${INSTALL_SOURCE} ${ARG_DESTINATION} FALLBACK_TO_COPY)
                 endif ()
             else ()


CMake: Actually use PORD_LIBERARY in FindMUMPS.cmake, next try to fix issue 60...

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

--- deal.II/cmake/modules/FindMUMPS.cmake
+++ deal.II/cmake/modules/FindMUMPS.cmake
@@ -89,6 +89,7 @@
   SET(MUMPS_LIBRARIES
     ${DMUMPS_LIBRARY}
     ${MUMPS_COMMON_LIBRARY}
+    ${PORD_LIBRARY}
     ${SCALAPACK_LIBRARIES}
     ${MPI_CXX_LIBRARIES} # For good measure
     )


show property correctly tackle empty string

--- reason.util.cmake
+++ reason.util.cmake
@@ -163,7 +163,7 @@

   function(reason_show_target_properties_one LEVEL TARGET_NAME PROP_NAME)
     get_target_property(props "${TARGET_NAME}" "${PROP_NAME}")
-    if((NOT "${props}" STREQUAL "props-NOTFOUND") AND ("${props}"))
+    if((NOT "${props}" STREQUAL "props-NOTFOUND") AND (NOT "${props}" STREQUAL ""))
       reason_message("${LEVEL}" "  ${PROP_NAME}:")
       foreach(prop IN LISTS props)
         reason_message("${LEVEL}" "    ${prop}")


Change the CDash project start time to UTC.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,5 +1,5 @@
 set(CTEST_PROJECT_NAME "cython-cmake-example")
-set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
+set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "my.cdash.org")


Delete CTestConfig.cmake

Delete CTestConfig.cmake

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,7 +0,0 @@
-set(CTEST_PROJECT_NAME "rtimdb")
-set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
-
-set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "192.168.200.87")
-set(CTEST_DROP_LOCATION "/cdash/submit.php?project=rtimdb")
-set(CTEST_DROP_SITE_CDASH TRUE)


Removing CTestConfig.cmake temporarily to see if that makes a change with the builds scheduled through the website.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,25 +0,0 @@
-# CTest/CDash configuration
-IF(USE_REMOTE_CDASH)
-	set(CTEST_PROJECT_NAME "NetCDF-C")
-	set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
-	set(CTEST_SITE "Unidata OSX")
-	set(CTEST_DROP_METHOD "http")
-	set(CTEST_DROP_SITE "my.cdash.org")
-	set(CTEST_DROP_LOCATION "/submit.php?project=NetCDF-C")
-	set(CTEST_DROP_SITE_CDASH TRUE)
-ELSEIF(BUILDING_TRUNK)
-	SET (CTEST_DROP_METHOD "http")
-	SET (CTEST_DROP_SITE "yakov.unidata.ucar.edu/")
-	SET (CTEST_DROP_LOCATION "CDash/submit.php?project=netCDF")
-	SET (CTEST_DROP_SITE_CDASH TRUE)
-ELSEIF(WORKING_FROM_HOME)
-	SET (CTEST_DROP_METHOD "http")
-	SET (CTEST_DROP_SITE "localhost:4111/")
-	SET (CTEST_DROP_LOCATION "CDash/submit.php?project=WinNETCDF")
-	SET (CTEST_DROP_SITE_CDASH TRUE)
-ELSE()
-	SET (CTEST_DROP_METHOD "http")
-	SET (CTEST_DROP_SITE "yakov.unidata.ucar.edu/")
-	SET (CTEST_DROP_LOCATION "CDash/submit.php?project=WinNETCDF")
-	SET (CTEST_DROP_SITE_CDASH TRUE)
-ENDIF()


refs #4871 don't run some long tests all the time

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@52094 c7de825b-a66e-492c-adef-691d508d4ae1

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -195,12 +195,18 @@
   ft/upgrade_test_simple
   ydb/checkpoint_1.tdb
   ydb/checkpoint_stress.tdb
+  ydb/hotindexer-with-queries.tdb
   ydb/hot-optimize-table-tests.tdb
-  ydb/hotindexer-with-queries.tdb
+  ydb/loader-cleanup-test0.tdb
+  ydb/loader-cleanup-test0z.tdb
+  ydb/loader-cleanup-test2.tdb
+  ydb/loader-cleanup-test2z.tdb
   ydb/loader-stress-test4.tdb
+  ydb/loader-stress-test4z.tdb
   ydb/manyfiles.tdb
   ydb/preload-db-nested.tdb
   ydb/recover_stress.tdb
+  ydb/recovery_fileops_unit.tdb
   ydb/root_fifo_1.tdb
   ydb/root_fifo_2.tdb
   ydb/root_fifo_31.tdb


honor 3.6 and 3.7 target properties upon generating unity target

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -3069,7 +3069,8 @@
 		POSITION_INDEPENDENT_CODE
 		C_COMPILER_LAUNCHER CXX_COMPILER_LAUNCHER
 		C_INCLUDE_WHAT_YOU_USE CXX_INCLUDE_WHAT_YOU_USE
-		C_VISIBILITY_PRESET CXX_VISIBILITY_PRESET VISIBILITY_INLINES_HIDDEN)
+		C_VISIBILITY_PRESET CXX_VISIBILITY_PRESET VISIBILITY_INLINES_HIDDEN
+		C_CLANG_TIDY CXX_CLANG_TIDY)
 	# copy compile features
 	cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
 		C_EXTENSIONS C_STANDARD C_STANDARD_REQUIRED
@@ -3092,7 +3093,8 @@
 		LINK_INTERFACE_MULTIPLICITY LINK_INTERFACE_MULTIPLICITY_<CONFIG>
 		LINK_SEARCH_START_STATIC LINK_SEARCH_END_STATIC
 		STATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_<CONFIG>
-		NO_SONAME SOVERSION VERSION)
+		NO_SONAME SOVERSION VERSION
+		LINK_WHAT_YOU_USE)
 	# copy cmake stuff
 	cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
 		IMPLICIT_DEPENDS_INCLUDE_TRANSFORM RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK)
@@ -3115,7 +3117,9 @@
 		VS_SCC_AUXPATH VS_SCC_LOCALPATH VS_SCC_PROJECTNAME VS_SCC_PROVIDER
 		VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION
 		VS_WINRT_COMPONENT VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES
-		WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS)
+		WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS
+		DEPLOYMENT_REMOTE_DIRECTORY VS_CONFIGURATION_TYPE
+		VS_SDK_REFERENCES)
 	# copy Android platform specific stuff
 	cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
 		ANDROID_API ANDROID_API_MIN ANDROID_GUI


start 1.7.3

start 1.7.3

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -95,6 +95,7 @@

 set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}")
 set (COTIRE_CMAKE_MODULE_VERSION "1.7.2")
+set (COTIRE_CMAKE_MODULE_VERSION "1.7.3")

 include(CMakeParseArguments)
 include(ProcessorCount)


start 1.7.4

start 1.7.4

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -42,6 +42,9 @@
 	cmake_policy(POP)
 endif()

+set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}")
+set (COTIRE_CMAKE_MODULE_VERSION "1.7.4")
+
 # activate select policies
 if (POLICY CMP0038)
 	# targets may not link directly to themselves
@@ -92,9 +95,6 @@
 	# only interpret if() arguments as variables or keywords when unquoted
 	cmake_policy(SET CMP0054 NEW)
 endif()
-
-set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}")
-set (COTIRE_CMAKE_MODULE_VERSION "1.7.3")

 include(CMakeParseArguments)
 include(ProcessorCount)


ENH: superbuild: missing dependencies handling

--- SuperBuild/CMake/External_opencv.cmake
+++ SuperBuild/CMake/External_opencv.cmake
@@ -13,11 +13,18 @@
   SETUP_SUPERBUILD(PROJECT ${proj})
   message(STATUS "  Using OpenCV SuperBuild version")

-  #TODO: add these properly
-  # list(APPEND ${proj}_DEPENDENCIES TIFF)
-  # list(APPEND ${proj}_DEPENDENCIES ZLIB)
-  # list(APPEND ${proj}_DEPENDENCIES PNG)
-  # list(APPEND ${proj}_DEPENDENCIES JPEG)
+  # declare dependencies
+  set(${proj}_DEPENDENCIES ZLIB TIFF PNG)
+  INCLUDE_SUPERBUILD_DEPENDENCIES(${${proj}_DEPENDENCIES})
+  # set proj back to its original value
+  set(proj OPENCV)
+
+  ADD_SUPERBUILD_CMAKE_VAR(ZLIB_INCLUDE_DIR)
+  ADD_SUPERBUILD_CMAKE_VAR(ZLIB_LIBRARY)
+  ADD_SUPERBUILD_CMAKE_VAR(TIFF_INCLUDE_DIR)
+  ADD_SUPERBUILD_CMAKE_VAR(TIFF_LIBRARY)
+  ADD_SUPERBUILD_CMAKE_VAR(PNG_INCLUDE_DIR)
+  ADD_SUPERBUILD_CMAKE_VAR(PNG_LIBRARY)

   ExternalProject_Add(${proj}
     PREFIX ${proj}
@@ -69,6 +76,7 @@
       -DBUILD_opencv_video:BOOL=OFF
       -DBUILD_opencv_videostab:BOOL=OFF
       -DBUILD_opencv_world:BOOL=OFF
+      ${OPENCV_SB_CONFIG}
     DEPENDS ${${proj}_DEPENDENCIES}
     )


CMake: use upstream find script for Freetype

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -1,61 +0,0 @@
-#-------------------------------------------------------------------
-# This file is part of the CMake build system for OGRE
-#     (Object-oriented Graphics Rendering Engine)
-# For the latest info, see http://www.ogre3d.org/
-#
-# The contents of this file are placed in the public domain. Feel
-# free to make use of it in any way you like.
-#-------------------------------------------------------------------
-
-# - Try to find FreeType
-# Once done, this will define
-#
-#  FREETYPE_FOUND - system has FreeType
-#  FREETYPE_INCLUDE_DIRS - the FreeType include directories
-#  FREETYPE_LIBRARIES - link these to use FreeType
-
-include(FindPkgMacros)
-findpkg_begin(FREETYPE)
-
-# Get path, convert backslashes as ${ENV_${var}}
-getenv_path(FREETYPE_HOME)
-
-# construct search paths
-set(FREETYPE_PREFIX_PATH ${FREETYPE_HOME} ${ENV_FREETYPE_HOME})
-create_search_paths(FREETYPE)
-# redo search if prefix path changed
-clear_if_changed(FREETYPE_PREFIX_PATH
-  FREETYPE_LIBRARY_FWK
-  FREETYPE_LIBRARY_REL
-  FREETYPE_LIBRARY_DBG
-  FREETYPE_INCLUDE_DIR
-)
-
-set(FREETYPE_LIBRARY_NAMES freetype253 freetype252 freetype251 freetype2501 freetype250 freetype2412 freetype2411 freetype2410 freetype249 freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
-get_debug_names(FREETYPE_LIBRARY_NAMES)
-
-use_pkgconfig(FREETYPE_PKGC freetype2)
-
-# prefer static library over framework
-set(CMAKE_FIND_FRAMEWORK "LAST")
-
-message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
-findpkg_framework(FREETYPE)
-message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
-
-find_path(FREETYPE_INCLUDE_DIR NAMES freetype.h freetype/freetype.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES freetype2)
-find_path(FREETYPE_FT2BUILD_INCLUDE_DIR NAMES ft2build.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES freetype2)
-
-find_library(FREETYPE_LIBRARY_REL NAMES ${FREETYPE_LIBRARY_NAMES} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
-find_library(FREETYPE_LIBRARY_DBG NAMES ${FREETYPE_LIBRARY_NAMES_DBG} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug)
-
-make_library_set(FREETYPE_LIBRARY)
-
-findpkg_finish(FREETYPE)
-mark_as_advanced(FREETYPE_FT2BUILD_INCLUDE_DIR)
-if (NOT FREETYPE_FT2BUILD_INCLUDE_DIR STREQUAL FREETYPE_INCLUDE_DIR)
-  set(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${FREETYPE_FT2BUILD_INCLUDE_DIR})
-endif ()
-
-# Reset framework finding
-set(CMAKE_FIND_FRAMEWORK "FIRST")


fix variable ownership

fix variable ownership

--- VigraAddDep.cmake
+++ VigraAddDep.cmake
@@ -209,7 +209,7 @@
   # to find_package_plus(). These variables are stored in a variable called VAD_NEW_VARS_${_VAD_NAME}, which we will
   # also remove.
   foreach(_NEWVAR ${VAD_NEW_VARS_${_VAD_NAME}})
-    if (VAD_${_NEWVAR}_RESET_OWNER STREQUAL ${_VAD_NAME})
+    if ("${VAD_${_NEWVAR}_RESET_OWNER}" STREQUAL "${_VAD_NAME}")
       unset(${_NEWVAR} CACHE)
       unset(${_NEWVAR})
     else()


close to working matlabroot logic

close to working matlabroot logic

--- cmake/mex.cmake
+++ cmake/mex.cmake
@@ -28,7 +28,13 @@
   if ( NOT matlab )
      message(FATAL_ERROR "Could not find matlab executable")
   endif()
-  execute_process(COMMAND ${matlab} -n COMMAND grep -e "MATLAB \\+=" COMMAND cut -d "=" -f2 OUTPUT_VARIABLE _matlab_root)
+  if ( CYGWIN )
+    # matlab -n is not supported on windows (asked matlab for a work-around)
+    execute_process(COMMAND ${matlab} -nosplash -nojvm -r "h=fopen('.matlabroot','w'); fprintf(h,'MATLAB = %s\\n',matlabroot); fclose(h); exit" WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
+    execute_process(COMMAND grep -e "MATLAB \\+=" ${CMAKE_BINARY_DIR}/.matlabroot COMMAND cut -d "=" -f2 OUTPUT_VARIABLE _matlab_root)
+  else()
+    execute_process(COMMAND ${matlab} -n COMMAND grep -e "MATLAB \\+=" COMMAND cut -d "=" -f2 OUTPUT_VARIABLE _matlab_root)
+  endif()
   if (NOT _matlab_root)
     message(FATAL_ERROR "Failed to extract MATLAB_ROOT from running matlab -n")
   endif()


Renamed dependency on crunch_base to crunch.base

--- configure.cmake
+++ configure.cmake
@@ -3,7 +3,7 @@

 vpm_depend(
   boost
-  crunch_base)
+  crunch.base)

 vpm_include_directories(${CMAKE_CURRENT_LIST_DIR}/include)


ENH: put all libraries and exe in lib and bin for unix as well as win32

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -106,8 +106,6 @@
   LINK_LIBRARIES(${CMAKE_THREAD_LIBS} ${CMAKE_DL_LIBS} -lm)
 ENDIF (UNIX)

-IF (WIN32)
-  SET (LIBRARY_OUTPUT_PATH ${VTK_BINARY_DIR}/lib/ CACHE PATH "Single output directory for building all libraries.")
-  SET (EXECUTABLE_OUTPUT_PATH ${VTK_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all executables.")
-ENDIF (WIN32)
+SET (LIBRARY_OUTPUT_PATH ${VTK_BINARY_DIR}/lib/ CACHE PATH "Single output directory for building all libraries.")
+SET (EXECUTABLE_OUTPUT_PATH ${VTK_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all executables.")


Allow multiple files for find_file

Allow multiple files for find_file

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -8,7 +8,7 @@
 #
 # Input variables
 #    ${UPPER_PROJECT_NAME}_DEPENDENT_LIBRARIES - A list of dependent link libraries, format is ${CMAKE_PROJECT_NAME}
-#    ${UPPER_PROJECT_NAME}_FIND_FILE - A file to find if no library is produced
+#    ${UPPER_PROJECT_NAME}_FIND_FILES - A list of files to find if no libraries are produced
 #
 # Output variables
 #    ${UPPER_PROJECT_NAME}_FOUND - Was the project and all of the specified components found?
@@ -53,7 +53,7 @@
   "\n"
 # add dependent library finding
   "@DEPENDENTS@"
-  "set(${UPPER_PROJECT_NAME}_FIND_FILE ${${UPPER_PROJECT_NAME}_FIND_FILE})\n"
+  "set(${UPPER_PROJECT_NAME}_FIND_FILES ${${UPPER_PROJECT_NAME}_FIND_FILES})\n"
   "if(NOT _fail)\n"
 # setup VERSION, INCLUDE_DIRS and DEB_DEPENDENCIES
   "  set(${UPPER_PROJECT_NAME}_VERSION ${VERSION})\n"
@@ -88,12 +88,12 @@
   "        list(APPEND ${UPPER_PROJECT_NAME}_COMPONENTS \${_component})\n"
   "      endif()\n"
   "    endforeach()\n"
-# search for ${UPPER_PROJECT_NAME}_FIND_FILE
-  "  elseif(${UPPER_PROJECT_NAME}_FIND_FILE)\n"
-  "    find_file(${UPPER_PROJECT_NAME}_FILE ${${UPPER_PROJECT_NAME}_FIND_FILE} NO_DEFAULT_PATH\n"
+# search for ${UPPER_PROJECT_NAME}_FIND_FILES
+  "  elseif(${UPPER_PROJECT_NAME}_FIND_FILES)\n"
+  "    find_file(${UPPER_PROJECT_NAME}_FILE NAMES ${${UPPER_PROJECT_NAME}_FIND_FILES} NO_DEFAULT_PATH\n"
   "              PATHS \${${CMAKE_PROJECT_NAME}_PREFIX_DIR} PATH_SUFFIXES include)\n"
   "    if(${UPPER_PROJECT_NAME}_FILE MATCHES \"${UPPER_PROJECT_NAME}_FILE-NOTFOUND\")\n"
-  "      set(_fail \"${${UPPER_PROJECT_NAME}_FIND_FILE} not found\")\n"
+  "      set(_fail \"${${UPPER_PROJECT_NAME}_FIND_FILES} not found\")\n"
   "      if(_out)\n"
   "        message(\${_output_type} \"   Missing the ${CMAKE_PROJECT_NAME} \"\n"
   "          \"file in \${${CMAKE_PROJECT_NAME}_PREFIX_DIR}/include.\")\n"