work in progress on ios build-system

work in progress on ios build-system

--- build/toolchains/iOS.cmake
+++ build/toolchains/iOS.cmake
@@ -29,15 +29,16 @@
     -fobjc-arc
     -isysroot ${CMAKE_IOS_SDK_ROOT}")

-if(${SIMULATOR})
+if(${IOS_PLATFORM} STREQUAL "SIMULATOR")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mios-simulator-version-min=6.0")
+    set(ARCH "i386")
 endif()

 set(FRAMEWORKS CoreGraphics CoreFoundation QuartzCore UIKit OpenGLES)

-foreach(_framework ${FRAMEWORKS})
-    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework ${_framework}")
-endforeach()
+#foreach(_framework ${FRAMEWORKS})
+#    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework ${_framework}")
+#endforeach()

 set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.mapzen.\${PRODUCT_NAME:Tangram}")
 set(APP_TYPE MACOSX_BUNDLE)
@@ -49,7 +50,8 @@
 add_subdirectory("${INCLUDE_CORE_DIR}/glm")

 include_directories(${INCLUDE_CORE_DIR}/json)
-include_directories(${PROJECT_SOURCE_DIR}/core/include/)
+include_directories(${INCLUDE_CORE_DIR})
+
 find_sources_and_include_directories(
     ${PROJECT_SOURCE_DIR}/core/src/*.h
     ${PROJECT_SOURCE_DIR}/core/src/*.cpp)
@@ -58,14 +60,21 @@
 set(IOS_EXTENSIONS_FILES *.mm *.cpp *.m)
 foreach(_ext ${IOS_EXTENSIONS_FILES})
     find_sources_and_include_directories(
-        ${PROJECT_SOURCE_DIR}/ios/*.h
-        ${PROJECT_SOURCE_DIR}/ios/${_ext})
+        ${PROJECT_SOURCE_DIR}/ios/src/*.h
+        ${PROJECT_SOURCE_DIR}/ios/src/${_ext})
 endforeach()
+
+# curl
+if(${IOS_PLATFORM} STREQUAL "SIMULATOR")
+    # message(STATUS "Target = Simulator, including curl from osx includes: ${PROJECT_SOURCE_DIR}/osx/include/")
+    include_directories(${PROJECT_SOURCE_DIR}/ios/include/)
+endif()

 # link and build functions
 function(link_libraries)
-    # check_and_link_libraries(${EXECUTABLE_NAME} curl)
-    # target_link_libraries(${EXECUTABLE_NAME} core)
+    if(${IOS_PLATFORM} STREQUAL "SIMULATOR")
+        target_link_libraries(${EXECUTABLE_NAME} ${CMAKE_SOURCE_DIR}/ios/precompiled/libcurl.a)
+    endif()

     foreach(_framework ${FRAMEWORKS})
         add_framework(${_framework} ${EXECUTABLE_NAME} ${CMAKE_SYSTEM_FRAMEWORK_PATH})
@@ -78,4 +87,6 @@
     set_xcode_property(json GCC_GENERATE_DEBUGGING_SYMBOLS YES)
     set_xcode_property(${EXECUTABLE_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS YES)
     set_xcode_property(${EXECUTABLE_NAME} SUPPORTED_PLATFORMS "iphonesimulator iphoneos")
+    set_xcode_property(${EXECUTABLE_NAME} ONLY_ACTIVE_ARCH "NO")
+    set_xcode_property(${EXECUTABLE_NAME} VALID_ARCHS "${ARCH}")
 endfunction()


cmake: Fix windows configuration failure

This commit fixes the following error:

1>  CMake Error at Common.cmake:17 (set_property):
1>    set_property could not find CACHE variable CMAKE_BUILD_TYPE.  Perhaps it
1>    has not yet been created.
1>  Call Stack (most recent call first):
1>    CMakeLists.txt:22 (include)

--- Common.cmake
+++ Common.cmake
@@ -1,3 +1,13 @@
+#-----------------------------------------------------------------------------
+# Set a default build type if none was specified
+#-----------------------------------------------------------------------------
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+  message(STATUS "Setting build type to 'Release' as none was specified.")
+  set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
+  # Set the possible values of build type for cmake-gui
+  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
+endif()
+
 include(CMakeDependentOption)
 #-----------------------------------------------------------------------------
 enable_language(C)
@@ -13,11 +23,7 @@
 mark_as_advanced(INSTALL_DEVELOPMENT_${LOCAL_PROJECT_NAME})

 set(ITK_VERSION_MAJOR 4 CACHE STRING "Choose the expected ITK major version to build DTIPrep (3 or 4).")
-# Set the possible values of ITK major version for cmake-gui
-set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
-if(NOT ${ITK_VERSION_MAJOR} STREQUAL "3" AND NOT ${ITK_VERSION_MAJOR} STREQUAL "4")
-  message(FATAL_ERROR "ITK_VERSION_MAJOR should be either 3 or 4")
-endif()
+

 set(USE_ITKv3 OFF)
 set(USE_ITKv4 ON)
@@ -56,15 +62,6 @@
   if (DARWIN_MAJOR_VERSION LESS "9")
     message(FATAL_ERROR "Only Mac OSX >= 10.5 are supported !")
   endif()
-endif()
-
-#-----------------------------------------------------------------------------
-# Set a default build type if none was specified
-if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
-  message(STATUS "Setting build type to 'Release' as none was specified.")
-  set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
-  # Set the possible values of build type for cmake-gui
-  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
 endif()

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


vigra.cmake: Added cache variable for vigra thread implementation setting.

--- vigra.cmake
+++ vigra.cmake
@@ -49,11 +49,15 @@
     set(VIGRA_UPDATE_COMMAND git fetch origin && git checkout ${VIGRA_VERSION})
 endif()

+
 if (APPLE)
-    set(VIGRA_THREAD_SETTING "-DWITH_BOOST_THREAD=1")
+	set (DEFAULT_VIGRA_WITH_BOOST_THREAD 1)
 else()
-    set(VIGRA_THREAD_SETTING "")
+	set (DEFAULT_VIGRA_WITH_BOOST_THREAD 0)
 endif()
+set(VIGRA_WITH_BOOST_THREAD ${DEFAULT_VIGRA_WITH_BOOST_THREAD}
+	CACHE BOOL "Build Vigra with boost-thread instead of std c++11 thread")
+set(VIGRA_THREAD_SETTING "-DWITH_BOOST_THREAD=${VIGRA_WITH_BOOST_THREAD}")

 message ("Installing ${vigra_NAME}/${VIGRA_VERSION} into FlyEM build area: ${BUILDEM_DIR} ...")
 ExternalProject_Add(${vigra_NAME}


glew use script: note possible system library deps

--- projects/use/usexp-glew-config.cmake
+++ projects/use/usexp-glew-config.cmake
@@ -17,7 +17,7 @@
   set(${PRJ}_LIBRARIES GLEW::glew_s) # GLEW::glewmx_s TODO determine if glewmx is needed
   list(APPEND reqVars ${PRJ}_LIBRARIES)
 elseif(MSVC) # pre-built
-  set(${PRJ}_LIBRARIES glew32)
+  set(${PRJ}_LIBRARIES glew32) # TODO opengl32 glu32 system libraries?
   set(${PRJ}_DLLS
     ${XP_ROOTDIR}/lib/glew32.dll
     ${XP_ROOTDIR}/lib/glew32mx.dll # TODO determine if this is needed


Fixed a bug in ClanyUtilities.cmake

Fixed a bug in ClanyUtilities.cmake

--- cmake/ClanyUtilities.cmake
+++ cmake/ClanyUtilities.cmake
@@ -2,25 +2,25 @@
   set(VERSION_STRING ${REQUIRED_VERSION})
   set(COMPILER_STRING ${COMPILER})

-  if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+  if(${COMPILER} STREQUAL "GNU")
     set(COMPILER_STRING "GCC")
   endif()

   if(${COMPILER} STREQUAL "MSVC")
-    if(${REQUIRED_VERSION} STREQUAL 2013)
+    if(REQUIRED_VERSION EQUAL 2013)
       set(REQUIRED_VERSION 18)
-    elseif(${REQUIRED_VERSION} STREQUAL 2012)
+    elseif(REQUIRED_VERSION EQUAL 2012)
       set(REQUIRED_VERSION 17)
-    elseif(${REQUIRED_VERSION} STREQUAL 2010)
+    elseif(REQUIRED_VERSION EQUAL 2010)
       set(REQUIRED_VERSION 16)
-    elseif(${REQUIRED_VERSION} STREQUAL 2008)
+    elseif(REQUIRED_VERSION EQUAL 2008)
       set(REQUIRED_VERSION 15)
     else()
       message(FATAL_ERROR "Unknown MSVC version: ${VERSION_STRING}")
     endif()
   endif()

-  if(CMAKE_CXX_COMPILER_ID STREQUAL COMPILER)
+  if(${CMAKE_CXX_COMPILER_ID} STREQUAL ${COMPILER})
     if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${REQUIRED_VERSION})
       message(FATAL_ERROR "${COMPILER_STRING} version need to be at leaset ${VERSION_STRING}")
     endif()
@@ -39,5 +39,3 @@
   set(OpenCV_DIR         ${LIBS_DIR}/OpenCV                PARENT_SCOPE)
   set(FFTW_ROOT          ${LIBS_DIR}/FFTW                  PARENT_SCOPE)
 endfunction()
-
-function(add_qt )


Squashed '3rdparty/github/cmake-utils/' changes from c219386..372b25c

372b25c MyPackageCheck.cmake: Support of eventual TARGET_TEST_CMAKE_COMMAND

git-subtree-dir: 3rdparty/github/cmake-utils
git-subtree-split: 372b25c607b531fd93f9c12d2a1c89f32a97d320

--- cmake/MyPackageCheck.cmake
+++ cmake/MyPackageCheck.cmake
@@ -33,9 +33,14 @@
     ENDFOREACH ()
   ENDIF ()

+  IF (NOT ("x${TARGET_TEST_CMAKE_COMMAND}" STREQUAL "x"))
+    GET_FILENAME_COMPONENT(_target_test_cmake_command ${TARGET_TEST_CMAKE_COMMAND} ABSOLUTE)
+  ELSE ()
+    SET (_target_test_cmake_command "")
+  ENDIF ()
   FOREACH (_name ${name} ${name}_static)
     ADD_TEST (NAME ${_name}
-      COMMAND ${CMAKE_COMMAND} -E env "PATH=${_test_path}" $<TARGET_FILE:${_name}> ${ARGN}
+      COMMAND ${CMAKE_COMMAND} -E env "PATH=${_test_path}" ${_target_test_cmake_command} $<TARGET_FILE:${_name}> ${ARGN}
       WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH})
     ADD_DEPENDENCIES(check ${_name})
   ENDFOREACH ()


rpath fix for linux (again)

rpath fix for linux (again)

--- cmake/TorchPathsInit.cmake
+++ cmake/TorchPathsInit.cmake
@@ -21,6 +21,7 @@
   OPTION(WITH_RPATH "Build libraries with executable rpaths" ON)

   IF(WITH_RPATH)
+    SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
     FILE(RELATIVE_PATH Torch_INSTALL_BIN2LIB
       "${Torch_INSTALL_BIN}" "${Torch_INSTALL_LIB}")
     IF(APPLE)


update doc on CFG_EXTRAS (#353)

update doc on CFG_EXTRAS (#353)

--- cmake/catkin_package.cmake
+++ cmake/catkin_package.cmake
@@ -36,11 +36,15 @@
 # :param CFG_EXTRAS: a CMake file containing extra stuff that should
 #   be accessible to users of this package after
 #   ``find_package``\ -ing it.  This file must live in the
-#   subdirectory ``cmake`` and must have the additional extension
-#   ``.in`` (since it is expanded using CMake's ``configure_file()``).
-#   The template can distinguish between build- and installspace
-#   using the boolean variables ``DEVELSPACE`` and ``INSTALLSPACE``
-#   and should be verified to work in both cases.
+#   subdirectory ``cmake``.  Various additional extension are possible:
+#   for a plain cmake file just ``.cmake``, for files expanded using
+#   CMake's ``configure_file()`` use ``.cmake.in`` or for files expanded
+#   by empy use ``.cmake.em``.  The templates can distinguish between
+#   devel- and installspace using the boolean variables ``DEVELSPACE``
+#   and ``INSTALLSPACE``.  For em templated files it is also possible to
+#   use the extensions ``.cmake.develspace.em`` or
+#   ``.cmake.installspace.em`` to generate the files only for a specific
+#   case.
 # :type CFG_EXTRAS: string
 #
 # Example:
@@ -51,7 +55,7 @@
 #     LIBRARIES projlib1 projlib2
 #     CATKIN-DEPENDS roscpp
 #     DEPENDS Eigen
-#     CFG_EXTRAS proj-extras.cmake
+#     CFG_EXTRAS proj-extras[.cmake|.cmake.in|.cmake(.develspace|.installspace)?.em]
 #   )
 #
 # @public


Changed the check on bash shell: if not found, only a warning

svn path=/trunk/; revision=7272

--- cmake/modules/plplot.cmake
+++ cmake/modules/plplot.cmake
@@ -64,18 +64,15 @@
 endif(SH_EXECUTABLE)

 if(NOT SH_EXECUTABLE)
-   message(STATUS
-   "WARNING: shell not found, disabling ctest and install tree examples tests"
-   )
-   set(BUILD_TEST OFF
-   CACHE BOOL "Compile examples in the build tree and enable ctest" FORCE
+   message(STATUS
+   "WARNING: bash shell not found, ctest will not work properly"
    )
 endif(NOT SH_EXECUTABLE)

 option(PREBUILD_DIST "Pre-build all components required for distribution" OFF)
 if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
   set(
-  PREBUILD_DIST OFF CACHE INTERNAL
+  PREBUILD_DIST OFF CACHE INTERNAL
   "Pre-build all components required for distribution"
   )
 endif(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")


qi_create_lib: improve doc

qi_create_lib: improve doc

Change-Id: I99d8030fffe40db76e8ecf2185621af256a7cae6
Reviewed-on: http://gerrit.aldebaran.lan:8080/18093
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/target.cmake
+++ cmake/qibuild/target.cmake
@@ -148,6 +148,8 @@
 #
 # The target name should be unique.
 #
+# **Static vs shared**
+#
 # To build a module (library loaded at runtime), use::
 #
 #   qi_create_lib(myLib MODULE SRC ....)
@@ -172,6 +174,19 @@
 # everything in static by default.
 #
 # Warning ! This is quite not the standard CMake behavior
+#
+# **Internal libs**
+#
+# If you use ``INTERNAL``, you will not be able to use the library after it
+# has been installed, even after ``qi_stage_lib()`` has been called
+#
+# Note that you may want to:
+#
+# * make sure no header install rules are created either
+# * use NO_INSTALL if your library is not needed at runtime either
+# * not stage the library at all
+#
+# You can by-pass this behavior by setting ``QI_INSTALL_INTERNAL`` to "ON"
 #
 # \arg:name the target name
 # \argn: sources files, like the SRC group, argn and SRC will be merged
@@ -184,12 +199,8 @@
 #                        have to compile the target explicitly.
 #                        Warning: you will NOT be able to create install rules
 #                          for this target.
-# \flag: INTERNAL  By default, the library won't be installed, the
-#                  headers of the library won't be installed either, and
-#                  library cmake config file will not be generated, thus it will
-#                  be impossible to use the library from another project using
-#                  a package of the project.
-#                  You can by-pass this behavior by setting QI_INSTALL_INTERNAL to "ON"
+# \flag: INTERNAL  See below
+#
 # \flag:NO_FPIC Do not set -fPIC on static libraries (will be set for shared lib by CMake anyway)
 # \param:SUBFOLDER The destination subfolder. The install rules generated will be
 #                  sdk/lib/<subfolder>


Fix errors for high version GPU.
ISSUE=4622423

git-svn-id: 7b05817fec9a0a7f398a8fb38bca5f76eb450168@1503 1ad973e4-5ce8-4261-8a94-b56d1f490c56

--- cmake/flags.cmake
+++ cmake/flags.cmake
@@ -8,7 +8,7 @@
 # is_c: is C flag or C++ flag, bool type.
 # src_list: The list name which the flag name will be append to.
 # flag_name: the flag name for compiler, such as '-Werror' '-Wall' etc
-# rest arguments: not used.
+# rest arguments: not used.
 function(safe_set_flag is_c src_list flag_name)
     string(REPLACE "-" "_" safe_name ${flag_name})
     string(REPLACE "=" "_" safe_name ${safe_name})
@@ -44,7 +44,7 @@
 if(NOT UINT64_MAX_EXISTS)
   set(CMAKE_REQUIRED_DEFINITIONS -D__STDC_LIMIT_MACROS)
   CHECK_CXX_SYMBOL_EXISTS(UINT64_MAX "stdint.h" UINT64_MAX_EXISTS_HERE)
-  if(UINT64_MAX_EXISTS_HERE)
+  if(UINT64_MAX_EXISTS_HERE)
     set(CMAKE_REQUIRED_DEFINITIONS)
     add_definitions(-D__STDC_LIMIT_MACROS)
   else()
@@ -75,12 +75,13 @@
 # So, don't set these flags here.

 foreach(capability 30 35 50)
-    list(APPEND __arch_flags "-gencode arch=compute_${capability},code=sm_${capability}")
+    list(APPEND __arch_flags " -gencode arch=compute_${capability},code=sm_${capability}")
 endforeach()

+message(${__arch_flags})
 if (CUDA_VERSION VERSION_GREATER "7.0")
-    list(APPEND __arch_flags "-gencode arch=compute_52,code=sm_52")
+    list(APPEND __arch_flags " -gencode arch=compute_52,code=sm_52")
 endif()

+
 set(CUDA_NVCC_FLAGS ${__arch_flags} ${CUDA_NVCC_FLAGS})
-


removed rpm generation for KNC libraries

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -127,24 +127,15 @@
 SET(CPACK_COMPONENT_LIB_DISPLAY_NAME "Library")
 SET(CPACK_COMPONENT_LIB_DESCRIPTION "The Embree library including documentation.")

-SET(XEONPHI_DESCRIPTION "For The Intel Xeon Phi coprocessor." )
-SET(CPACK_COMPONENT_LIB_XEONPHI_NAME "Xeon Phi Library")
-SET(CPACK_COMPONENT_LIB_XEONPHI_DESCRIPTION "${CPACK_COMPONENT_LIB_DESCRIPTION}\n${XEONPHI_DESCRIPTION}")
-
 SET(CPACK_COMPONENT_DEVEL_DISPLAY_NAME "Development")
 SET(CPACK_COMPONENT_DEVEL_DESCRIPTION "Header Files for C and ISPC required to develop applications with Embree.")

 SET(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples")
 SET(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Tutorials demonstrating how to use Embree.")

-SET(CPACK_COMPONENT_EXAMPLES_XEONPHI_NAME "Xeon Phi Examples")
-SET(CPACK_COMPONENT_EXAMPLES_XEONPHI_DESCRIPTION "${CPACK_COMPONENT_EXAMPLES_DESCRIPTION}\n${XEONPHI_DESCRIPTION}")
-
 # dependencies between components
-SET(CPACK_COMPONENT_LIB_XEONPHI_DEPENDS lib)
 SET(CPACK_COMPONENT_DEVEL_DEPENDS lib)
 SET(CPACK_COMPONENT_EXAMPLES_DEPENDS lib)
-SET(CPACK_COMPONENT_EXAMPLES_XEONPHI_DEPENDS lib_xeonphi)
 SET(CPACK_COMPONENT_LIB_REQUIRED ON) # always install the libs

 # point to readme and license files
@@ -218,7 +209,7 @@

     SET(CPACK_GENERATOR RPM)
     SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${CPACK_RPM_PACKAGE_RELEASE}.x86_64")
-    SET(CPACK_COMPONENTS_ALL devel lib examples lib_xeonphi examples_xeonphi)
+    SET(CPACK_COMPONENTS_ALL devel lib examples)
     SET(CPACK_RPM_COMPONENT_INSTALL ON)
     SET(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0") # Apache Software License, Version 2.0
     SET(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
@@ -229,8 +220,6 @@
     # post install and uninstall scripts
     SET(CPACK_RPM_lib_POST_INSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
     SET(CPACK_RPM_lib_POST_UNINSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
-    SET(CPACK_RPM_lib_xeonphi_POST_INSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
-    SET(CPACK_RPM_lib_xeonphi_POST_UNINSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
   ELSE()

     SET(CPACK_GENERATOR TGZ)


add ispc files to ADD_LIBRARY calls so they show up in IDEs

--- cmake/ispc.cmake
+++ cmake/ispc.cmake
@@ -213,5 +213,5 @@
     ENDIF ()
   ENDFOREACH()
   ISPC_COMPILE(${ISPC_SOURCES})
-  ADD_LIBRARY(${name} ${type} ${ISPC_OBJECTS} ${OTHER_SOURCES})
+  ADD_LIBRARY(${name} ${type} ${ISPC_OBJECTS} ${OTHER_SOURCES} ${ISPC_SOURCES})
 ENDMACRO()


cmake: add WEST to cached variable

cmake: add WEST to cached variable

Commit 79b1f89f7d4229d494c8b72c0acd715d61108456 causes the WEST
variable to no longer cached in the CMakeCache. However,
the Eclipse plugin needs this WEST variable so that it can
invoke west properly. So tell CMake to put it in the cache.

Signed-off-by: Daniel Leung <d94e04d205b5962d7873a139ef298b03c1717f72@intel.com>

--- cmake/west.cmake
+++ cmake/west.cmake
@@ -52,7 +52,7 @@
   else()
     # WEST_PYTHON is undefined and we couldn't import west. That's
     # fine; it's optional.
-    set(WEST WEST-NOTFOUND)
+    set(WEST WEST-NOTFOUND CACHE INTERNAL "West")
   endif()
 else()
   # We can import west from PYTHON_EXECUTABLE and have its version.
@@ -78,7 +78,10 @@
     # possible to run 'python -m west.app.main'.
     string(APPEND WEST_MODULE .app.main)
   endif()
-  set(WEST ${PYTHON_EXECUTABLE} -m ${WEST_MODULE})
+
+  # Need to cache this so the Zephyr Eclipse plugin knows
+  # how to invoke West.
+  set(WEST ${PYTHON_EXECUTABLE} -m ${WEST_MODULE} CACHE INTERNAL "West")

   # Print information about the west module we're relying on. This
   # will still work even after output is one line.


Python 2.7 support

Python 2.7 support

--- indra/cmake/Python.cmake
+++ indra/cmake/Python.cmake
@@ -9,6 +9,7 @@
     NAMES python25.exe python23.exe python.exe
     NO_DEFAULT_PATH # added so that cmake does not find cygwin python
     PATHS
+    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
     [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
     [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
     [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]


GCC doesnt like a - in a -D name so we better replace - with _ too

--- cmake/AddCompilerFlag.cmake
+++ cmake/AddCompilerFlag.cmake
@@ -2,7 +2,7 @@
 include("${_currentDir}/CheckCCompilerFlag.cmake")
 include("${_currentDir}/CheckCXXCompilerFlag.cmake")
 macro(AddCompilerFlag _flag)
-   string(REGEX REPLACE "[+/:= ]" "_" _flag_esc "${_flag}")
+   string(REGEX REPLACE "[-+/:= ]" "_" _flag_esc "${_flag}")
    check_c_compiler_flag("${_flag}" check_c_compiler_flag_${_flag_esc})
    check_cxx_compiler_flag("${_flag}" check_cxx_compiler_flag_${_flag_esc})
    if(check_c_compiler_flag_${_flag_esc})


Updated clang flags

Updated clang flags

--- cmake/CMakeBuildFlags.cmake
+++ cmake/CMakeBuildFlags.cmake
@@ -16,7 +16,8 @@
 	FIND_LIBRARY(LIBM m)

 	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra -Wall")
-	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wundef -Wpointer-arith -Werror -Wcast-qual -Wcast-align")
+	# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wundef -Wpointer-arith -Werror -Wcast-qual -Wcast-align")
+	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wundef -Wpointer-arith -Werror -Wcast-qual")
 	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-braces")
 endif()


Detect and use macports installation

Detect and use macports installation

--- cmake/DevBaseExternal.cmake
+++ cmake/DevBaseExternal.cmake
@@ -1,3 +1,32 @@
+if(APPLE)
+    # Detect if the "port" command is valid on this system; if so, return
+    # full path.
+    execute_process(
+        COMMAND which port
+        RESULT_VARIABLE DETECT_MACPORTS
+        OUTPUT_VARIABLE MACPORTS_PREFIX
+        ERROR_QUIET
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+
+    if(${DETECT_MACPORTS} EQUAL 0)
+        # /opt/local/bin/port -> /opt/local/bin -> /opt/local
+        get_filename_component(MACPORTS_PREFIX ${MACPORTS_PREFIX} DIRECTORY)
+        get_filename_component(MACPORTS_PREFIX ${MACPORTS_PREFIX} DIRECTORY)
+
+        set(CMAKE_PREFIX_PATH
+            ${MACPORTS_PREFIX}
+            ${CMAKE_PREFIX_PATH}
+        )
+
+        message(STATUS "Probing MacPorts installation in: ${MACPORTS_PREFIX}")
+    endif()
+
+
+    # TODO Also detect homebrew, using "brew --prefix"
+endif()
+
+
 # Peacock is a project for building external software. It can be used to
 # build the Boost libraries on all kinds of platform, for example. A
 # PEACOCK_PREFIX CMake variable or environment variable can be set to
@@ -5,7 +34,6 @@
 # current platform string to this prefix, we end up at the root of the
 # header files and libraries.
 # See also: https://github.com/geoneric/peacock
-
 if(peacock_compiler_found)
     # If the PEACOCK_PREFIX CMake variable is not set, but an environment
     # variable with that name is, then copy it to a CMake variable. This way
@@ -15,6 +43,8 @@
     endif()

     if(PEACOCK_PREFIX)
+        # PEACOCK_PREFIX takes precedence over all other paths.
+
         # # if cross compiling:
         # set(CMAKE_FIND_ROOT_PATH
         #     ${PEACOCK_PREFIX}/${peacock_target_platform})
@@ -29,6 +59,10 @@
 endif()

+
+
+
+
 # Variable that can be set in this module:
 #
 # DEVBASE_EXTERNAL_SOURCES
@@ -112,21 +146,10 @@
     find_package(Curses REQUIRED)
     # Check CURSES_HAVE_NCURSES_H -> cursesw.h in .../include
     # Check CURSES_HAVE_NCURSES_NCURSES_H -> curses.h in .../ncursesw
-    # Simplify this, use CMAKE_INSTALL_PREFIX to point CMake to /opt/local.
-    if(NOT APPLE)
-        include_directories(
-            SYSTEM
-            ${CURSES_INCLUDE_DIRS}  # /ncursesw
-        )
-    else()
-        include_directories(
-            SYSTEM
-            /opt/local/include
-        )
-        link_directories(
-            /opt/local/lib
-        )
-    endif()
+    include_directories(
+        SYSTEM
+        ${CURSES_INCLUDE_DIRS}  # /ncursesw
+    )

     if(NOT DEFINED DEVBASE_CURSES_WIDE_CHARACTER_SUPPORT_REQUIRED)
         set(DEVBASE_CURSES_WIDE_CHARACTER_SUPPORT_REQUIRED TRUE)
@@ -383,6 +406,7 @@
 endif()

+# This one first, before FindPythonLibs. See CMake docs.
 if(DEVBASE_PYTHON_INTERP_REQUIRED)
     if(DEFINED DEVBASE_REQUIRED_PYTHON_VERSION)
         set(Python_ADDITIONAL_VERSIONS ${DEVBASE_REQUIRED_PYTHON_VERSION})


order of status message

order of status message

--- cmake/EthDependencies.cmake
+++ cmake/EthDependencies.cmake
@@ -119,8 +119,8 @@
 	message(" - nodejs location : ${ETH_NODE}")

 	find_program(ETH_NPM npm)
+	string(REGEX REPLACE "npm" "" ETH_NPM_DIRECTORY ${ETH_NPM})
 	message(" - npm location    : ${ETH_NPM}")
-	string(REGEX REPLACE "npm" "" ETH_NPM_DIRECTORY ${ETH_NPM})

 endif() #HEADLESS


update MKLML to version which contains fix for thread hang. (#1636)

* update MKLML which has bugfix for thread hang. move PATCH_COMMAND outside BUILD_FOR_NATIVE_MACHINE check.

* MKLML_VERSION 2020.0.20190813 is for windows only.

--- cmake/external/mkldnn.cmake
+++ cmake/external/mkldnn.cmake
@@ -11,6 +11,8 @@
   set(MKLDNN_SHARED_LIB mkldnn.dll)
   set(MKLDNN_IMPORT_LIB mkldnn.lib)
   if(onnxruntime_USE_MKLML)
+    # Windows-only updated MKLML binary which contains fix for thread cleanup hang.
+    set(MKLML_VERSION 2020.0.20190813)
     set(MKLML_SHARED_LIB mklml.dll)
     set(MKLML_IMPORT_LIB mklml.lib)
     set(IOMP5MD_SHARED_LIB libiomp5md.dll)
@@ -59,15 +61,15 @@
     set(MKLDNN_DLL_PATH ${MKLDNN_LIB_DIR}/${MKLDNN_SHARED_LIB})
   endif()
   set(MKLDNN_INCLUDE_DIR ${MKLDNN_INSTALL}/include)
-  set (MKLDNN_CMAKE_EXTRA_ARGS)
+  set(MKLDNN_CMAKE_EXTRA_ARGS)
+  set(MKLDNN_PATCH_COMMAND1 git apply ${CMAKE_SOURCE_DIR}/patches/mkldnn/mem-patch.cmake.patch)
+  # discard prior changes due to patching in mkldnn source to unblock incremental builds.
+  set(MKLDNN_PATCH_DISCARD_COMMAND cd ${MKLDNN_SOURCE} && git checkout -- .)
   if(NOT onnxruntime_BUILD_FOR_NATIVE_MACHINE)
     # pre-v1.0
     list(APPEND MKLDNN_CMAKE_EXTRA_ARGS "-DARCH_OPT_FLAGS=")
     # v1.0
     list(APPEND MKLDNN_CMAKE_EXTRA_ARGS "-DMKLDNN_ARCH_OPT_FLAGS=")
-    set(MKLDNN_PATCH_COMMAND1 git apply ${CMAKE_SOURCE_DIR}/patches/mkldnn/mem-patch.cmake.patch)
-    # discard prior changes due to patching in mkldnn source to unblock incremental builds.
-    set(MKLDNN_PATCH_DISCARD_COMMAND cd ${MKLDNN_SOURCE} && git checkout -- .)
   endif()
   ExternalProject_Add(project_mkldnn
     PREFIX mkl-dnn


Correct Handle Python Proto2

Correct Handle Python Proto2

--- cmake/external/python.cmake
+++ cmake/external/python.cmake
@@ -26,10 +26,10 @@
     find_python_module(wheel REQUIRED)
     find_python_module(google.protobuf REQUIRED)
     FIND_PACKAGE(NumPy REQUIRED)
-    IF(${PY_GOOGLE.PROTOBUF_VERSION} VERSION_LESS "3.0.0")
+    IF(${PY_GOOGLE.PROTOBUF_VERSION} AND ${PY_GOOGLE.PROTOBUF_VERSION} VERSION_LESS "3.0.0")
         MESSAGE(FATAL_ERROR "Found Python Protobuf ${PY_GOOGLE.PROTOBUF_VERSION} < 3.0.0, "
-        "please use pip to upgrade protobuf.")
-    ENDIF(${PY_GOOGLE.PROTOBUF_VERSION} VERSION_LESS "3.0.0")
+        "please use pip to upgrade protobuf. pip install -U protobuf")
+    ENDIF()
 ELSE(PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)
     MESSAGE(FATAL_ERROR "Please install python 2.7 before building PaddlePaddle.")
     ##################################### PYTHON ########################################


CMake, Windows - install PDBs for client plugins

--- cmake/install_plugins.cmake
+++ cmake/install_plugins.cmake
@@ -9,6 +9,10 @@

 MACRO(INSTALL_PLUGIN name binary_dir)
   INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR})
+  IF(MSVC)
+    INSTALL(FILES $<TARGET_PDB_FILE:${name}> COMPONENT Debuginfo
+      DESTINATION symbols CONFIGURATIONS Debug RelWithDebInfo)
+  ENDIF()
   IF(WIN32)
     FILE(APPEND ${CC_BINARY_DIR}/win/packaging/plugin.conf "<File Id=\"${name}.dll\" Name=\"${name}.dll\" DiskId=\"1\" Source=\"${binary_dir}/${CMAKE_BUILD_TYPE}/${name}.dll\"/>\n")
     FILE(APPEND ${CC_BINARY_DIR}/win/packaging/plugin.conf "<File Id=\"${name}.pdb\" Name=\"${name}.pdb\" DiskId=\"1\" Source=\"${binary_dir}/${CMAKE_BUILD_TYPE}/${name}.pdb\"/>\n")


[CMake] Put *_exports into "Misc" folder.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -72,6 +72,7 @@
   endif()

   add_custom_target(${target_name}_exports DEPENDS ${native_export_file})
+  set_target_properties(${target_name}_exports PROPERTIES FOLDER "Misc")

   get_property(srcs TARGET ${target_name} PROPERTY SOURCES)
   foreach(src ${srcs})


CMake: remove mpi two-pass search

CMake: remove mpi two-pass search

As discussed in https://github.com/dealii/dealii/issues/5510, we must
not assume anything about the internal workings of CMake's FindMPI.cmake
module. In particular, it is not sufficient to set CMAKE_<LANG>_COMPILER
to an MPI-compiler wrapper in order for FindMPI.cmake to actually detect
MPI. So, remove this logic in our FindMPI.cmake module.

--- cmake/modules/FindMPI.cmake
+++ cmake/modules/FindMPI.cmake
@@ -38,34 +38,12 @@
 ENDIF()

 #
-# If CMAKE_CXX_COMPILER is already an MPI wrapper, use it to determine
-# the mpi implementation. If MPI_CXX_COMPILER is defined use the value
-# directly.
-#
-SET_IF_EMPTY(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})
-IF(CMAKE_C_COMPILER_WORKS)
-  SET_IF_EMPTY(MPI_C_COMPILER ${CMAKE_C_COMPILER}) # for good measure
-ELSE()
-  MESSAGE(STATUS
-    "No suitable C compiler was found! MPI C interface can not be "
-    "autodetected"
-    )
-ENDIF()
-IF(CMAKE_Fortran_COMPILER_WORKS)
-  SET_IF_EMPTY(MPI_Fortran_COMPILER ${CMAKE_Fortran_COMPILER}) # for good measure
-ELSE()
-  MESSAGE(STATUS
-    "No suitable Fortran compiler was found! MPI Fortran interface can "
-    "not be autodetected"
-    )
-ENDIF()
-
-#
 # Call the system FindMPI.cmake module:
 #

-# in case MPIEXEC is specified first call find_program() so that in case of success
-# its subsequent runs inside FIND_PACKAGE(MPI) do not alter the desired result.
+# in case MPIEXEC is specified first call find_program() so that in case of
+# success its subsequent runs inside FIND_PACKAGE(MPI) do not alter the
+# desired result.
 IF(DEFINED ENV{MPIEXEC})
   FIND_PROGRAM(MPIEXEC $ENV{MPIEXEC})
 ENDIF()
@@ -73,27 +51,6 @@
 # temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup
 LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 FIND_PACKAGE(MPI)
-
-IF(NOT MPI_CXX_FOUND AND DEAL_II_WITH_MPI)
-  #
-  # CMAKE_CXX_COMPILER is apparently not an mpi wrapper.
-  # So, let's be a bit more aggressive in finding MPI (and if
-  # DEAL_II_WITH_MPI is set).
-  #
-  MESSAGE(STATUS
-    "MPI not found but DEAL_II_WITH_MPI is set to TRUE."
-    " Try again with more aggressive search paths:"
-    )
-  # Clear variables so that FIND_PACKAGE runs again:
-  SET(MPI_FOUND)
-  SET(MPI_CXX_COMPILER)
-  SET(MPI_C_COMPILER)
-  SET(MPI_Fortran_COMPILER)
-  UNSET(MPI_CXX_COMPILER CACHE)
-  UNSET(MPI_C_COMPILER CACHE)
-  UNSET(MPI_Fortran_COMPILER CACHE)
-  FIND_PACKAGE(MPI)
-ENDIF()
 LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)

 #


qibuild/general: sanitize compilers flags

This will gratly help writing cross-platform code,
which is what qibuild is good at :)

--- cmake/qibuild/general.cmake
+++ cmake/qibuild/general.cmake
@@ -44,6 +44,27 @@
 if(MSVC_IDE)
   cmake_minimum_required(VERSION 2.8.3)
 endif()
+
+# Sanitize compiler options to help cross-platform
+# compatibility:
+
+if(MSVC)
+  if(MSVC10)
+    # Avoid GTEST using its own tuple, when we have a real tuple
+    add_definitions(" -DGTEST_USE_OWN_TR1_TUPLE=0 ")
+  endif()
+  # Fix annoying windows.h quirks:
+  add_definitions(" -DNOMINMAX ")
+  add_definitions(" -D_CRT_SECURE_NO_DEPRECATE ")
+endif()
+
+if(UNIX)
+  # on gcc no return statement in function returning non-void,
+  # does not cause any error or warning, but on cl.exe it won't
+  # compile, so at least emit a warning:
+  add_definitions(" -Wreturn-type ")
+endif()
+

 #get the current directory of the file
 get_filename_component(_ROOT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)


Partial rollback of "Allow the use of system-wide lcms2"

--- lib/jxl.cmake
+++ lib/jxl.cmake
@@ -402,9 +402,13 @@

 #TODO(lode): don't depend on CMS for the core library
 if (JPEGXL_ENABLE_SKCMS)
-  target_link_libraries(jxl_enc-obj PRIVATE skcms)
+  target_include_directories(jxl_enc-obj PRIVATE
+    $<TARGET_PROPERTY:skcms,INCLUDE_DIRECTORIES>
+  )
 else ()
-  target_link_libraries(jxl_enc-obj PRIVATE lcms2)
+  target_include_directories(jxl_enc-obj PRIVATE
+    $<TARGET_PROPERTY:lcms2,INCLUDE_DIRECTORIES>
+  )
 endif ()

 # Headers for exporting/importing public headers


Further improve multi db support

Further improve multi db support

--- cmake/Modules/UseODB.cmake
+++ cmake/Modules/UseODB.cmake
@@ -1,5 +1,5 @@

-set(ODB_COMPILE_DEBUG FALSE)
+set(ODB_COMPILE_DEBUG TRUE)
 set(ODB_COMPILE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/odb_gen")
 set(ODB_COMPILE_HEADER_SUFFIX ".h")
 set(ODB_COMPILE_INLINE_SUFFIX "_inline.h")
@@ -39,7 +39,7 @@
 	endif()

 	foreach(db ${PARAM_DB})
-		list(APPEND ODB_ARGS --database "${db}")
+		list(APPEND ODB_ARGS -d "${db}")
 	endforeach()

 	if(PARAM_GENERATE_QUERY)
@@ -110,7 +110,22 @@
 	list(APPEND ODB_ARGS --hxx-suffix "${ODB_COMPILE_HEADER_SUFFIX}")
 	list(APPEND ODB_ARGS --ixx-suffix "${ODB_COMPILE_INLINE_SUFFIX}")
 	list(APPEND ODB_ARGS --cxx-suffix "${ODB_COMPILE_SOURCE_SUFFIX}")
-	list(APPEND ODB_ARGS --odb-file-suffix "${ODB_COMPILE_FILE_SUFFIX}")
+
+	if(PARAM_MULTI_DATABASE AND NOT "${ODB_COMPILE_FILE_SUFFIX}" MATCHES ".+:.+")
+		set(osuffix "${ODB_COMPILE_FILE_SUFFIX}")
+		set(ODB_COMPILE_FILE_SUFFIX)
+		foreach(db ${PARAM_DB})
+			if("${db}" MATCHES "common")
+				list(APPEND ODB_COMPILE_FILE_SUFFIX "${db}:${osuffix}")
+			else()
+				list(APPEND ODB_COMPILE_FILE_SUFFIX "${db}:${osuffix}_${db}")
+			endif()
+		endforeach()
+	endif()
+
+	foreach(sfx ${ODB_COMPILE_FILE_SUFFIX})
+		list(APPEND ODB_ARGS --odb-file-suffix "${sfx}")
+	endforeach()

 	foreach(dir ${PARAM_INCLUDE} ${ODB_INCLUDE_DIRS})
 		list(APPEND ODB_ARGS "-I${dir}")
@@ -121,9 +136,14 @@

 	foreach(input ${PARAM_FILES})
 		get_filename_component(output "${input}" NAME_WE)
-		set(output "${ODB_COMPILE_OUTPUT_DIR}/${output}${ODB_COMPILE_FILE_SUFFIX}${ODB_COMPILE_SOURCE_SUFFIX}")
+		set(outputs)

-		list(APPEND ${outvar} "${output}")
+		foreach(sfx ${ODB_COMPILE_FILE_SUFFIX})
+			string(REGEX REPLACE "^.*:" "" sfx "${sfx}")
+			set(output "${ODB_COMPILE_OUTPUT_DIR}/${output}${sfx}${ODB_COMPILE_SOURCE_SUFFIX}")
+			list(APPEND ${outvar} "${output}")
+			list(APPEND outputs "${output}")
+		endforeach()

 		if(ODB_COMPILE_DEBUG)
 			set(_msg "${ODB_EXECUTABLE} ${ODB_ARGS} ${input}")
@@ -131,7 +151,7 @@
 			message(STATUS "${_msg}")
 		endif()

-		add_custom_command(OUTPUT "${output}"
+		add_custom_command(OUTPUT ${outputs}
 			COMMAND ${ODB_EXECUTABLE} ${ODB_ARGS} "${input}"
 			DEPENDS "${input}"
 			WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"


Update OpenCVDownload.cmake unpack

Update OpenCVDownload.cmake unpack

Added new "f" flag to the tar unpack, because without it doesn't complete, an compile fails

--- cmake/OpenCVDownload.cmake
+++ cmake/OpenCVDownload.cmake
@@ -216,7 +216,7 @@
     ocv_download_log("#mkdir \"${DL_DESTINATION_DIR}\"")
     file(MAKE_DIRECTORY "${DL_DESTINATION_DIR}")
     ocv_download_log("#unpack \"${DL_DESTINATION_DIR}\" \"${CACHE_CANDIDATE}\"")
-    execute_process(COMMAND "${CMAKE_COMMAND}" -E tar xz "${CACHE_CANDIDATE}"
+    execute_process(COMMAND "${CMAKE_COMMAND}" -E tar xzf "${CACHE_CANDIDATE}"
                     WORKING_DIRECTORY "${DL_DESTINATION_DIR}"
                     RESULT_VARIABLE res)
     if(NOT res EQUAL 0)


CMake: Fuzz: perform link-time dead code elimination

Results in somewhat filesize-smaller fuzz targets,
and reduces the number of fuzz edge coverage counters,
since the unreachables are stripped away.

--- cmake/compiler-flags.cmake
+++ cmake/compiler-flags.cmake
@@ -178,6 +178,8 @@
 endif()

 set(fuzz "${fuzz} -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION")
+set(fuzz "${fuzz} -ffunction-sections -fdata-sections")
+set(fuzz_link "-Wl,--gc-sections")
 SET(CMAKE_CXX_FLAGS_FUZZ
     "${fuzz}"
     CACHE STRING "Flags used by the C++ compiler during FUZZ builds."
@@ -187,15 +189,15 @@
     CACHE STRING "Flags used by the C compiler during FUZZ builds."
     FORCE )
 SET(CMAKE_EXE_LINKER_FLAGS_FUZZ
-    "${fuzz}"
+    "${fuzz} ${fuzz_link}"
     CACHE STRING "Flags used for linking binaries during FUZZ builds."
     FORCE )
 SET(CMAKE_SHARED_LINKER_FLAGS_FUZZ
-    "${fuzz}"
+    "${fuzz} ${fuzz_link}"
     CACHE STRING "Flags used by the shared libraries linker during FUZZ builds."
     FORCE )
-SET(CMAKE_SHARED_MODULE_FLAGS_FUZZ
-    "${fuzz}"
+SET(CMAKE_MODULE_LINKER_FLAGS_FUZZ
+    "${fuzz} ${fuzz_link}"
     CACHE STRING "Flags used by the module linker during FUZZ builds."
     FORCE )
 MARK_AS_ADVANCED(
@@ -203,7 +205,7 @@
     CMAKE_C_FLAGS_FUZZ
     CMAKE_EXE_LINKER_FLAGS_FUZZ
     CMAKE_SHARED_LINKER_FLAGS_FUZZ
-    CMAKE_SHARED_MODULE_FLAGS_FUZZ )
+    CMAKE_MODULE_LINKER_FLAGS_FUZZ )

 set(ubsan "${SANITIZATION_DEFAULTS} -fsanitize=thread")
 SET(CMAKE_CXX_FLAGS_TSAN


Try some more RPM fixes.

Try some more RPM fixes.

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -103,10 +103,14 @@
 # RPM layout
 SET(INSTALL_BINDIR_RPM "bin")
 SET(INSTALL_SBINDIR_RPM "sbin")
-SET(INSTALL_LIBDIR_RPM "lib/mysql")
-SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
+IF(64BIT)
+  SET(INSTALL_LIBDIR_RPM "lib64/mysql")
+ELSE()
+  SET(INSTALL_LIBDIR_RPM "lib/mysql")
+ENDIF()
+SET(INSTALL_PLUGINDIR_RPM "${INSTALL_LIBDIR_RPM}/plugin")
 SET(INSTALL_DOCDIR_RPM "share/mysql/doc/MySQL-server-${MYSQL_NO_DASH_VERSION}")
-SET(INSTALL_MANDIR_RPM "share/mysql/man")
+SET(INSTALL_MANDIR_RPM "share/man")
 SET(INSTALL_INCLUDEDIR_RPM "include/mysql")
 SET(INSTALL_MYSQLSHAREDIR_RPM "share/mysql")
 SET(INSTALL_SHAREDIR_RPM "share")


Manual libatomic Check for Linux in CMake

--- cmake/platform/linux.cmake
+++ cmake/platform/linux.cmake
@@ -13,6 +13,12 @@
 std::atomic<uintmax_t> y;
 int main() {
     return x + y;
+}")
+
+set(LIBATOMIC_TEST_CXX_SOURCE "
+int main() {
+    __atomic_load_8(nullptr, 0);
+    return 0;
 }")

 macro(apply_post_project_platform_settings)
@@ -32,12 +38,9 @@
     list(APPEND CMAKE_REQUIRED_FLAGS "-std=c++${CPP_STANDARD}")
     check_cxx_source_compiles("${ATOMIC_TEST_CXX_SOURCE}" HAVE_ATOMICS_WITHOUT_LIBATOMIC)
     if(NOT HAVE_ATOMICS_WITHOUT_LIBATOMIC)
-        if("${CMAKE_VERSION}" VERSION_LESS "3.4.0")
-            enable_language(C)
-        endif()
-        check_library_exists(atomic __atomic_load_8 "" LIBATOMIC_EXISTS)
+        set(CMAKE_REQUIRED_LIBRARIES atomic)
+        check_cxx_source_compiles("${LIBATOMIC_TEST_CXX_SOURCE}" LIBATOMIC_EXISTS)
         if(LIBATOMIC_EXISTS)
-            set(CMAKE_REQUIRED_LIBRARIES atomic)
             check_cxx_source_compiles("${ATOMIC_TEST_CXX_SOURCE}" HAVE_ATOMICS_WITH_LIBATOMIC)
         endif()
         if(HAVE_ATOMICS_WITH_LIBATOMIC)


mpv: explicitly set some configure-time options

--- packages/mpv.cmake
+++ packages/mpv.cmake
@@ -29,6 +29,17 @@
         <SOURCE_DIR>/waf configure
         --enable-static-build
         --enable-pdf-build
+        --disable-manpage-build
+        --disable-debug-build
+        --enable-waio
+        --enable-lua
+        --enable-libass
+        --enable-libbluray
+        --enable-dvdread
+        --enable-dvdnav
+        --enable-enca
+        --enable-rubberband
+        --enable-lcms2
         --prefix=${MINGW_INSTALL_PREFIX}
     BUILD_COMMAND ${EXEC} <SOURCE_DIR>/waf
     INSTALL_COMMAND ""


create tests target only when not yet existing

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -309,7 +309,9 @@
   endif(_test_results_dir_failed)

   # The 'tests' target builds the test program
-  add_custom_target(tests)
+  if(NOT TARGET tests)
+    add_custom_target(tests)
+  endif()
   # The 'test' target runs all but the future tests
   add_custom_target(test)
   # We need to build tests before running them.  Addition of this


Fixes for VS 2015 Update 3

Fixes for VS 2015 Update 3

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -76,7 +76,6 @@
         # /wd4127     # -> disable warning: conditional expression is constant (caused by Qt)

         $<$<CONFIG:Debug>:
-        /RTCc         # -> value is assigned to a smaller data type and results in a data loss
         >

         $<$<CONFIG:Release>:


cmake

cmake

Former-commit-id: 51c77779a7d9d235f98cb0f98f4c3a5a96e07f08

--- cmake/FindCUDADriver.cmake
+++ cmake/FindCUDADriver.cmake
@@ -8,4 +8,4 @@
 		/usr/lib64/
 		${CUDA_TOOLKIT_ROOT_DIR}/lib64)

-FIND_PACKAGE_HANDLE_STANDARD_ARGS(BoostNumpy DEFAULT_MSG CUDA_DRIVER_LIBRARY)+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CUDADriver DEFAULT_MSG CUDA_DRIVER_LIBRARY)


Automatically enable ThirdParty build of Zlib if not found. Better searching for zlib in macports directory. Fix to zlib source to work with OSX. Added check that patch version is 7 or later (we need 1.2.7, but only check the patch level at the moment)

--- cmake/ThirdPartyZlib.cmake
+++ cmake/ThirdPartyZlib.cmake
@@ -1,43 +1,43 @@
-OPTION(THIRDPARTY_BUILD_ZLIB "Build ZLib library" OFF)
+########################################################################
+#
+# ThirdParty configuration for Nektar++
+#
+# ZLib
+#
+########################################################################

+# Attempt to identify Macports libraries, if they exist. This prevents
+# cmake warnings later on.
+SET(ZLIB_ROOT /opt/local/lib)
+
+
+# Find a system ZLIB library
+# If not found enable the THIRDPARTY_BUILD_ZLIB option
+FIND_PACKAGE( ZLIB )
+IF (ZLIB_FOUND AND NOT ZLIB_VERSION_PATCH LESS 7 )
+    SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES})
+    SET(ZLIB_LIBRARY_DEBUG ${ZLIB_LIBRARIES})
+    SET(ZLIB_LIBRARY_RELEASE ${ZLIB_LIBRARIES})
+    MESSAGE(STATUS "Found Zlib library: ${ZLIB_LIBRARY}")
+    OPTION(THIRDPARTY_BUILD_ZLIB "Build ZLib library" OFF)
+ELSE ()
+    OPTION(THIRDPARTY_BUILD_ZLIB "Build ZLib library" ON)
+ENDIF()
+
+
+# If we or the user
 IF (THIRDPARTY_BUILD_ZLIB)
     # Build the Zlib library separately
     EXTERNALPROJECT_ADD(
         zlib-1.2.7
         PREFIX ${TPSRC}
         URL ${TPURL}/zlib-1.2.7.tar.gz
-        URL_MD5 "60df6a37c56e7c1366cca812414f7b85"
+        URL_MD5 "4a162e0f643232e7e278d59a0603ceb0"
         DOWNLOAD_DIR ${TPSRC}
         CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist -DCMAKE_C_FLAGS:STRING=-fPIC ${TPSRC}/src/zlib-1.2.7
     )
     SET(ZLIB_LIBRARY z)
     SET(ZLIB_LIBRARY_DEBUG z)
     SET(ZLIB_LIBRARY_RELEASE z)
-ELSE (THIRDPARTY_BUILD_ZLIB)
-  # Attempt to identify Macports libraries, if they exist. This prevents
-  # cmake warnings later on.
-  IF (APPLE)
-    FIND_LIBRARY(ZLIB_LIBRARY z PATHS /opt/local/lib NO_DEFAULT_PATH)
-  ENDIF()
-
-  # Find a system ZLIB library and use that instead
-  IF (ZLIB_LIBRARY-NOTFOUND OR NOT APPLE)
-    FIND_PACKAGE( ZLIB )
-    IF (ZLIB_FOUND)
-      SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES})
-    ENDIF()
-  ENDIF()
-
-  #  IF (ZLIB_LIBRARY)
-  #  SET(Boost_ZLIB_LIBRARY ${ZLIB_LIBRARY})
-  #  SET(Boost_ZLIB_LIBRARY_RELEASE ${ZLIB_LIBRARY})
-  #  SET(Boost_ZLIB_LIBRARY_DEBUG ${ZLIB_LIBRARY})
-  #ENDIF()
-
-  IF (ZLIB_FOUND)
-    MESSAGE(STATUS "Found Zlib library: ${ZLIB_LIBRARY}")
-  ENDIF ()
-
 ENDIF (THIRDPARTY_BUILD_ZLIB)

-


support building when there is a + in path

When we take a snaphost in ubuntu, we normally add a +git<date>
in the path name. The vapi file regexp wasn't escape the + and so
didn't find it.

--- cmake/ValaPrecompile.cmake
+++ cmake/ValaPrecompile.cmake
@@ -152,11 +152,15 @@
     set(custom_vapi_arguments "")
     if(ARGS_CUSTOM_VAPIS)
         foreach(vapi ${ARGS_CUSTOM_VAPIS})
-            if(${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR})
+            SET(_srcdir_regexp "${CMAKE_SOURCE_DIR}")
+            SET(_bindir_regexp "${CMAKE_BINARY_DIR}")
+            STRING(REGEX REPLACE "\\+" "\\\\+" _srcdir_regexp "${_srcdir_regexp}")
+            STRING(REGEX REPLACE "\\+" "\\\\+" _bindir_regexp "${_bindir_regexp}")
+            if(${vapi} MATCHES ${_srcdir_regexp} OR ${vapi} MATCHES ${_bindir_regexp})
                 list(APPEND custom_vapi_arguments ${vapi})
-            else(${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR})
+            else(${vapi} MATCHES ${_srcdir_regexp} OR ${vapi} MATCHES ${_bindir_regexp})
                 list(APPEND custom_vapi_arguments ${CMAKE_CURRENT_SOURCE_DIR}/${vapi})
-            endif(${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR})
+            endif(${vapi} MATCHES ${_srcdir_regexp} OR ${vapi} MATCHES ${_bindir_regexp})
         endforeach(vapi ${ARGS_CUSTOM_VAPIS})
     endif(ARGS_CUSTOM_VAPIS)


Try some more RPM fixes.

Try some more RPM fixes.


Mark signing parameters as advanced

Mark signing parameters as advanced

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -73,18 +73,17 @@

 IF(WIN32)
   OPTION(SIGNCODE "Sign executables and dlls with digital certificate" OFF)
+  MARK_AS_ADVANCED(SIGNCODE)
   IF(SIGNCODE)
    SET(SIGNTOOL_PARAMETERS
      /a /t http://timestamp.verisign.com/scripts/timstamp.dll
      CACHE STRING "parameters for signtool (list)")
-   MARK_AS_ADVANCED(SIGNCODE SIGNTOOL_PARAMETERS)
-  ENDIF()
-  IF(SIGNCODE)
     FIND_PROGRAM(SIGNTOOL_EXECUTABLE signtool)
     IF(NOT SIGNTOOL_EXECUTABLE)
       MESSAGE(FATAL_ERROR
       "signtool is not found. Signing executables not possible")
     ENDIF()
+    MARK_AS_ADVANCED(SIGNTOOL_EXECUTABLE  SIGNTOOL_PARAMETERS)
   ENDIF()
 ENDIF()


Try again..

Try again..

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -175,7 +175,6 @@
   ${ARGN}
   )
   GET_TARGET_PROPERTY(target_type ${target} TYPE)
-  GET_TARGET_PROPERTY(target_permissions ${target} PERMISSIONS)
   IF(ARG_RENAME)
     SET(RENAME_PARAM RENAME ${ARG_RENAME}${CMAKE_${target_type}_SUFFIX})
   ELSE()
@@ -183,6 +182,11 @@
   ENDIF()
   IF(NOT ARG_DESTINATION)
     MESSAGE(FATAL_ERROR "Need DESTINATION parameter for INSTALL_DEBUG_TARGET")
+  ENDIF()
+  IF(target_type MATCHES "EXECUTABLE")
+    SET(INSTALL_TYPE TARGETS)
+  ELSE()
+    SET(INSTALL_TYPE FILES)
   ENDIF()
   GET_TARGET_PROPERTY(target_location ${target} LOCATION)
   IF(CMAKE_GENERATOR MATCHES "Makefiles")
@@ -191,10 +195,9 @@
    STRING(REPLACE "${CMAKE_CFG_INTDIR}" "Debug"  debug_target_location "${target_location}" )
   ENDIF()

-  INSTALL(FILES ${debug_target_location}
+  INSTALL(${INSTALL_TYPE} ${debug_target_location}
     DESTINATION ${ARG_DESTINATION}
     ${RENAME_PARAM}
-    PERMISSIONS ${target_permissions}
     CONFIGURATIONS Release RelWithDebInfo
     OPTIONAL)


[CMake] Update GetSVN.cmake to use LLVM version control helper scripts.

This allows the logic to work with Git, and also uses the variable names
to match what Clang is actually looking for.

This changes the interface of GetSVN.cmake. Clang change to follow.

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

--- cmake/modules/GetSVN.cmake
+++ cmake/modules/GetSVN.cmake
@@ -2,24 +2,41 @@
 #
 # Input variables:
 #   FIRST_SOURCE_DIR  - First source directory
-#   FIRST_REPOSITORY  - The macro to define to the first revision number.
-#   SECOND_SOURCE_DIR - Second source directory
-#   SECOND_REPOSITORY - The macro to define to the second revision number.
+#   FIRST_NAME        - The macro prefix for the first repository's info
+#   SECOND_SOURCE_DIR - Second source directory (opt)
+#   SECOND_NAME       - The macro prefix for the second repository's info (opt)
 #   HEADER_FILE       - The header file to write
-include(FindSubversion)
-if (Subversion_FOUND AND EXISTS "${FIRST_SOURCE_DIR}/.svn")
-  # Repository information for the first repository.
-  Subversion_WC_INFO(${FIRST_SOURCE_DIR} MY)
-  file(WRITE ${HEADER_FILE}.txt "#define ${FIRST_REPOSITORY} \"${MY_WC_REVISION}\"\n")
+#
+# The output header will contain macros FIRST_REPOSITORY and FIRST_REVISION,
+# and SECOND_REPOSITORY and SECOND_REVISION if requested, where "FIRST" and
+# "SECOND" are substituted with the names specified in the input variables.

-  # Repository information for the second repository.
-  if (EXISTS "${SECOND_SOURCE_DIR}/.svn")
-    Subversion_WC_INFO(${SECOND_SOURCE_DIR} MY)
-    file(APPEND ${HEADER_FILE}.txt
-      "#define ${SECOND_REPOSITORY} \"${MY_WC_REVISION}\"\n")
-  endif ()
+# Chop off cmake/modules/GetSVN.cmake
+get_filename_component(LLVM_DIR "${CMAKE_SCRIPT_MODE_FILE}" PATH)
+get_filename_component(LLVM_DIR "${LLVM_DIR}" PATH)
+get_filename_component(LLVM_DIR "${LLVM_DIR}" PATH)

-  # Copy the file only if it has changed.
-  execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
-    ${HEADER_FILE}.txt ${HEADER_FILE})
+function(append_info name path)
+  execute_process(COMMAND "${LLVM_DIR}/utils/GetSourceVersion" "${path}"
+    OUTPUT_VARIABLE revision)
+  string(STRIP "${revision}" revision)
+  execute_process(COMMAND "${LLVM_DIR}/utils/GetRepositoryPath" "${path}"
+    OUTPUT_VARIABLE repository
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  string(STRIP "${repository}" repository)
+  file(APPEND "${HEADER_FILE}.txt"
+    "#define ${name}_REVISION \"${revision}\"\n")
+  file(APPEND "${HEADER_FILE}.txt"
+    "#define ${name}_REPOSITORY \"${repository}\"\n")
+endfunction()
+
+append_info(${FIRST_NAME} "${FIRST_SOURCE_DIR}")
+if(DEFINED SECOND_SOURCE_DIR)
+  append_info(${SECOND_NAME} "${SECOND_SOURCE_DIR}")
 endif()
+
+# Copy the file only if it has changed.
+execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
+  "${HEADER_FILE}.txt" "${HEADER_FILE}")
+file(REMOVE "${HEADER_FILE}.txt")
+


Added more targets

Added more targets

--- config_new.cmake
+++ config_new.cmake
@@ -2,30 +2,43 @@
     KRAL_PATH       "${CMAKE_CURRENT_LIST_DIR}/KRAL/"
     PACKAGE_DIRS    "${CMAKE_CURRENT_LIST_DIR}/packages;${CMAKE_CURRENT_LIST_DIR}/thirdparty"
     PROJECTS_ROOT   "${CMAKE_CURRENT_LIST_DIR}/projects"
-    PLATFORM        "osx"
+    PLATFORM        osx
+    PROJECT_DIR     ${CMAKE_CURRENT_LIST_DIR}/SDLDemo
+    BUILD_DIR       SDLDemo
     PROJECT_TYPE    "Unix Makefiles"
+    BUILD_TYPE      debug
 )

 add_target (SDLDemo-qt
     INHERIT         __DEFAULT
     PLATFORM        qt5
-    PROJECT_DIR     ${CMAKE_CURRENT_LIST_DIR}/SDLDemo
-    BUILD_DIR       SDLDemo
     PROJECT_TYPE    "Unix Makefiles"
-    BUILD_TYPE      debug
     CUSTOM_ARGS     -Wdev
 )

 add_target (SDLDemo-osx
     INHERIT         __DEFAULT
     PLATFORM        osx
-    PROJECT_DIR     ${CMAKE_CURRENT_LIST_DIR}/SDLDemo
-    BUILD_DIR       SDLDemo
     PROJECT_TYPE    Xcode
-    BUILD_TYPE      debug
     CUSTOM_ARGS
         "-Wdev"
         " -DRUNTIME_DIR=debug"
         " -DIOS_SDK_PATH=\"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs\""
         " -DTARGETSDK=MacOSX10.9.sdk"
 )
+
+add_target (SDLDemo-web
+    INHERIT         __DEFAULT
+    PLATFORM        web
+    PROJECT_TYPE    "Unix Makefiles"
+    COMPILER_ARGS   "-Wno-warn-absolute-paths"
+    CUSTOM_ARGS     -Wdev
+    CUSTOM_ARGS_PD  "-DCMAKE_TOOLCHAIN_FILE=${KRAL_PATH}/Emscripten.cmake"
+)
+
+add_target (SDLDemo-cppcheck
+    INHERIT         __DEFAULT
+    PLATFORM        osx
+    CUSTOM_ARGS     -Wdev
+    CUSTOM_ARGS_PD  "-DCMAKE_TOOLCHAIN_FILE=${KRAL_PATH}/cppcheck.cmake"
+)


s/robertodr/scisoft/

s/robertodr/scisoft/

--- modules/boost/boost.cmake
+++ modules/boost/boost.cmake
@@ -12,7 +12,7 @@
 #   source: custom/boost_version-components.cmake
 #
 #   [boost]
-#   source: https://github.com/robertodr/autocmake/raw/booster/modules/boost/boost.cmake
+#   source: https://github.com/scisoft/autocmake/raw/booster/modules/boost/boost.cmake
 #   fetch: http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.zip
 #
 # The ``custom/boost_version-components.cmake`` should look like this::
@@ -46,13 +46,13 @@
 #
 # autocmake.cfg configuration::
 #
-#   fetch: https://github.com/robertodr/autocmake/raw/booster/modules/boost/boost_unpack.cmake
-#          https://github.com/robertodr/autocmake/raw/booster/modules/boost/boost_userconfig.cmake
-#          https://github.com/robertodr/autocmake/raw/booster/modules/boost/boost_configure.cmake
-#          https://github.com/robertodr/autocmake/raw/booster/modules/boost/boost_build.cmake
-#          https://github.com/robertodr/autocmake/raw/booster/modules/boost/boost_install.cmake
-#          https://github.com/robertodr/autocmake/raw/booster/modules/boost/boost_headers.cmake
-#          https://github.com/robertodr/autocmake/raw/booster/modules/boost/boost_cleanup.cmake
+#   fetch: https://github.com/scisoft/autocmake/raw/booster/modules/boost/boost_unpack.cmake
+#          https://github.com/scisoft/autocmake/raw/booster/modules/boost/boost_userconfig.cmake
+#          https://github.com/scisoft/autocmake/raw/booster/modules/boost/boost_configure.cmake
+#          https://github.com/scisoft/autocmake/raw/booster/modules/boost/boost_build.cmake
+#          https://github.com/scisoft/autocmake/raw/booster/modules/boost/boost_install.cmake
+#          https://github.com/scisoft/autocmake/raw/booster/modules/boost/boost_headers.cmake
+#          https://github.com/scisoft/autocmake/raw/booster/modules/boost/boost_cleanup.cmake
 #   docopt: --boost-headers=<BOOST_INCLUDEDIR> Include directories for Boost [default: ''].
 #           --boost-libraries=<BOOST_LIBRARYDIR> Library directories for Boost [default: ''].
 #           --build-boost=<FORCE_CUSTOM_BOOST> Deactivate Boost detection and build on-the-fly <ON/OFF> [default: OFF].


removed dependency to libtbbmalloc, Embree is not using it

--- common/cmake/FindTBB.cmake
+++ common/cmake/FindTBB.cmake
@@ -290,9 +290,7 @@

 if(TBB_FOUND AND TBB_DEBUG_FOUND)
   set(TBB_LIBRARIES
-    optimized TBB::tbbmalloc
     optimized TBB::tbb
-    debug     TBB_DEBUG::tbbmalloc
     debug     TBB_DEBUG::tbb)
   set(TBB_INCLUDE_DIRS ${EMBREE_TBB_INCLUDE_DIR} ${EMBREE_TBB_DEBUG_INCLUDE_DIR})
 elseif(TBB_FOUND)
@@ -300,12 +298,12 @@
   # falling back to the release version of TBB. This fallback is quite likely
   # to happen because users may use tbb as provided by their OS distribution.
   message(STATUS "Could not find TBB_DEBUG. Falling back to TBB in Debug mode. Consider setting EMBREE_TBB_DEBUG_ROOT or EMBREE_TBB_DEBUG_POSTIFX.")
-  set(TBB_LIBRARIES TBB::tbbmalloc TBB::tbb)
+  set(TBB_LIBRARIES TBB::tbb)
   set(TBB_INCLUDE_DIRS ${EMBREE_TBB_INCLUDE_DIR})
 elseif(TBB_DEBUG_FOUND)
   # Warn in this case because we are falling back to debug mode!
   message(WARNING "Could not find TBB. Falling back to TBB_DEBUG in Release mode. Consider setting EMBREE_TBB_ROOT or EMBREE_TBB_POSTIFX.")
-  set(TBB_LIBRARIES TBB_DEBUG::tbbmalloc TBB_DEBUG::tbb)
+  set(TBB_LIBRARIES TBB_DEBUG::tbb)
   set(TBB_INCLUDE_DIRS ${EMBREE_TBB_DEBUG_INCLUDE_DIR})
 else()
   message(FATAL_ERROR "Could not find TBB or TBB_DEBUG. Consider setting EMBREE_TBB_ROOT and EMBREE_TBB_DEBUG_ROOT.")
@@ -318,22 +316,22 @@
 IF (EMBREE_INSTALL_DEPENDENCIES)
   IF (TBB_FOUND)
     IF (WIN32)
-      INSTALL(PROGRAMS ${EMBREE_TBB_BIN_DIR}/${EMBREE_TBB_LIBRARY_NAME}.dll ${EMBREE_TBB_BIN_DIR}/${EMBREE_TBBMALLOC_LIBRARY_NAME}.dll DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
-      INSTALL(PROGRAMS ${EMBREE_TBB_LIB_DIR}/${EMBREE_TBB_LIBRARY_NAME}.lib ${EMBREE_TBB_LIB_DIR}/${EMBREE_TBBMALLOC_LIBRARY_NAME}.lib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
+      INSTALL(PROGRAMS ${EMBREE_TBB_BIN_DIR}/${EMBREE_TBB_LIBRARY_NAME}.dll DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
+      INSTALL(PROGRAMS ${EMBREE_TBB_LIB_DIR}/${EMBREE_TBB_LIBRARY_NAME}.lib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
     ELSEIF (APPLE)
-      INSTALL(PROGRAMS ${EMBREE_TBB_LIBRARY} ${EMBREE_TBBMALLOC_LIBRARY} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
+      INSTALL(PROGRAMS ${EMBREE_TBB_LIBRARY} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
     ELSE()
-      INSTALL(PROGRAMS ${EMBREE_TBB_LIBRARY}.2 ${EMBREE_TBBMALLOC_LIBRARY}.2 DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
+      INSTALL(PROGRAMS ${EMBREE_TBB_LIBRARY}.2 DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
     ENDIF()
   ENDIF()
   IF (TBB_DEBUG_FOUND)
     IF (WIN32)
-      INSTALL(PROGRAMS ${EMBREE_TBB_BIN_DIR}/${EMBREE_TBB_DEBUG_LIBRARY_NAME}.dll ${EMBREE_TBB_DEBUG_BIN_DIR}/${EMBREE_TBBMALLOC_DEBUG_LIBRARY_NAME}.dll DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
-      INSTALL(PROGRAMS ${EMBREE_TBB_LIB_DIR}/${EMBREE_TBB_DEBUG_LIBRARY_NAME}.lib ${EMBREE_TBB_DEBUG_LIB_DIR}/${EMBREE_TBBMALLOC_DEBUG_LIBRARY_NAME}.lib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
+      INSTALL(PROGRAMS ${EMBREE_TBB_BIN_DIR}/${EMBREE_TBB_DEBUG_LIBRARY_NAME}.dll DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
+      INSTALL(PROGRAMS ${EMBREE_TBB_LIB_DIR}/${EMBREE_TBB_DEBUG_LIBRARY_NAME}.lib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
     ELSEIF (APPLE)
-      INSTALL(PROGRAMS ${EMBREE_TBB_DEBUG_LIBRARY} ${EMBREE_TBBMALLOC_DEBUG_LIBRARY} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
+      INSTALL(PROGRAMS ${EMBREE_TBB_DEBUG_LIBRARY} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
     ELSE()
-      INSTALL(PROGRAMS ${EMBREE_TBB_DEBUG_LIBRARY}.2 ${EMBREE_TBBMALLOC_DEBUG_LIBRARY}.2 DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
+      INSTALL(PROGRAMS ${EMBREE_TBB_DEBUG_LIBRARY}.2 DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
     ENDIF()
   ENDIF()
 ENDIF()


enabling RPM changelog again

enabling RPM changelog again

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -222,10 +222,10 @@
     SET(CPACK_RPM_devel_PACKAGE_ARCHITECTURE noarch)
     SET(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0") # Apache Software License, Version 2.0
     SET(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
-    #SET(CPACK_RPM_CHANGELOG_FILE ${CMAKE_BINARY_DIR}/rpm_changelog.txt) # ChangeLog of the RPM
-    #STRING(TIMESTAMP CHANGELOG_DATE "%a %b %d %Y")
-    #SET(RPM_CHANGELOG "* ${CHANGELOG_DATE} Johannes Günther <johannes.guenther@intel.com> - ${EMBREE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}\n- First package")
-    #FILE(WRITE ${CPACK_RPM_CHANGELOG_FILE} ${RPM_CHANGELOG})
+    SET(CPACK_RPM_CHANGELOG_FILE ${CMAKE_BINARY_DIR}/rpm_changelog.txt) # ChangeLog of the RPM
+    STRING(TIMESTAMP CHANGELOG_DATE "%a %b %d %Y")
+    SET(RPM_CHANGELOG "* ${CHANGELOG_DATE} Johannes Günther <johannes.guenther@intel.com> - ${EMBREE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}\n- First package")
+    FILE(WRITE ${CPACK_RPM_CHANGELOG_FILE} ${RPM_CHANGELOG})
     SET(CPACK_RPM_PACKAGE_URL http://embree.github.io/)
     SET(CPACK_RPM_DEFAULT_DIR_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) # otherwise cmake directory has wrong 775 permissions


added /std:c++latest for MSVC

added /std:c++latest for MSVC

--- scripts/common.cmake
+++ scripts/common.cmake
@@ -139,6 +139,7 @@
 endif()

 if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+    add_compiler_flags(/std:c++latest) # for post c++14 updates in MSVC
     add_compiler_flags(/WX)
     add_compiler_flags(/W4) # /Wall is too aggressive - even the standard C headers give thousands of errors...
 endif()


cmake: FindPowercap: only handle args if pkg-config runs successfully

--- cmake/FindPowercap.cmake
+++ cmake/FindPowercap.cmake
@@ -16,10 +16,12 @@
 if(PKG_CONFIG_FOUND)
   pkg_check_modules(PC_Powercap QUIET powercap)
 endif()
-find_package_handle_standard_args(Powercap
-                                  REQUIRED_VARS PC_Powercap_LINK_LIBRARIES
-                                                PC_Powercap_INCLUDE_DIRS
-                                  VERSION_VAR PC_Powercap_VERSION)
+if(PC_Powercap_FOUND)
+  find_package_handle_standard_args(Powercap
+                                    REQUIRED_VARS PC_Powercap_LINK_LIBRARIES
+                                                  PC_Powercap_INCLUDE_DIRS
+                                    VERSION_VAR PC_Powercap_VERSION)
+endif()
 if(Powercap_FOUND)
   if(NOT TARGET Powercap::powercap)
     add_library(Powercap::powercap UNKNOWN IMPORTED)


Don't give warning when CMAKE_INSTALL_PREFIX is the default

--- cmake/Installation.cmake
+++ cmake/Installation.cmake
@@ -22,7 +22,6 @@
 if (NOT CMAKE_INSTALL_PREFIX)
   set(CMAKE_INSTALL_PREFIX $ENV{BDM_INSTALL_DIR} CACHE PATH "BioDynaMo install prefix" FORCE)
 elseif(CMAKE_INSTALL_PREFIX STREQUAL "/usr/local")
-  message(WARNING "Changing default CMAKE_PREFIX_PATH to $ENV{BDM_INSTALL_DIR}")
   set(CMAKE_INSTALL_PREFIX $ENV{BDM_INSTALL_DIR} CACHE PATH "BioDynaMo install prefix" FORCE)
 elseif( CMAKE_INSTALL_PREFIX AND NOT CMAKE_INSTALL_PREFIX STREQUAL "$ENV{BDM_INSTALL_DIR}" )
   message(FATAL_ERROR "CMAKE_INSTALL_PREFIX must be $ENV{BDM_INSTALL_DIR}")


Make unified build paths relative to PROJECT_SOURCE_DIR

--- cmake/UnifiedBuild.cmake
+++ cmake/UnifiedBuild.cmake
@@ -44,11 +44,11 @@
       set(source_abs_path "${CMAKE_CURRENT_SOURCE_DIR}/${source_file}")
     endif()

-    # Convert it to a path relative to the root of the P4C source tree. It's
+    # Convert it to a path relative to the root of the project source tree. It's
     # important to avoid absolute paths in generated C++ code; including them
     # will prevent ccache from reusing results between different checkouts of
     # the same repo.
-    file(RELATIVE_PATH source_rel_path ${P4C_SOURCE_DIR} ${source_abs_path})
+    file(RELATIVE_PATH source_rel_path ${PROJECT_SOURCE_DIR} ${source_abs_path})

     set(include_directive "#include \"${source_rel_path}\"\n")
     string(CONCAT chunk_contents ${chunk_contents} ${include_directive})


update xpu cmake for kunlun (#33328)

update xpu cmake for kunlun (#33328)

--- cmake/external/xpu.cmake
+++ cmake/external/xpu.cmake
@@ -7,52 +7,70 @@
 SET(XPU_API_LIB_NAME            "libxpuapi.so")
 SET(XPU_RT_LIB_NAME             "libxpurt.so")

-if(NOT XPU_SDK_ROOT)
-  if (WITH_AARCH64)
-      SET(XPU_URL    "https://baidu-kunlun-public.su.bcebos.com/paddle_depence/aarch64/xpu_2021_01_13.tar.gz" CACHE STRING "" FORCE)
-  elseif(WITH_SUNWAY)
-      SET(XPU_URL    "https://baidu-kunlun-public.su.bcebos.com/paddle_depence/sunway/xpu_2021_01_13.tar.gz" CACHE STRING "" FORCE)
-  else()
-      SET(XPU_URL    "https://baidu-kunlun-public.su.bcebos.com/paddle_depence/xpu_2021_05_19.tar.gz" CACHE STRING "" FORCE)
-  endif()
+IF(WITH_AARCH64)
+  SET(XPU_XRE_DIR_NAME "xre-kylin_aarch64")
+  SET(XPU_XDNN_DIR_NAME "xdnn-kylin_aarch64")
+  SET(XPU_XCCL_DIR_NAME "xccl-kylin_aarch64")
+ELSEIF(WITH_SUNWAY)
+  SET(XPU_XRE_DIR_NAME "xre-deepin_sw6_64")
+  SET(XPU_XDNN_DIR_NAME "xdnn-deepin_sw6_64")
+  SET(XPU_XCCL_DIR_NAME "xccl-deepin_sw6_64")
+ELSEIF(WITH_BDCENTOS)
+  SET(XPU_XRE_DIR_NAME "xre-bdcentos_x86_64")
+  SET(XPU_XDNN_DIR_NAME "xdnn-bdcentos_x86_64")
+  SET(XPU_XCCL_DIR_NAME "xccl-bdcentos_x86_64")
+ELSEIF(WITH_UBUNTU)
+  SET(XPU_XRE_DIR_NAME "xre-ubuntu_x86_64")
+  SET(XPU_XDNN_DIR_NAME "xdnn-ubuntu_x86_64")
+  SET(XPU_XCCL_DIR_NAME "xccl-bdcentos_x86_64")
+ELSEIF(WITH_CENTOS)
+  SET(XPU_XRE_DIR_NAME "xre-centos7_x86_64")
+  SET(XPU_XDNN_DIR_NAME "xdnn-centos7_x86_64")
+  SET(XPU_XCCL_DIR_NAME "xccl-bdcentos_x86_64")
+ELSE ()
+  SET(XPU_XRE_DIR_NAME "xre-ubuntu_x86_64")
+  SET(XPU_XDNN_DIR_NAME "xdnn-ubuntu_x86_64")
+  SET(XPU_XCCL_DIR_NAME "xccl-bdcentos_x86_64")
+ENDIF()

-  SET(XPU_SOURCE_DIR              "${THIRD_PARTY_PATH}/xpu")
-  SET(XPU_DOWNLOAD_DIR            "${XPU_SOURCE_DIR}/src/${XPU_PROJECT}")
-  SET(XPU_INSTALL_DIR             "${THIRD_PARTY_PATH}/install/xpu")
-  SET(XPU_API_INC_DIR             "${THIRD_PARTY_PATH}/install/xpu/include")
-  SET(XPU_LIB_DIR                 "${THIRD_PARTY_PATH}/install/xpu/lib")
+SET(XPU_BASE_URL "https://baidu-kunlun-product.cdn.bcebos.com/KL-SDK/klsdk-dev/20210527")
+SET(XPU_XRE_URL  "${XPU_BASE_URL}/${XPU_XRE_DIR_NAME}.tar.gz" CACHE STRING "" FORCE)
+SET(XPU_XDNN_URL "${XPU_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz" CACHE STRING "" FORCE)
+SET(XPU_XCCL_URL "${XPU_BASE_URL}/${XPU_XCCL_DIR_NAME}.tar.gz" CACHE STRING "" FORCE)
+SET(XPU_PACK_DEPENCE_URL "https://baidu-kunlun-public.su.bcebos.com/paddle_depence/pack_paddle_depence.sh" CACHE STRING "" FORCE)

-  SET(XPU_API_LIB                 "${XPU_LIB_DIR}/${XPU_API_LIB_NAME}")
-  SET(XPU_RT_LIB                  "${XPU_LIB_DIR}/${XPU_RT_LIB_NAME}")
+SET(XPU_SOURCE_DIR              "${THIRD_PARTY_PATH}/xpu")
+SET(XPU_DOWNLOAD_DIR            "${XPU_SOURCE_DIR}/src/${XPU_PROJECT}")
+SET(XPU_INSTALL_DIR             "${THIRD_PARTY_PATH}/install/xpu")
+SET(XPU_INC_DIR                 "${THIRD_PARTY_PATH}/install/xpu/include")
+SET(XPU_LIB_DIR                 "${THIRD_PARTY_PATH}/install/xpu/lib")

-  SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}" "${XPU_INSTALL_DIR}/lib")
+SET(XPU_API_LIB                 "${XPU_LIB_DIR}/${XPU_API_LIB_NAME}")
+SET(XPU_RT_LIB                  "${XPU_LIB_DIR}/${XPU_RT_LIB_NAME}")

-  FILE(WRITE ${XPU_DOWNLOAD_DIR}/CMakeLists.txt
-    "PROJECT(XPU)\n"
-    "cmake_minimum_required(VERSION 3.0)\n"
-    "install(DIRECTORY xpu/include xpu/lib \n"
-    "        DESTINATION ${XPU_INSTALL_DIR})\n")
+SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}" "${XPU_INSTALL_DIR}/lib")

-  ExternalProject_Add(
-      ${XPU_PROJECT}
-      ${EXTERNAL_PROJECT_LOG_ARGS}
-      PREFIX                ${XPU_SOURCE_DIR}
-      DOWNLOAD_DIR          ${XPU_DOWNLOAD_DIR}
-      DOWNLOAD_COMMAND      wget --no-check-certificate ${XPU_URL} -c -q -O xpu.tar.gz
-                            && tar xvf xpu.tar.gz
-      DOWNLOAD_NO_PROGRESS  1
-      UPDATE_COMMAND        ""
-      CMAKE_ARGS            -DCMAKE_INSTALL_PREFIX=${XPU_INSTALL_ROOT}
-      CMAKE_CACHE_ARGS      -DCMAKE_INSTALL_PREFIX:PATH=${XPU_INSTALL_ROOT}
-  )
-else()
-  SET(XPU_API_INC_DIR   "${XPU_SDK_ROOT}/XTDK/include/")
-  SET(XPU_API_LIB "${XPU_SDK_ROOT}/XTDK/shlib/libxpuapi.so")
-  SET(XPU_RT_LIB "${XPU_SDK_ROOT}/XTDK/runtime/shlib/libxpurt.so")
-  SET(XPU_LIB_DIR "${XPU_SDK_ROOT}/XTDK/shlib/")
-endif()
+FILE(WRITE ${XPU_DOWNLOAD_DIR}/CMakeLists.txt
+  "PROJECT(XPU)\n"
+  "cmake_minimum_required(VERSION 3.0)\n"
+  "install(DIRECTORY xpu/include xpu/lib \n"
+  "        DESTINATION ${XPU_INSTALL_DIR})\n")

-INCLUDE_DIRECTORIES(${XPU_API_INC_DIR})
+ExternalProject_Add(
+    ${XPU_PROJECT}
+    ${EXTERNAL_PROJECT_LOG_ARGS}
+    PREFIX                ${XPU_SOURCE_DIR}
+    DOWNLOAD_DIR          ${XPU_DOWNLOAD_DIR}
+    DOWNLOAD_COMMAND      wget ${XPU_PACK_DEPENCE_URL}
+                          && bash pack_paddle_depence.sh ${XPU_XRE_URL} ${XPU_XRE_DIR_NAME} ${XPU_XDNN_URL} ${XPU_XDNN_DIR_NAME} ${XPU_XCCL_URL} ${XPU_XCCL_DIR_NAME}
+
+    DOWNLOAD_NO_PROGRESS  1
+    UPDATE_COMMAND        ""
+    CMAKE_ARGS            -DCMAKE_INSTALL_PREFIX=${XPU_INSTALL_ROOT}
+    CMAKE_CACHE_ARGS      -DCMAKE_INSTALL_PREFIX:PATH=${XPU_INSTALL_ROOT}
+)
+
+INCLUDE_DIRECTORIES(${XPU_INC_DIR})
 ADD_LIBRARY(shared_xpuapi SHARED IMPORTED GLOBAL)
 set_property(TARGET shared_xpuapi PROPERTY IMPORTED_LOCATION "${XPU_API_LIB}")

@@ -62,7 +80,7 @@

 TARGET_LINK_LIBRARIES(xpulib ${XPU_API_LIB} ${XPU_RT_LIB})

-if (WITH_XPU_BKCL)
+IF(WITH_XPU_BKCL)
   MESSAGE(STATUS "Compile with XPU BKCL!")
   ADD_DEFINITIONS(-DPADDLE_WITH_XPU_BKCL)

@@ -71,9 +89,9 @@
   SET(XPU_BKCL_INC_DIR          "${THIRD_PARTY_PATH}/install/xpu/include")
   INCLUDE_DIRECTORIES(${XPU_BKCL_INC_DIR})
   TARGET_LINK_LIBRARIES(xpulib ${XPU_API_LIB} ${XPU_RT_LIB} ${XPU_BKCL_LIB})
-else(WITH_XPU_BKCL)
-  TARGET_LINK_LIBRARIES(xpulib ${XPU_API_LIB} ${XPU_RT_LIB} )
-endif(WITH_XPU_BKCL)
+ELSE(WITH_XPU_BKCL)
+  TARGET_LINK_LIBRARIES(xpulib ${XPU_API_LIB} ${XPU_RT_LIB})
+ENDIF(WITH_XPU_BKCL)

 if(NOT XPU_SDK_ROOT)
   ADD_DEPENDENCIES(xpulib ${XPU_PROJECT})


modify xpu.cmake,*test=kunlun (#41832)

modify xpu.cmake,*test=kunlun (#41832)

* modify xpu.cmake,*test=kunlun

* modify xpu.cmake,*test=kunlun

* modify xpu.cmake,*test=kunlun

* modify xpu.cmake,*test=kunlun

--- cmake/external/xpu.cmake
+++ cmake/external/xpu.cmake
@@ -24,9 +24,9 @@

 IF(WITH_AARCH64)
   SET(XPU_XRE_DIR_NAME "xre-kylin_aarch64")
-  SET(XPU_XDNN_DIR_NAME "xdnn-kylin_aarch64")
+  SET(XPU_XDNN_DIR_NAME "XDNN-kylin_aarch64")
   SET(XPU_XCCL_DIR_NAME "xccl-kylin_aarch64")
-  SET(XPU_XDNN_URL "${XPU_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz" CACHE STRING "" FORCE)
+  SET(XPU_XDNN_URL "${XPU_XDNN_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz" CACHE STRING "" FORCE)
 ELSEIF(WITH_SUNWAY)
   SET(XPU_XRE_DIR_NAME "xre-deepin_sw6_64")
   SET(XPU_XDNN_DIR_NAME "xdnn-deepin_sw6_64")


use pods for lcm jar

use pods for lcm jar

git-svn-id: cf55bc44fb097054a32fc70455a459c940dbbffc@7788 c9849af7-e679-4ec6-a44e-fc146a885bd3

--- cmake/new_lcmtypes.cmake
+++ cmake/new_lcmtypes.cmake
@@ -140,17 +140,15 @@
     find_package(Java REQUIRED)
     include(UseJava)

-    execute_process(COMMAND pkg-config --variable=classpath lcm-java OUTPUT_VARIABLE LCM_JAR_FILE OUTPUT_STRIP_TRAILING_WHITESPACE)
-    if(NOT LCM_JAR_FILE)
-        message(STATUS "Not building Java LCM type bindings (Can't find lcm.jar)")
-        return()
-    endif()
-    set(CMAKE_JAVA_INCLUDE_PATH ${LCM_JAR_FILE})
+    pods_use_pkg_config_classpath(lcm-java)

     add_jar(${LCMTYPES_JARNAME} ${LCMTYPES_JAVA_SOURCEFILES})

-    #  todo: add install rules
-
+    pods_install_pkg_config_file(lcmtypes_${PROJECT_NAME}-java
+    	CLASSPATH ${LCMTYPES_JARNAME}
+    	DESCRIPTION "LCM type java bindings for ${PROJECT_NAME}"
+    	REQUIRES lcm-java
+    	VERSION 0.0.0)
   endif()
 endmacro()


Fix: no need for pcl_examples it is all handled in examples/CMakeLists.txt

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

--- cmake/pcl_examples.cmake
+++ cmake/pcl_examples.cmake
@@ -1,17 +0,0 @@
-# Example management
-
-# Add an option so the user can turn tests off
-option(BUILD_EXAMPLES "Build the library examples" ${DEFAULT})
-
-# Print a suitable status message
-if(NOT ${DEFAULT} AND NOT ${BUILD_EXAMPLES})
-    if(REASON)
-        message(STATUS "Examples will not be built: ${REASON}")
-    else(REASON)
-        message(STATUS "Examples will not be built: Disabled manually")
-    endif(REASON)
-elseif(NOT ${BUILD_EXAMPLES})
-    message(STATUS "Examples will not be built: Disabled manually")
-else(NOT ${DEFAULT} AND NOT ${BUILD_EXAMPLES})
-    message(STATUS "Examples will be built")
-endif(NOT ${DEFAULT} AND NOT ${BUILD_EXAMPLES})


fixed a typo

fixed a typo

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

--- cmake/pcl_find_sse.cmake
+++ cmake/pcl_find_sse.cmake
@@ -138,7 +138,7 @@
       endif ()

     endif()
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${SSE_FLAGS}")
+    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${SSE_FLAGS}")
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${SSE_FLAGS}")
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${SSE_FLAGS}")


Add -march=skylake-avx512 when required

Add -march=skylake-avx512 when required

fixes #1797

--- cmake/system_check.cmake
+++ cmake/system_check.cmake
@@ -71,6 +71,8 @@
 execute_process(COMMAND ${CMAKE_C_COMPILER} -march=skylake-avx512 -v -o ${PROJECT_BINARY_DIR}/avx512.o -x c ${PROJECT_BINARY_DIR}/avx512.tmp OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_AVX512)
 if (NO_AVX512 EQUAL 1)
 set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX512")
+else()
+set (CCOMMON_OPT "${CCOMMON_OPT} -march=skylake-avx512")
 endif()
   file(REMOVE "avx512.tmp" "avx512.o")
 endif()


BUG: mantis-1306 call patch source on tiff

--- SuperBuild/CMake/External_tiff.cmake
+++ SuperBuild/CMake/External_tiff.cmake
@@ -71,6 +71,8 @@
     )
 endif()

+SUPERBUILD_PATCH_SOURCE(TIFF)
+
 set(_SB_TIFF_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
 if(WIN32)
   set(_SB_TIFF_LIBRARY ${SB_INSTALL_PREFIX}/lib/libtiff_i.lib)


ENH: Update git tag to latest version of QTGUI

--- SuperBuild/External_QtToCppXML.cmake
+++ SuperBuild/External_QtToCppXML.cmake
@@ -63,7 +63,7 @@

   ### --- End Project specific additions
   set( ${proj}_REPOSITORY ${git_protocol}://github.com/NIRALUser/QTGUI.git)
-  set( ${proj}_GIT_TAG b1872562d56ca132a29bde0caaea2c0e1aaf3269 )
+  set( ${proj}_GIT_TAG 417244bbafd626c10b709bbc413ff702333c5692 )
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


ConfigureChecks: Ensure LIBUTIL_LIBRARIES is set after first configure

This commit fixes regression introduced in 046ad41 (ConfigureChecks: Add
support for system not expecting "libutil" (e.g VxWorks))

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -367,10 +367,10 @@
   else()
     if(NOT DEFINED HAVE_LIBUTIL OR "${HAVE_LIBUTIL}" STREQUAL "")
       find_library(HAVE_LIBUTIL util)
-      if(HAVE_LIBUTIL)
-        set(LIBUTIL_LIBRARIES ${HAVE_LIBUTIL})
-      endif()
       message(STATUS "Found libutil: ${HAVE_LIBUTIL}")
+    endif()
+    if(HAVE_LIBUTIL)
+      set(LIBUTIL_LIBRARIES ${HAVE_LIBUTIL})
     endif()
   endif()
   if(NOT HAVE_LIBUTIL)


cmake: Abort early if Python3 is not found

When Python3 is not found the build system will warn the user and then
continue. Python3 is required and continuing can only confuse the user
with new off-topic error messages.

This patch denotes Python3 as required to resolve this.

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

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -96,7 +96,10 @@

 include(${ZEPHYR_BASE}/cmake/extensions.cmake)

-find_package(PythonInterp 3.4)
+find_package(
+  PythonInterp 3.4
+  REQUIRED
+  )

 include(${ZEPHYR_BASE}/cmake/ccache.cmake)


cmake generated files

cmake generated files

--- cmake/cmake_uninstall.cmake
+++ cmake/cmake_uninstall.cmake
@@ -1,32 +0,0 @@
-# http://www.vtk.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
-
-IF(NOT EXISTS "C:/Documents and Settings/aaa/Mes documents/GitHub/libmgf/install_manifest.txt")
-    MESSAGE(FATAL_ERROR "Cannot find install manifest: \"C:/Documents and Settings/aaa/Mes documents/GitHub/libmgf/install_manifest.txt\"")
-ENDIF(NOT EXISTS "C:/Documents and Settings/aaa/Mes documents/GitHub/libmgf/install_manifest.txt")
-
-FILE(READ "C:/Documents and Settings/aaa/Mes documents/GitHub/libmgf/install_manifest.txt" files)
-STRING(REGEX REPLACE "\n" ";" files "${files}")
-FOREACH(file ${files})
-  MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
-  IF(EXISTS "$ENV{DESTDIR}${file}")
-    EXEC_PROGRAM(
-      "C:/Program Files/CMake 2.8/bin/cmake.exe" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
-      OUTPUT_VARIABLE rm_out
-      RETURN_VALUE rm_retval
-      )
-    IF(NOT "${rm_retval}" STREQUAL 0)
-      MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
-    ENDIF(NOT "${rm_retval}" STREQUAL 0)
-  ELSEIF(IS_SYMLINK "$ENV{DESTDIR}${file}")
-    EXEC_PROGRAM(
-      "C:/Program Files/CMake 2.8/bin/cmake.exe" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
-      OUTPUT_VARIABLE rm_out
-      RETURN_VALUE rm_retval
-      )
-    IF(NOT "${rm_retval}" STREQUAL 0)
-      MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
-    ENDIF(NOT "${rm_retval}" STREQUAL 0)
-  ELSE(EXISTS "$ENV{DESTDIR}${file}")
-    MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
-  ENDIF(EXISTS "$ENV{DESTDIR}${file}")
-ENDFOREACH(file)


fix(cmake/modules): provide built openssl binary when using bundled deps

Signed-off-by: Leonardo Di Donato <2012e0ca99d70aa6c893822ff73002216e5dba72@gmail.com>

--- cmake/modules/OpenSSL.cmake
+++ cmake/modules/OpenSSL.cmake
@@ -13,10 +13,11 @@
   set(OPENSSL_INCLUDE_DIR "${PROJECT_BINARY_DIR}/openssl-prefix/src/openssl/include")
   set(OPENSSL_LIBRARY_SSL "${OPENSSL_INSTALL_DIR}/lib/libssl.a")
   set(OPENSSL_LIBRARY_CRYPTO "${OPENSSL_INSTALL_DIR}/lib/libcrypto.a")
+  set(OPENSSL_BINARY "${OPENSSL_INSTALL_DIR}/bin/openssl")

   message(STATUS "Using bundled openssl in '${OPENSSL_BUNDLE_DIR}'")

-  externalproject_add(
+  ExternalProject_Add(
     openssl
     # START CHANGE for CVE-2017-3735, CVE-2017-3731, CVE-2017-3737, CVE-2017-3738, CVE-2017-3736
     URL "https://s3.amazonaws.com/download.draios.com/dependencies/openssl-1.0.2n.tar.gz"


Improve the help message

Improve the help message

--- testing/run_tests.sh.cmake
+++ testing/run_tests.sh.cmake
@@ -364,9 +364,9 @@
     echo -e "\trun_tests.sh [options]"
     echo ""
     echo "OPTIONS"
-    echo -e "\t-t, --targets"
+    echo -e "\t-t, --targets <targets>"
     echo -e "\t\tSet the test targets. Supported targets: $($PHYSISC --list-targets)."
-    echo -e "\t-s, --source"
+    echo -e "\t-s, --source <source-names>"
     echo -e "\t\tSet the test source files."
     echo -e "\t--translate"
     echo -e "\t\tTest only translation and its dependent tasks."
@@ -376,9 +376,9 @@
     echo -e "\t\tTest only execution and its dependent tasks."
     echo -e "\t-m, --mpirun"
     echo -e "\t\tThe mpirun command for testing MPI-based runs."
-    echo -e "\t--np"
-    echo -e "\t\tThe number of MPI processes."
-    echo -e "\t--machinefile"
+    echo -e "\t--np <num-pe>"
+    echo -e "\t\tThe number of MPI processes. Multiple values can be passed with quotations."
+    echo -e "\t--machinefile <file-path>"
     echo -e "\t\tThe MPI machinefile."
 }


Silence MPI Warnings *sssssh*

Silence MPI Warnings *sssssh*

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

--- deal.II/cmake/configure/configure_1_mpi.cmake
+++ deal.II/cmake/configure/configure_1_mpi.cmake
@@ -18,7 +18,7 @@

 MACRO(FEATURE_MPI_FIND_EXTERNAL var)
-  FIND_PACKAGE(MPI)
+  FIND_PACKAGE(MPI QUIET)

   IF(MPI_CXX_FOUND)
     # Hide some variables:


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


code and comment refactor

code and comment refactor

--- ctest/steer.cmake
+++ ctest/steer.cmake
@@ -67,11 +67,13 @@
 endif()

 ## -- Process timeout in seconds
-set(CTEST_TIMEOUT "7200")
+# each test gets 1500s; 26 * 1500 = 39000s
+set(CTEST_TIMEOUT "39000")

 ## -- Set output to english
 set($ENV{LC_MESSAGES} "en_EN" )

+## -- Set the CMAKE variable here for use downstream in the CTestList file
 if (NOT ${CTEST_SOURCE_DIRECTORY} STREQUAL "")
   set(CMAKE_SOURCE_DIR ${CTEST_SOURCE_DIRECTORY})
 endif()
@@ -85,8 +87,8 @@
 configure_file(${CTEST_SOURCE_DIRECTORY}/ctest/CTestConfig.cmake ${CTEST_BINARY_DIRECTORY}/CTestConfig.cmake)

 ## -- CTest Testfile
-#configure_file(${CTEST_SOURCE_DIRECTORY}/ctest/CTestTestfile.cmake ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake)
-configure_file(${CTEST_SOURCE_DIRECTORY}/reg_tests/CTestList.cmake ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake)
+configure_file(${CTEST_SOURCE_DIRECTORY}/ctest/CTestTestfile.cmake ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake)
+#configure_file(${CTEST_SOURCE_DIRECTORY}/reg_tests/CTestList.cmake ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake)

 ## -- Start
 message(" -- Starting test on ${MODEL} --")


make gsoap_2.7.17.zip available

make gsoap_2.7.17.zip available

* see issue https://github.com/smanders/externpro/issues/141

--- projects/gsoap.cmake
+++ projects/gsoap.cmake
@@ -17,7 +17,7 @@
   GIT_UPSTREAM git://github.com/stoneyrh/gSOAP.git
   GIT_TAG xp${VER} # what to 'git checkout'
   GIT_REF v${VER} # create patch from this tag to 'git checkout'
-  DLURL https://downloads.sourceforge.net/project/gsoap2/gsoap-${VER2}/gSOAP%20${VER}/gsoap_${VER}.zip
+  DLURL https://github.com/smanders/externpro/releases/download/17.05.1/gsoap_${VER}.zip
   DLMD5 6f58cabfc67b4d5eafd1a30057fc4343
   PATCH ${PATCH_DIR}/gsoap.patch
   DIFF ${REPO}/compare/smanders:


#1285 - Various fixes in OpenIGTLink, updating version tag to b3f5dee767

git-svn-id: f70d4c833b20674991d6651a5f592bbdbe6b47b2@8378 30ced1d1-d8fb-0310-b896-84269ee58dd6

--- CMake/CMakeExternals/OPENIGTLINK.cmake
+++ CMake/CMakeExternals/OPENIGTLINK.cmake
@@ -35,7 +35,7 @@
 IF(NOT DEFINED OpenIGTLink_DIR)

     #1273 - OpenIGTLink version update due to bugfixes.
-    SET(revision_tag 96cea91028)
+    SET(revision_tag b3f5dee767)
     IF(${proj}_REVISION_TAG)
         SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


removed conflict tag

removed conflict tag

--- pgmlink.cmake
+++ pgmlink.cmake
@@ -70,4 +70,3 @@
 endif()

 endif (NOT pgmlink_NAME)
->>>>>>> public_master


ConfigureChecks.cmake:
    - added very simple check to find system-provided iconv library, it
      may be required to use iconv* functions on some systems;
    - added checks for functions mbstowcs, wcstombs, nanosleep;
    - added check for __func__ symbol;
    - iconv* functions will now be checked only when LOG4CPLUS_WITH_ICONV
      is defined, it mimics behaviour of autotools build system;
    - added proper checks for DECLSPEC_EXPORT/IMPORT/PRIVATE, taken from
      autotools files;
    - added thread-local support detection;
    - added C++11 atomics detection.

Patch provided by: Chernyshev Vyacheslav

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -4,6 +4,7 @@
 include(CheckSymbolExists)
 include(CheckTypeSize)
 include(CheckCSourceCompiles)
+include(CheckCXXSourceCompiles)

 check_include_files(dlfcn.h  HAVE_DLFCN_H )

@@ -44,6 +45,7 @@
 find_library(LIBKERNEL32 kernel32)
 find_library(LIBNSL nsl)
 find_library(LIBRT rt)
+find_library(LIBICONV iconv)
 find_library(LIBPOSIX4 posix4)
 find_library(LIBCPOSIX cposix)
 find_library(LIBSOCKET socket)
@@ -63,12 +65,6 @@
 check_function_exists(ntohs         LOG4CPLUS_HAVE_NTOHS )
 check_function_exists(htonl         LOG4CPLUS_HAVE_HTONL )
 check_function_exists(ntohl         LOG4CPLUS_HAVE_NTOHL )
-check_function_exists(iconv_open    LOG4CPLUS_HAVE_ICONV_OPEN )
-check_function_exists(iconv_close   LOG4CPLUS_HAVE_ICONV_CLOSE )
-check_function_exists(iconv         LOG4CPLUS_HAVE_ICONV )
-#check_function_exists(libiconv_open LOG4CPLUS_HAVE_ICONV_OPEN )
-#check_function_exists(libiconv_close LOG4CPLUS_HAVE_ICONV_CLOSE )
-#check_function_exists(libiconv      LOG4CPLUS_HAVE_ICONV )
 check_function_exists(vsnprintf     LOG4CPLUS_HAVE_VSNPRINTF )
 check_function_exists(_vsnprintf    LOG4CPLUS_HAVE__VSNPRINTF )
 check_function_exists(vsprintf_s    LOG4CPLUS_HAVE_VSPRINTF_S )
@@ -77,12 +73,15 @@
 check_function_exists(vfwprintf_s   LOG4CPLUS_HAVE_VFWPRINTF_S )
 check_function_exists(_vsnprintf_s  LOG4CPLUS_HAVE__VSNPRINTF_S )
 check_function_exists(_vsnwprintf_s LOG4CPLUS_HAVE__VSNWPRINTF_S )
+check_function_exists(mbstowcs      LOG4CPLUS_HAVE_MBSTOWCS )
+check_function_exists(wcstombs      LOG4CPLUS_HAVE_WCSTOMBS )

 check_symbol_exists(ENAMETOOLONG          errno.h       LOG4CPLUS_HAVE_ENAMETOOLONG )
 check_symbol_exists(SYS_gettid            sys/syscall.h LOG4CPLUS_HAVE_GETTID )
 check_symbol_exists(__FUNCTION__          ""            LOG4CPLUS_HAVE_FUNCTION_MACRO )
 check_symbol_exists(__PRETTY_FUNCTION__   ""            LOG4CPLUS_HAVE_PRETTY_FUNCTION_MACRO )
+check_symbol_exists(__func__              ""            LOG4CPLUS_HAVE_FUNC_SYMBOL )

 check_c_source_compiles("#include <stdlib.h> \n int main() { int x = 1; int y = __sync_add_and_fetch (&x, 1); return y;}"
                         LOG4CPLUS_HAVE___SYNC_ADD_AND_FETCH )
@@ -104,21 +103,209 @@
     LOG4CPLUS_HAVE_CLOCK_GETTIME )
   check_library_exists("${LIBRT}" clock_nanosleep ""
     LOG4CPLUS_HAVE_CLOCK_NANOSLEEP )
+  check_library_exists("${LIBRT}" nanosleep ""
+    LOG4CPLUS_HAVE_NANOSLEEP )
 else ()
   check_function_exists(clock_gettime LOG4CPLUS_HAVE_CLOCK_GETTIME )
   check_function_exists(clock_nanosleep LOG4CPLUS_HAVE_CLOCK_NANOSLEEP )
+  check_function_exists(nanosleep LOG4CPLUS_HAVE_NANOSLEEP )
 endif ()
+
+# iconv functions may require iconv library (on OS X for example)
+if(LOG4CPLUS_WITH_ICONV)
+  if(LIBICONV)
+    check_library_exists("${LIBICONV}" iconv_open  "" LOG4CPLUS_HAVE_ICONV_OPEN )
+    check_library_exists("${LIBICONV}" iconv_close "" LOG4CPLUS_HAVE_ICONV_CLOSE )
+    check_library_exists("${LIBICONV}" iconv       "" LOG4CPLUS_HAVE_ICONV )
+  else()
+    check_function_exists(iconv_open  LOG4CPLUS_HAVE_ICONV_OPEN )
+    check_function_exists(iconv_close LOG4CPLUS_HAVE_ICONV_CLOSE )
+    check_function_exists(iconv       LOG4CPLUS_HAVE_ICONV )
+  endif()
+endif()

 check_function_exists(gethostbyname_r LOG4CPLUS_HAVE_GETHOSTBYNAME_R) # TODO more complicated test in AC
 check_function_exists(getaddrinfo     LOG4CPLUS_HAVE_GETADDRINFO ) # TODO more complicated test in AC

 # check for declspec stuff
-check_c_source_compiles("int __attribute__ ((visibility(\"default\"))) main(void) { return 0; }" HAVE_ATTRIBUTE_VISIBILITY_DEFAULT)
-if(HAVE_ATTRIBUTE_VISIBILITY_DEFAULT)
-  set(LOG4CPLUS_DECLSPEC_EXPORT "__attribute__ ((visibility(\"default\")))" )
-endif()
-set(LOG4CPLUS_DECLSPEC_IMPORT "" )
+if(NOT DEFINED LOG4CPLUS_DECLSPEC_EXPORT)
+  check_c_source_compiles(
+    "#if defined (__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 1))
+     # error Please fail.
+     #endif
+
+     __attribute__((visibility(\"default\"))) int x = 0;
+     __attribute__((visibility(\"default\"))) int foo();
+     int foo() { return 0; }
+     __attribute__((visibility(\"default\"))) int bar() { return x; }
+     __attribute__((visibility(\"hidden\"))) int baz() { return 1; }
+
+     int main(void) { return 0; }"
+   HAVE_ATTRIBUTE_VISIBILITY
+  )
+  if(HAVE_ATTRIBUTE_VISIBILITY)
+    set(LOG4CPLUS_DECLSPEC_EXPORT "__attribute__ ((visibility(\"default\")))" )
+    set(LOG4CPLUS_DECLSPEC_IMPORT "__attribute__ ((visibility(\"default\")))" )
+    set(LOG4CPLUS_DECLSPEC_PRIVATE "__attribute__ ((visibility(\"hidden\")))" )
+  endif()
+endif()
+
+if(NOT DEFINED LOG4CPLUS_DECLSPEC_EXPORT)
+  check_c_source_compiles(
+    "#if defined (__clang__)
+     // Here the problem is that Clang only warns that it does not support
+     // __declspec(dllexport) but still compiles the executable.
+     # error Please fail.
+     #endif
+
+     __declspec(dllexport) int x = 0;
+     __declspec(dllexport) int foo ();
+     int foo () { return 0; }
+     __declspec(dllexport) int bar () { return x; }
+
+     int main(void) { return 0; }"
+    HAVE_DECLSPEC_DLLEXPORT
+  )
+  if(HAVE_DECLSPEC_DLLEXPORT)
+    set(LOG4CPLUS_DECLSPEC_EXPORT "__declspec(dllexport)" )
+    set(LOG4CPLUS_DECLSPEC_IMPORT "__declspec(dllimport)" )
+    set(LOG4CPLUS_DECLSPEC_PRIVATE "" )
+  endif()
+endif()
+
+if(NOT DEFINED LOG4CPLUS_DECLSPEC_EXPORT)
+  check_c_source_compiles(
+    "__global int x = 0;
+     __global int foo();
+     int foo() { return 0; }
+     __global int bar() { return x; }
+     __hidden int baz() { return 1; }
+
+     int main(void) { return 0; }"
+    HAVE_GLOBAL_AND_HIDDEN
+  )
+  if(HAVE_GLOBAL_AND_HIDDEN)
+    set(LOG4CPLUS_DECLSPEC_EXPORT "__global" )
+    set(LOG4CPLUS_DECLSPEC_IMPORT "__global" )
+    set(LOG4CPLUS_DECLSPEC_PRIVATE "__hidden" )
+  endif()
+endif()
+
+if(NOT DEFINED LOG4CPLUS_DECLSPEC_EXPORT)
+  set(LOG4CPLUS_DECLSPEC_EXPORT "")
+  set(LOG4CPLUS_DECLSPEC_IMPORT "")
+  set(LOG4CPLUS_DECLSPEC_PRIVATE "")
+endif()
+
+# check for thread-local stuff
+if(NOT DEFINED LOG4CPLUS_HAVE_TLS_SUPPORT)
+  # TODO: requires special compiler switch on GCC and Clang
+  # Currently it is assumed that they are provided in
+  # CMAKE_CXX_FLAGS
+  set(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS}")
+  check_cxx_source_compiles(
+    "extern thread_local int x;
+     thread_local int * ptr = 0;
+     int foo() { ptr = &x; return x; }
+     thread_local int x = 1;
+
+     int main()
+     {
+         x = 2;
+         foo();
+         return 0;
+     }"
+    HAVE_CXX11_THREAD_LOCAL
+  )
+  set(CMAKE_REQUIRED_FLAGS "")
+  if(HAVE_CXX11_THREAD_LOCAL)
+    set(LOG4CPLUS_HAVE_TLS_SUPPORT 1)
+    set(LOG4CPLUS_THREAD_LOCAL_VAR "thread_local")
+  endif()
+endif()
+
+if(NOT DEFINED LOG4CPLUS_HAVE_TLS_SUPPORT)
+  check_cxx_source_compiles(
+    "#if defined (__NetBSD__)
+     #include <sys/param.h>
+     #if ! __NetBSD_Prereq__(5,1,0)
+     #error NetBSD __thread support does not work before 5.1.0. It is missing __tls_get_addr.
+     #endif
+     #endif
+
+     extern __thread int x;
+     __thread int * ptr = 0;
+     int foo() { ptr = &x; return x; }
+     __thread int x = 1;
+
+     int main()
+     {
+         x = 2;
+         foo();
+         return 0;
+     }"
+    HAVE_GCC_THREAD_EXTENSION
+  )
+  if(HAVE_GCC_THREAD_EXTENSION)
+    set(LOG4CPLUS_HAVE_TLS_SUPPORT 1)
+    set(LOG4CPLUS_THREAD_LOCAL_VAR "__thread")
+  endif()
+endif()
+
+if(NOT DEFINED LOG4CPLUS_HAVE_TLS_SUPPORT)
+  check_cxx_source_compiles(
+    "#if defined (__GNUC__)
+     #error Please fail.
+     #endif
+
+     extern __declspec(thread) int x;
+     __declspec(thread) int * ptr = 0;
+     int foo() { ptr = &x; return x; }
+     __declspec(thread) int x = 1;
+
+     int main()
+     {
+         x = 2;
+         foo();
+         return 0;
+     }"
+    HAVE_DECLSPEC_THREAD
+  )
+  if(HAVE_DECLSPEC_THREAD)
+    set(LOG4CPLUS_HAVE_TLS_SUPPORT 1)
+    set(LOG4CPLUS_THREAD_LOCAL_VAR "__declspec(thread)")
+  endif()
+endif()
+
+# check for c++11 atomic stuff
+# TODO: requires special compiler switch on GCC and Clang
+# Currently it is assumed that they are provided in
+# CMAKE_CXX_FLAGS
+set(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS}")
+check_cxx_source_compiles(
+  "#include <atomic>
+
+   template<typename T>
+   void test_atomic()
+   {
+       std::atomic<T> x(0);
+       std::atomic_fetch_add_explicit(&x, static_cast<T>(1), std::memory_order_acquire);
+       std::atomic_fetch_sub_explicit(&x, static_cast<T>(1), std::memory_order_release);
+   }
+
+   int main()
+   {
+       test_atomic<int>();
+       test_atomic<unsigned int>();
+       test_atomic<long>();
+       test_atomic<unsigned long>();
+       std::atomic_thread_fence(std::memory_order_acquire);
+       return 0;
+   }"
+  LOG4CPLUS_HAVE_CXX11_ATOMICS
+)
+set(CMAKE_REQUIRED_FLAGS "")

 set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
 check_type_size(socklen_t _SOCKLEN_SIZE)


All: Bump version to 0.7

All: Bump version to 0.7

--- version.cmake
+++ version.cmake
@@ -2,9 +2,9 @@
 	set(PROJECT_NAME "mGBA")
 endif()
 set(LIB_VERSION_MAJOR 0)
-set(LIB_VERSION_MINOR 6)
+set(LIB_VERSION_MINOR 7)
 set(LIB_VERSION_PATCH 0)
-set(LIB_VERSION_ABI 0.6)
+set(LIB_VERSION_ABI 0.7)
 set(LIB_VERSION_STRING ${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH})
 set(SUMMARY "${PROJECT_NAME} Game Boy Advance Emulator")


BUG: Fix wrong directories for apple links

--- DTIAtlasBuilder.cmake
+++ DTIAtlasBuilder.cmake
@@ -82,8 +82,9 @@

   # Create sym links during install step
   if(APPLE)
-    install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/CMake/lib DESTINATION ${INSTALL_DIR}/..)
-    install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/CMake/Frameworks DESTINATION ${INSTALL_DIR}/..)
+    install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/InstallApple/lib DESTINATION ${INSTALL_DIR}/..)
+    install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/InstallApple/Frameworks DESTINATION ${INSTALL_DIR}/..)
+    install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/InstallApple/AppleCreateLinkLibs.sh DESTINATION ${INSTALL_DIR}/../share)
   endif(APPLE)

 endif( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )


Fix windows build: CPACK_SET_DESTDIR doesn't work with CPACK NSIS

--- cmake/ArangoDBMacros.cmake
+++ cmake/ArangoDBMacros.cmake
@@ -284,7 +284,9 @@
 endif ()

 # Build package ----------------------------------------------------------------
-set(CPACK_SET_DESTDIR ON)
+if (NOT(MSVC))
+  set(CPACK_SET_DESTDIR ON)
+endif()

 # General
 set(CPACK_PACKAGE_NAME "arangodb")


cmake fix

cmake fix

--- cmake/TaichiCXXFlags.cmake
+++ cmake/TaichiCXXFlags.cmake
@@ -43,8 +43,7 @@
             "${CMAKE_CXX_FLAGS} /MP /Z7 /D \"_CRT_SECURE_NO_WARNINGS\" /arch:AVX2 -DGL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED /std:c++14")
 else ()
     set(CMAKE_CXX_FLAGS
-            "${CMAKE_CXX_FLAGS} -std=c++14 -march=native\
- -DGL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED -Wall")
+            "${CMAKE_CXX_FLAGS} -std=c++14 -march=native -DGL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED -Wall")
 endif ()

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTC_PASS_EXCEPTION_TO_PYTHON")


Zlib install

Zlib install

--- cmake/ThirdPartyZlib.cmake
+++ cmake/ThirdPartyZlib.cmake
@@ -55,6 +55,12 @@
             ${TPSRC}/zlib-1.2.7
         )

+    IF (APPLE)
+        EXTERNALPROJECT_ADD_STEP(zlib-1.2.7 patch-install-path
+            COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change ${TPDIST}/lib/libz.1.2.7.dylib ${NEKTAR_LIB_DIR}/libz.1.2.7.dylib
+            DEPENDEES install)
+    ENDIF ()
+
     IF (WIN32)
         SET(ZLIB_LIBRARY zlib CACHE FILEPATH
             "Zlib library" FORCE)


copy cldnn library to ngraph target when CLDNN_ROOT_DIR defined (#2745)

--- cmake/external_cldnn.cmake
+++ cmake/external_cldnn.cmake
@@ -62,6 +62,13 @@
     find_package(CLDNN REQUIRED)
     target_include_directories(libcldnn SYSTEM INTERFACE ${CLDNN_INCLUDE_DIRS})
     target_link_libraries(libcldnn INTERFACE ${CLDNN_LIBRARIES})
+    install(
+	FILES
+	    ${CLDNN_LIBRARIES}
+	DESTINATION
+	    ${NGRAPH_INSTALL_LIB}
+	OPTIONAL
+        )
 else()
     ExternalProject_Get_Property(ext_cldnn SOURCE_DIR BINARY_DIR)
     set(CLDNN_LIB ${CMAKE_SHARED_LIBRARY_PREFIX}clDNN64${CMAKE_SHARED_LIBRARY_SUFFIX})


BUG: Notes must be submitted last when submitting via parts

--- DashboardScripts/tubetk_build_test_noSuperBuild.cmake
+++ DashboardScripts/tubetk_build_test_noSuperBuild.cmake
@@ -47,7 +47,7 @@
   ctest_read_custom_files( "${CTEST_BINARY_DIRECTORY}" )
   ctest_build( BUILD "${CTEST_BINARY_DIRECTORY}" )
   ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" )
-  ctest_submit( PARTS Notes Start Update Configure Build Test )
+  ctest_submit( PARTS Start Update Configure Build Test )
   set( ENV{TUBETK_FORCE_BUILD} "1" )

 else()


ENH: only print disabled module once

ENH: only print disabled module once

--- CMake/OTBModuleEnablement.cmake
+++ CMake/OTBModuleEnablement.cmake
@@ -145,7 +145,7 @@

 # Filter out the ENABLED modules using the OTB_USE_XXX options
 macro(otb_module_disable otb-module _disabled_by)
-  if(NOT ${otb-module}_IS_TEST)
+  if(NOT ${otb-module}_IS_TEST AND ${otb-module}_ENABLED)
     message(STATUS "Disabled ${otb-module} because ${_disabled_by} is OFF")
   endif()
   set(${otb-module}_ENABLED 0)


Use CMake method to set SITK_UNDEFINED_SYMBOLS_ALLOWED

The scikit-build upstream CMake module no longer defined extra CMake
variables. The variable need to be explicitly passed to get
initialized.

--- CMake/sitkLanguageOptions.cmake
+++ CMake/sitkLanguageOptions.cmake
@@ -9,6 +9,11 @@
 #

 include(sitkTargetLinkLibrariesWithDynamicLookup)
+
+sitk_check_dynamic_lookup(MODULE
+  SHARED
+  SITK_UNDEFINED_SYMBOLS_ALLOWED
+  )

 #
 # Macro to set "_QUIET" and "_QUIET_LIBRARY" based on the first


Update Go to 1.3.3

Update Go to 1.3.3

--- golang.cmake
+++ golang.cmake
@@ -11,9 +11,9 @@
 include (BuildSupport)

 external_source (golang
-    1.3.1
-    go1.3.1.src.tar.gz
-    13e32d14e974e3d903fa2de03581c681
+    1.3.3
+    go1.3.3.src.tar.gz
+    2cdbad6baefcf1007f3cf54a5bc878b7
     http://golang.org/dl)

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