Revert "Made FindFilesystem.cmake work with gcc-8's libstdc++"

This reverts commit f0eac941586e10667f14a83c4cb509d0b6847ffe.

--- cmake/FindFilesystem.cmake
+++ cmake/FindFilesystem.cmake
@@ -104,7 +104,7 @@

 include(CMakePushCheckState)
 include(CheckIncludeFileCXX)
-include(CheckCXXSourceRuns)
+include(CheckCXXSourceCompiles)

 cmake_push_check_state()

@@ -180,17 +180,12 @@

         int main() {
             auto cwd = @CXX_FILESYSTEM_NAMESPACE@::current_path();
-            for (auto &_ : @CXX_FILESYSTEM_NAMESPACE@::directory_iterator{cwd}) {
-                (void) _;
-            }
-            auto root = cwd.root_directory();
-            (void) root;
-            return 0;
+            return static_cast<int>(cwd.string().size());
         }
     ]] code @ONLY)

     # Try to compile a simple filesystem program without any linker flags
-    check_cxx_source_runs("${code}" CXX_FILESYSTEM_NO_LINK_NEEDED)
+    check_cxx_source_compiles("${code}" CXX_FILESYSTEM_NO_LINK_NEEDED)

     set(can_link ${CXX_FILESYSTEM_NO_LINK_NEEDED})

@@ -199,13 +194,13 @@
         # Add the libstdc++ flag
         set(CMAKE_REQUIRED_LIBRARIES ${prev_libraries} -lstdc++fs -lstdc++)
         set(CMAKE_REQUIRED_FLAGS "-std=c++17")
-        check_cxx_source_runs("${code}" CXX_FILESYSTEM_STDCPPFS_NEEDED)
+        check_cxx_source_compiles("${code}" CXX_FILESYSTEM_STDCPPFS_NEEDED)
         set(can_link ${CXX_FILESYSTEM_STDCPPFS_NEEDED})
         if(NOT CXX_FILESYSTEM_STDCPPFS_NEEDED)
             # Try the libc++ flag
             set(CMAKE_REQUIRED_LIBRARIES ${prev_libraries} -lc++fs)
             set(CMAKE_REQUIRED_FLAGS "-std=c++17")
-            check_cxx_source_runs("${code}" CXX_FILESYSTEM_CPPFS_NEEDED)
+            check_cxx_source_compiles("${code}" CXX_FILESYSTEM_CPPFS_NEEDED)
             set(can_link ${CXX_FILESYSTEM_CPPFS_NEEDED})
         endif()
     endif()


Update FindWindowsSDK.cmake

Update FindWindowsSDK.cmake

Support latest Win10 SDK.

--- cmake/FindWindowsSDK.cmake
+++ cmake/FindWindowsSDK.cmake
@@ -73,6 +73,10 @@
 endmacro()

 set(_winsdk_win10vers
+        10.0.17763.0 # Windows 10 Version 1809
+        10.0.17134.0 # Windows 10 Version 1803 (April 2018 Update)
+        10.0.16299.0 # Windows 10 Version 1709 (Fall Creators Update)
+        10.0.15063.0 # Windows 10 Version 1703 (Creators Update)
 	10.0.14393.0 # Redstone aka Win10 1607 "Anniversary Update"
 	10.0.10586.0 # TH2 aka Win10 1511
 	10.0.10240.0 # Win10 RTM


Install libs directly into %{_libdir}

Install libs directly into %{_libdir}

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


Fix from wlad.

Fix from wlad.

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -195,9 +195,40 @@
    STRING(REPLACE "${CMAKE_CFG_INTDIR}" "Debug"  debug_target_location "${target_location}" )
   ENDIF()

+  # Define permissions
+  # For executable files
+  SET(PERMISSIONS_EXECUTABLE
+      PERMISSIONS
+      OWNER_READ OWNER_WRITE OWNER_EXECUTE
+      GROUP_READ GROUP_EXECUTE
+      WORLD_READ WORLD_EXECUTE)
+
+  # Permissions for shared library (honors CMAKE_INSTALL_NO_EXE which is
+  # typically set on Debian)
+  IF(CMAKE_INSTALL_SO_NO_EXE)
+    SET(PERMISSIONS_SHARED_LIBRARY
+      PERMISSIONS
+      OWNER_READ OWNER_WRITE
+      GROUP_READ
+      WORLD_READ)
+  ELSE()
+    SET(PERMISSIONS_SHARED_LIBRARY ${PERMISSIONS_EXECUTABLE})
+  ENDIF()
+
+  # Shared modules get the same permissions as shared libraries
+  SET(PERMISSIONS_MODULE_LIBRARY ${PERMISSIONS_SHARED_LIBRARY})
+
+  #  Define permissions for static library
+  SET(PERMISSIONS_STATIC_LIBRARY
+      PERMISSIONS
+      OWNER_READ OWNER_WRITE
+      GROUP_READ
+      WORLD_READ)
+
   INSTALL(${INSTALL_TYPE} ${debug_target_location}
     DESTINATION ${ARG_DESTINATION}
     ${RENAME_PARAM}
+    ${PERMISSIONS_${target_type}}
     CONFIGURATIONS Release RelWithDebInfo
     OPTIONAL)


Include module for determining all configuration variables related to
pkg-confi.

svn path=/trunk/; revision=6754


FIX vSMCFindSTDTBB

FIX vSMCFindSTDTBB

--- cmake/vSMCFindSTDTBB.cmake
+++ cmake/vSMCFindSTDTBB.cmake
@@ -16,15 +16,13 @@
     CHECK_CXX_SOURCE_RUNS ("${VSMC_STDTBB_TEST_SOURCE}" VSMC_THREAD_FOUND)
     IF (VSMC_THREAD_FOUND)
         SET (VSMC_THREAD_FOUND TRUE CACHE BOOL "Found C++11 thread")
-        MESSAGE (STATUS "Found vSMC STDTBB C++11 <thread>")
     ENDIF (VSMC_THREAD_FOUND)
     IF (VSMC_TRY_FUTURE)
         SET (CMAKE_REQUIRED_DEFINITIONS ${SAFE_CMAKE_REQUIRED_DEFINITIONS}
             -DVSMC_HAS_CXX11LIB_FUTURE=1)
-        CHECK_CXX_SOURCE_RUNS ("${VSMC_STDTBB_TEST_SOURCE}" VSMC_STDTBB_FOUND)
+        CHECK_CXX_SOURCE_RUNS ("${VSMC_STDTBB_TEST_SOURCE}" VSMC_FUTURE_FOUND)
         IF (VSMC_FUTURE_FOUND)
             SET (VSMC_FUTURE_FOUND TRUE CACHE BOOL "Found C++11 future")
-            MESSAGE (STATUS "Found vSMC STDTBB C++11 <future>")
         ENDIF (VSMC_FUTURE_FOUND)
     ENDIF (VSMC_TRY_FUTURE)
     IF (VSMC_THREAD_FOUND OR VSMC_FUTURE_FOUND)


fix for newer PETSc versions compare

fix for newer PETSc versions compare

--- cmake_find/FindPETSc.cmake
+++ cmake_find/FindPETSc.cmake
@@ -25,6 +25,7 @@
 set(PETSC_VALID_COMPONENTS
   C
   CXX)
+

 if(NOT PETSc_FIND_COMPONENTS)
   set(PETSC_LANGUAGE_BINDINGS "C")
@@ -269,6 +270,7 @@
     set(_PETSC_TEST_SOURCE "
 static const char help[] = \"PETSc test program.\";
 #include <petscts.h>
+#include <petscsys.h>
 int main(int argc,char *argv[]) {
   PetscErrorCode ierr;
   TS ts;
@@ -292,7 +294,11 @@
   find_path (PETSC_INCLUDE_DIR petscts.h HINTS "${PETSC_DIR}" PATH_SUFFIXES include NO_DEFAULT_PATH)
   find_path (PETSC_INCLUDE_CONF petscconf.h HINTS "${PETSC_DIR}" PATH_SUFFIXES "${PETSC_ARCH}/include" "bmake/${PETSC_ARCH}" NO_DEFAULT_PATH)
   mark_as_advanced (PETSC_INCLUDE_DIR PETSC_INCLUDE_CONF)
-  set (petsc_includes_minimal ${PETSC_INCLUDE_CONF} ${PETSC_INCLUDE_DIR})
+  if (USE_MPI)
+  	set (petsc_includes_minimal ${PETSC_INCLUDE_CONF} ${PETSC_INCLUDE_DIR} ${MPI_INCLUDE_PATH})
+  else()
+  	set (petsc_includes_minimal ${PETSC_INCLUDE_CONF} ${PETSC_INCLUDE_DIR})
+  endif()

   #message(STATUS "petsc_includes_minimal")
   #foreach(D ${petsc_includes_minimal})


WiX also installs Embree to Intel folder under Program Files

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -170,7 +170,7 @@
   IF (NOT EMBREE_ZIP_MODE)
     SET(CPACK_GENERATOR WIX)
     SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}")
-    SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Embree v${EMBREE_VERSION} ${ARCH}")
+    SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Intel\\\\Embree v${EMBREE_VERSION} ${ARCH}")
     IF (EMBREE_TESTING_PACKAGE)
       ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_win.bat ${CPACK_PACKAGE_FILE_NAME}.exe ${CMAKE_BUILD_TYPE})
     ENDIF()


FindLuabind: Display include directory in "Found Luabind: ..." message.

Previously, the libraries were displayed which looked quite ugly, since it is
a rather long string which overflowed the console's line length.

--- cmake/Modules/FindLuabind.cmake
+++ cmake/Modules/FindLuabind.cmake
@@ -37,6 +37,6 @@
 # handle the QUIETLY and REQUIRED arguments and set LUABIND_FOUND to TRUE if
 # all listed variables are TRUE
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Luabind
-    REQUIRED_VARS LUABIND_LIBRARIES LUABIND_INCLUDE_DIRS)
+    REQUIRED_VARS LUABIND_INCLUDE_DIRS LUABIND_LIBRARIES)

 MARK_AS_ADVANCED(LUABIND_INCLUDE_DIRS LUABIND_LIBRARIES)


CMake: Add a shim allowing to build using official emscripten toolchain.

--- cmake/Modules/UrhoOptions.cmake
+++ cmake/Modules/UrhoOptions.cmake
@@ -67,6 +67,16 @@
 # Even though UWP can run on desktop, we do not treat it as a desktop platform, because it behavres more like a mobile app.
 if ((WIN32 OR LINUX OR MACOS) AND NOT WEB AND NOT MOBILE AND NOT UWP)
     set (DESKTOP ON CACHE BOOL "" FORCE)
+endif ()
+
+if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Emscripten" AND NOT WEB)
+    # Compatibility with old toolchain.
+    set(WEB ON)
+    set(EMSCRIPTEN ON)
+    set(EMSCRIPTEN_EMCC_VERSION "${CMAKE_C_COMPILER_VERSION}")
+    set (EMRUN ${EMSCRIPTEN_ROOT_PATH}/emrun${TOOL_EXT}    CACHE PATH "emrun")
+    set (EMPACKAGER python ${EMSCRIPTEN_ROOT_PATH}/tools/file_packager.py CACHE PATH "file_packager.py")
+    set (EMBUILDER python ${EMSCRIPTEN_ROOT_PATH}/embuilder.py CACHE PATH "embuilder.py")
 endif ()

 # Build properties


Fixed error for sketches without includes.

--- cmake/modules/FindArduino.cmake
+++ cmake/modules/FindArduino.cmake
@@ -1033,6 +1033,10 @@
     file(READ  ${MAIN_SKETCH_PATH} MAIN_SKETCH)

     string(FIND "${MAIN_SKETCH}" "#include" FIRST_INCLUDE_OFFSET REVERSE)
+    if ("${FIRST_INCLUDE_OFFSET}" STREQUAL "-1")
+        set(FIRST_INCLUDE_OFFSET 0)
+    endif()
+    message(STATUS "first include offset: ${FIRST_INCLUDE_OFFSET}")
     string(LENGTH "${MAIN_SKETCH}" MAIN_SKETCH_LENGTH)
     math(EXPR LENGTH_STR1 "${MAIN_SKETCH_LENGTH}-${FIRST_INCLUDE_OFFSET}")
     string(SUBSTRING "${MAIN_SKETCH}" ${FIRST_INCLUDE_OFFSET} ${LENGTH_STR1} STR1)


Cleanup

Cleanup

svn path=/trunk/extragear/pim/googledata/; revision=1173072

--- cmake/modules/FindLibGCal.cmake
+++ cmake/modules/FindLibGCal.cmake
@@ -13,8 +13,7 @@
           NAMES gcal.h libgcal/gcal.h
          )

-set(LIBGCAL_NAMES ${LIBGCAL_NAMES} gcal)
-find_library(LIBGCAL_LIBRARY NAMES ${LIBGCAL_NAMES})
+find_library(LIBGCAL_LIBRARY gcal)

 # handle the QUIETLY and REQUIRED arguments and set LIBGCAL_FOUND to TRUE if
 # all listed variables are TRUE


boards: cuav x7pro include correct adis IMU

--- boards/cuav/x7pro/default.cmake
+++ boards/cuav/x7pro/default.cmake
@@ -31,7 +31,7 @@
 		gps
 		heater
 		#imu # all available imu drivers
-		imu/analog_devices/adis16448
+		imu/analog_devices/adis16470
 		imu/bosch/bmi088
 		imu/invensense/icm20649
 		imu/invensense/icm20689


Fixed libxml for iOS

Fixed libxml for iOS

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -352,7 +352,10 @@
 set_libraries(libffi ${LIBFFI_PREFIX}/lib ffi)
 set_libraries(libpng ${LIBPNG_PREFIX}/lib png)
 if (IS_IOS)
+  set(BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS})
+  set(BUILD_SHARED_LIBS ON)
   set_libraries(libxml ${CMAKE_IOS_SDK_ROOT}/usr/lib xml2)
+  set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD})
 else ()
   set_libraries(libxml ${LIBXML_PREFIX}/lib xml2)
 endif ()


fixed up search for FRI source

fixed up search for FRI source

--- config/FRI-Client-SDK_Cpp.cmake
+++ config/FRI-Client-SDK_Cpp.cmake
@@ -1,25 +1,25 @@
 # Sets up KUKA Sunrise FRI Cpp SDK with KUKA connectivity suite
 message(STATUS "Looking for File Path to FRI-Client-SDK_Cpp.zip KUKA FRI C++ API zip file from sunrise connectivity suite v1.9")
-set(FRI_Client_SDK_Cpp_zip_PATH "${CMAKE_CURRENT_PROJECT_DIR}/data/FRI-Client-SDK_Cpp.zip" CACHE FILEPATH "File Path to FRI-Client-SDK_Cpp.zip KUKA FRI C++ API zip file from sunrise connectivity suite v1.9")
+set(FRI_Client_SDK_Cpp_zip_PATH "${CMAKE_SOURCE_DIR}/data/" CACHE FILEPATH "File Path to FRI-Client-SDK_Cpp.zip KUKA FRI C++ API zip file from sunrise connectivity suite v1.9")

-find_path(FRI_Client_SDK_Cpp_zip RI-Client-SDK_Cpp.zip HINTS ${CMAKE_PROJECT_DIR}/data/ ${CMAKE_CURRENT_PROJECT_DIR}/data/ FRI_Client_SDK_Cpp_zip_PATH)
+find_path(FRI_Client_SDK_Cpp_zip_FILEPATH FRI-Client-SDK_Cpp.zip HINTS ${FRI_Client_SDK_Cpp_zip_PATH} ${CMAKE_PROJECT_DIR}/data/ ${CMAKE_CURRENT_PROJECT_DIR}/data/ )

-if(EXISTS "${FRI_Client_SDK_Cpp_zip}")
-    message(STATUS "Found FRI-Client-SDK_Cpp.zip in ${FRI_Client_SDK_Cpp_zip}/FRI-Client-SDK_Cpp.zip")
+if(EXISTS "${FRI_Client_SDK_Cpp_zip_FILEPATH}")
+    message(STATUS "Found FRI-Client-SDK_Cpp.zip in ${FRI_Client_SDK_Cpp_zip_FILEPATH}/FRI-Client-SDK_Cpp.zip")
     # directory where fri code will be extracted
     set(FRI_DIR ${CMAKE_BINARY_DIR}/FRI_Client_SDK_Cpp)
     set(FRI_SRC_DIR ${FRI_DIR}/src)

-    message(STATUS "extracting FRI C++ SDK... ${FRI_Client_SDK_Cpp_zip} to ${CMAKE_CURRENT_BINARY_DIR}")
+    message(STATUS "extracting FRI C++ SDK... ${FRI_Client_SDK_Cpp_zip_FILEPATH} to ${CMAKE_CURRENT_BINARY_DIR}")
     file(MAKE_DIRECTORY ${FRI_DIR})
-    execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${FRI_Client_SDK_Cpp_zip}/FRI-Client-SDK_Cpp.zip
+    execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${FRI_Client_SDK_Cpp_zip_FILEPATH}/FRI-Client-SDK_Cpp.zip
       WORKING_DIRECTORY ${FRI_DIR}
       RESULT_VARIABLE rv)

     if(NOT rv EQUAL 0)
       message(STATUS "extracting... FRI-Client-SDK_Cpp [error clean up]")
       file(REMOVE_RECURSE "${CMAKE_BINARY_DIR}/FRI-Client-SDK_Cpp")
-      message(FATAL_ERROR "error: extract of '${FRI_Client_SDK_Cpp_zip}' failed")
+      message(FATAL_ERROR "error: extract of '${FRI_Client_SDK_Cpp_zip_FILEPATH}' failed")
     else()

         if(Nanopb_FOUND)


Replace unknown BUILD_THRIFT variable
Patch: Kevin Wojniak

This closes #1914

It should be BUILD_COMPILER. There are no other references to BUILD_THRIFT in the repo.

--- build/cmake/DefineOptions.cmake
+++ build/cmake/DefineOptions.cmake
@@ -151,7 +151,7 @@
 message(STATUS "  Build compiler:                             ${BUILD_COMPILER}")
 message(STATUS "  Build libraries:                            ${BUILD_LIBRARIES}")
 message(STATUS "  Build tests:                                ${BUILD_TESTING}")
-MESSAGE_DEP(HAVE_COMPILER "Disabled because BUILD_THRIFT=OFF and no valid THRIFT_COMPILER is given")
+MESSAGE_DEP(HAVE_COMPILER "Disabled because BUILD_COMPILER=OFF and no valid THRIFT_COMPILER is given")
 message(STATUS "  Build type:                                 ${CMAKE_BUILD_TYPE}")
 message(STATUS)
 message(STATUS "Language libraries:")


Fix the GTest macro under Precise

Fix the GTest macro under Precise

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -583,7 +583,22 @@
 # part of the "core" build that happens during a 'make' in ros, so we can
 # assume that's already built.
 macro(rosbuild_add_gtest_build_flags exe)
+  if (NOT GTEST_FOUND)
+    # gtest is installed but there might not be any library (e.g. Ubuntu Precise), so build it
+    if (EXISTS "/usr/src/gtest")
+      if (NOT EXISTS "${CMAKE_BINARY_DIR}/gtest")
+        # for now, this would only work on Ubuntu
+        add_subdirectory("/usr/src/gtest/" ${CMAKE_BINARY_DIR}/gtest)
+      endif()
+    else()
+      message(WARNING "GTest not found; C++ tests will fail to build.")
+    endif()
+  endif()
   rosbuild_add_compile_flags(${exe} ${_gtest_CFLAGS_OTHER})
+  if (LIBRARY_OUTPUT_PATH)
+    # add this as GTest builds there
+    set_target_properties(${exe} PROPERTIES LINK_FLAGS "-L${LIBRARY_OUTPUT_PATH}")
+  endif()
   target_link_libraries(${exe} ${_gtest_LIBRARIES})
   rosbuild_add_link_flags(${exe} ${_gtest_LDFLAGS_OTHER})
   rosbuild_declare_test(${exe})


Clarified error message from invoking rospack

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -104,7 +104,7 @@
     #set(${_prefix}_${_varname} "" CACHE INTERNAL "")
     message("${_rospack_err_ignore}")
     message("${_rospack_invoke_result}")
-    message(FATAL_ERROR "\nFailed to invoke rospack to get compile flags for package '${pkgname}.'  Look above for errors from rospack itself.  Aborting.  Please fix the broken dependency!\n")
+    message(FATAL_ERROR "\nFailed to invoke rospack to get compile flags for package '${pkgname}'.  Look above for errors from rospack itself.  Aborting.  Please fix the broken dependency!\n")
   else(_rospack_failed)
     separate_arguments(_rospack_invoke_result)
     set(_rospack_${_varname} ${_rospack_invoke_result})


Spelling bug fixed; xwin_tff ==> xwin_ttf.

svn path=/trunk/; revision=7707

--- config.h.cmake
+++ config.h.cmake
@@ -278,7 +278,7 @@
 #cmakedefine PLD_xwin

 /* Define if xwin driver is present */
-#cmakedefine PLD_xwintff
+#cmakedefine PLD_xwinttf

 /* Portable definition for PTHREAD_MUTEX_RECURSIVE */
 #define PLPLOT_MUTEX_RECURSIVE ${PLPLOT_MUTEX_RECURSIVE}


Fix CMake error if Orcania was found via pkg-config. (#234)

Signed-off-by: Toni Uhlig <3fe5c1c696beb7bc93fafa2fa4136d8e0c4cdc43@googlemail.com>

--- cmake-modules/FindOrcania.cmake
+++ cmake-modules/FindOrcania.cmake
@@ -65,6 +65,10 @@
         REQUIRED_VARS ORCANIA_LIBRARY ORCANIA_INCLUDE_DIR
         VERSION_VAR ORCANIA_VERSION_STRING)

+if (PC_ORCANIA_FOUND)
+    set(ORCANIA_FOUND 1)
+endif ()
+
 if (ORCANIA_FOUND)
     set(ORCANIA_LIBRARIES ${ORCANIA_LIBRARY})
     set(ORCANIA_INCLUDE_DIRS ${ORCANIA_INCLUDE_DIR})


cmake:clangformat: remove abslute path to clang-format

This way other install locations of clang-format can be accessed, as long as
they are in the users $PATH. This was totally not Keegan's fault by the way.

--- cmake/modules/ClangFormat.cmake
+++ cmake/modules/ClangFormat.cmake
@@ -12,7 +12,7 @@

     add_custom_target(
             clangformat
-            COMMAND /usr/bin/clang-format -i ${ClangFormat_CLANGFORMAT_FILES} -style=${ClangFormat_STYLE}
+            COMMAND clang-format -i ${ClangFormat_CLANGFORMAT_FILES} -style=${ClangFormat_STYLE}
     )

 endfunction(ClangFormat)


add /EHsc flag for MSVC

add /EHsc flag for MSVC


Add --Wno-extra-semi-stmt for clang > 7 (new warning flag)

--- test/common/devCompileOptions.cmake
+++ test/common/devCompileOptions.cmake
@@ -139,6 +139,10 @@
         # as they are stored as members. Therefore, the padding warning is triggered by the calling code
         # and does not indicate a failure within alpaka.
         LIST(APPEND ALPAKA_DEV_COMPILE_OPTIONS "-Wno-padded")
+        # Triggers for all instances of ALPAKA_DEBUG_MINIMAL_LOG_SCOPE and similar macros followed by semicolon
+        IF(CLANG_VERSION_MAJOR GREATER 7)
+            LIST(APPEND ALPAKA_DEV_COMPILE_OPTIONS "-Wno-extra-semi-stmt")
+        ENDIF()
     # ICC
     ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
         LIST(APPEND ALPAKA_DEV_COMPILE_OPTIONS "-Wall")


OSX: option to disable/enable stack checking

Xcode11 Beta4 has enabled stack-checking by default, this
leads to binaries that are not backward-compatible to older
macOS versions. The default is OFF.

--- cmake-toolchains/osx.cmake
+++ cmake-toolchains/osx.cmake
@@ -35,6 +35,17 @@
 # need to set some flags directly as Xcode attributes
 set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
 set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
+
+# stack-checking? enabling this leads may generate binaries
+# that are not backward compatible to older macOS versions
+option(FIPS_OSX_USE_STACK_CHECKING "Enable/disable stack checking" OFF)
+if (FIPS_OSX_USE_STACK_CHECKING)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-stack-check")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-stack-check")
+else()
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-check")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-check")
+endif()

 # ARC on/off?
 option(FIPS_OSX_USE_ARC "Enable/disable Automatic Reference Counting" OFF)


Fix compile options for GCC 4.7

Fix compile options for GCC 4.7

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -107,12 +107,11 @@
     )
 endif ()

-if (PLATFORM_LINUX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # GCC 4.9 and 5.1
+if (PLATFORM_LINUX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # GCC 4.7 and above
     set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
         -Wall
         -Wextra
         -Wunused
-        -Wpedantic

         -Wctor-dtor-privacy
         -Wdelete-non-virtual-dtor
@@ -130,7 +129,6 @@
         -Wparentheses
         -Wsequence-point
         -Wreturn-type
-        -Wreturn-local-addr
         -Wswitch
         -Wswitch-default
         -Wuninitialized
@@ -142,11 +140,9 @@
         -Wcast-align
         -Wconversion
         -Wzero-as-null-pointer-constant
-        -Wuseless-cast
         -Wempty-body
         -Wsign-compare
         -Wsign-conversion
-        -Wsizeof-pointer-memaccess
         -Waddress
         -Wlogical-op
         -Wmissing-declarations
@@ -161,13 +157,22 @@
         -Wno-attributes
     )

-    if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9) # GCC 4.9
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8) # GCC 4.8 and above
+        set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
+            -Wpedantic
+            -Wreturn-local-addr
+            -Wuseless-cast
+            -Wsizeof-pointer-memaccess
+        )
+    endif()
+
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9) # GCC 4.9 and above
         set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
             -Wfloat-conversion
         )
     endif()

-    if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0) # GCC 5.1
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0) # GCC 5.1 and above
         set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
             -Wsuggest-final-types
             -Wsuggest-final-methods
@@ -179,7 +184,7 @@
     endif()
 endif ()

-if (PLATFORM_LINUX AND PLATFORM_LINUX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # Clang 4.3, 3.5 and 3.6
+if (PLATFORM_LINUX AND PLATFORM_LINUX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # Clang 3.4 and above
     set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
         -Wall
         -Wextra
@@ -227,7 +232,7 @@
         -Wno-attributes
     )

-    if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.5) # Clang 3.5 and 3.6
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.5) # Clang 3.5 and above
         set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
             -Wno-pragmas
             -Wfloat-conversion


try to find openal under linux

try to find openal under linux

--- cmake/FindOpenALSoft.cmake
+++ cmake/FindOpenALSoft.cmake
@@ -16,17 +16,21 @@
     /opt
     # Travis CI - MAC OSX
     /usr/local/opt/openal-soft/
+    # Linux Include PATH
+    /usr/include/AL/
 )

 find_library(OPENALSOFT_LIBRARY
   NAMES libopenal openal libOpenAL32 OpenAL32 OpenAL32.dll soft_oal.dll
-  PATHS
+  PATH_SUFFIXES lib64 lib libs64 libs ${_OpenAL_ARCH_DIR}
+  PATHS
     ${OPENALSOFT_INCLUDE_DIR}/../lib
     lib
+    /usr/lib
 )

 include(FindPackageHandleStandardArgs)

 find_package_handle_standard_args(OPENALSOFT DEFAULT_MSG OPENALSOFT_LIBRARY OPENALSOFT_INCLUDE_DIR)

-mark_as_advanced(OPENALSOFT_INCLUDE_DIR OPENALSOFT_LIBRARY)+mark_as_advanced(OPENALSOFT_INCLUDE_DIR OPENALSOFT_LIBRARY)


CMake: use standard cmake variables to control symbol visibility

--- cmake/compiler-flags.cmake
+++ cmake/compiler-flags.cmake
@@ -38,14 +38,9 @@
   add_definitions(-D_GLIBCXX_SANITIZE_VECTOR)
 endif()

-set(CMAKE_C_FLAGS
-    "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden"
-    CACHE STRING "Flags used by the C compiler during all builds."
-    FORCE )
-set(CMAKE_CXX_FLAGS
-    "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden"
-    CACHE STRING "Flags used by the C++ compiler during all builds."
-    FORCE )
+set(CMAKE_C_VISIBILITY_PRESET hidden)
+set(CMAKE_CXX_VISIBILITY_PRESET hidden)
+set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)

 IF(NOT APPLE)
   set(linkerflags "-Wl,--as-needed")


refine pslib.cmake url to public

refine pslib.cmake url to public

--- cmake/external/pslib.cmake
+++ cmake/external/pslib.cmake
@@ -29,8 +29,8 @@
 SET(PSLIB_PROJECT       "extern_pslib")
 IF((NOT DEFINED PSLIB_VER) OR (NOT DEFINED PSLIB_URL))
   MESSAGE(STATUS "use pre defined download url")
-  SET(PSLIB_VER "pslib" CACHE STRING "" FORCE) #todo pslib version
-  SET(PSLIB_URL "http://bjyz-heqiaozhi-dev-new.epc.baidu.com:8000/${PSLIB_VER}.tar.gz" CACHE STRING "" FORCE) #todo pslib url
+  SET(PSLIB_VER "0.1.0" CACHE STRING "" FORCE)
+  SET(PSLIB_URL "https://raw.githubusercontent.com/PaddlePaddle/Fleet/release/${PSLIB_VER}/pslib.tar.gz" CACHE STRING "" FORCE)
 ENDIF()
 MESSAGE(STATUS "PSLIB_VER: ${PSLIB_VER}, PSLIB_URL: ${PSLIB_URL}")
 SET(PSLIB_SOURCE_DIR    "${THIRD_PARTY_PATH}/pslib")


In standalone package, default data subdirectory is "data", not "var"

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -106,7 +106,7 @@
  SET(INSTALL_SQLBENCHROOTDIR_UNIX "")
  SET(INSTALL_DOCREADMEDIR_UNIX "share/mysql/doc/MySQL-server-${MYSQL_NO_DASH_VERSION}")
  SET(INSTALL_SUPPORTFILESDIR_UNIX "")
- SET(INSTALL_MYSQLDATADIR_STANDALONE "var")
+ SET(INSTALL_MYSQLDATADIR_UNIX "var")

 # Clear cached variables if install layout was changed


Corrects test binary paths in the CMake build script.

--- cmake/internal_utils.cmake
+++ cmake/internal_utils.cmake
@@ -184,7 +184,7 @@
     # only at ctest runtime (by calling ctest -c <Configuration>), so
     # we have to escape $ to delay variable substitution here.
     add_test(${name}
-      ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/test/${name}.py
-          --build_dir=${CMAKE_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE})
+      ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
+          --build_dir=${CMAKE_CURRENT_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE})
   endif()
 endfunction()


bump version

bump version

--- cmake/ospray_options.cmake
+++ cmake/ospray_options.cmake
@@ -20,7 +20,7 @@

 SET(OSPRAY_VERSION_MAJOR 1)
 SET(OSPRAY_VERSION_MINOR 7)
-SET(OSPRAY_VERSION_PATCH 1)
+SET(OSPRAY_VERSION_PATCH 2)
 SET(OSPRAY_SOVERSION 0)
 SET(OSPRAY_VERSION_GITHASH 0)
 SET(OSPRAY_VERSION_NOTE "")


Pick exact version of rkcommon, closes #529

--- cmake/ospray_options.cmake
+++ cmake/ospray_options.cmake
@@ -27,7 +27,7 @@
 ###########################################################

 # rkcommon
-find_package(rkcommon ${RKCOMMON_VERSION_REQUIRED} REQUIRED)
+find_package(rkcommon ${RKCOMMON_VERSION_REQUIRED} EXACT REQUIRED)
 get_target_property(RKCOMMON_INCLUDE_DIRS rkcommon::rkcommon
   INTERFACE_INCLUDE_DIRECTORIES)


add check if .git is a directory

add check if .git is a directory

Fixes CMake error in string(SUBSTRING) if OSPRay is a git submodule

--- cmake/ospray_version.cmake
+++ cmake/ospray_version.cmake
@@ -20,7 +20,8 @@
 set(OSPRAY_SOVERSION 0)
 set(OSPRAY_VERSION_GITHASH 0)
 set(OSPRAY_VERSION_NOTE "")
-if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git AND
+   IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.git)
   find_package(Git)
   if (GIT_FOUND)
     execute_process(


CMake: Fix URHO3D_SYSTEMUI_VIEWPORTS not having any effect when specified.

--- CMake/Modules/UrhoOptions.cmake
+++ CMake/Modules/UrhoOptions.cmake
@@ -101,7 +101,6 @@
 _option(URHO3D_PHYSICS            "Physics subsystem enabled"                             ${URHO3D_ENABLE_ALL})
 _option2(URHO3D_PROFILING         "Profiler support enabled"                              ${URHO3D_ENABLE_ALL} "NOT WEB"                       OFF)
 _option(URHO3D_SYSTEMUI           "Build SystemUI subsystem"                              ${URHO3D_ENABLE_ALL})
-_option2(URHO3D_SYSTEMUI_VIEWPORTS "Use native viewports in supported applications"       ON                   "URHO3D_SYSTEMUI"               OFF)
 _option(URHO3D_URHO2D             "2D subsystem enabled"                                  ${URHO3D_ENABLE_ALL})

 # Features
@@ -181,3 +180,6 @@
 if (ANDROID)
     set (SDL_CPUINFO ON)
 endif ()
+
+# At the end because it depends on URHO3D_SYSTEMUI which is may be off, but implicitly enabled if URHO3D_TOOLS is enabled.
+_option2(URHO3D_SYSTEMUI_VIEWPORTS "Use native viewports in supported applications" ON "URHO3D_SYSTEMUI" OFF)


AndroidMacros: do not fail build if android SDK is not available

--- CMake/Utils/AndroidMacros.cmake
+++ CMake/Utils/AndroidMacros.cmake
@@ -107,34 +107,38 @@
     configure_file("${OGRE_TEMPLATES_DIR}/AndroidManifest.xml.in" "${NDKOUT}/AndroidManifest.xml" @ONLY)
 	configure_file("${OGRE_TEMPLATES_DIR}/Android.mk.in" "${NDKOUT}/jni/Android.mk" @ONLY)

-	add_custom_command(
-	                    TARGET ${ANDROID_PROJECT_TARGET}
-                        POST_BUILD
-	                    COMMAND ${ANDROID_EXECUTABLE} update project  --target ${ANDROID_TARGET} --path "${NDKOUT}"
-	                    WORKING_DIRECTORY ${NDKOUT}
-	                  )
-
-	if(DEBUG)
-	 	add_custom_command(
-							TARGET ${ANDROID_PROJECT_TARGET}
-						    POST_BUILD
-					        COMMAND ${NDK_BUILD_EXECUTABLE} all -j2 V=1 NDK_DEBUG=1
-				            WORKING_DIRECTORY ${NDKOUT}
-			              )
-	else()
-		add_custom_command(
-							TARGET ${ANDROID_PROJECT_TARGET}
-						    POST_BUILD
-					        COMMAND ${NDK_BUILD_EXECUTABLE} all -j2 V=1
-				            WORKING_DIRECTORY ${NDKOUT}
-			              )
-	endif()
-
-	add_custom_command(
-	                    TARGET ${ANDROID_PROJECT_TARGET}
-                        POST_BUILD
-	                    COMMAND ${ANT_EXECUTABLE} debug
-	                    WORKING_DIRECTORY ${NDKOUT}
-	                  )
+    if(DEBUG)
+        add_custom_command(
+                            TARGET ${ANDROID_PROJECT_TARGET}
+                            POST_BUILD
+                            COMMAND ${NDK_BUILD_EXECUTABLE} all -j2 V=1 NDK_DEBUG=1
+                            WORKING_DIRECTORY ${NDKOUT}
+                          )
+    else()
+        add_custom_command(
+                            TARGET ${ANDROID_PROJECT_TARGET}
+                            POST_BUILD
+                            COMMAND ${NDK_BUILD_EXECUTABLE} all -j2 V=1
+                            WORKING_DIRECTORY ${NDKOUT}
+                          )
+    endif()
+
+    if(EXISTS ${ANDROID_EXECUTABLE})
+    	add_custom_command(
+    	                    TARGET ${ANDROID_PROJECT_TARGET}
+                            POST_BUILD
+    	                    COMMAND ${ANDROID_EXECUTABLE} update project  --target ${ANDROID_TARGET} --path "${NDKOUT}"
+    	                    WORKING_DIRECTORY ${NDKOUT}
+    	                  )
+
+    	add_custom_command(
+    	                    TARGET ${ANDROID_PROJECT_TARGET}
+                            POST_BUILD
+    	                    COMMAND ${ANT_EXECUTABLE} debug
+    	                    WORKING_DIRECTORY ${NDKOUT}
+    	                  )
+    else()
+        message(WARNING "Android executable not found. Not building ${ANDROID_PROJECT_TARGET} APK. Do you have the Android SDK installed?")
+    endif()
 endmacro(create_android_proj)


CMake: Need to find pugixml.hpp instead of pugixml.h

That's how file is actually called in the upstream.

--- src/cmake/Modules/FindPugiXML.cmake
+++ src/cmake/Modules/FindPugiXML.cmake
@@ -1,7 +1,7 @@
 # - Find PugiXML library
 # Find the native PugiXML includes and library
 # This module defines
-#  PUGIXML_INCLUDE_DIRS, where to find pugixml.h, Set when
+#  PUGIXML_INCLUDE_DIRS, where to find pugixml.hpp, Set when
 #                        PugiXML is found.
 #  PUGIXML_LIBRARIES, libraries to link against to use PugiiXML.
 #  PUGIXML_ROOT_DIR, The base directory to search for PugiXML.
@@ -38,7 +38,7 @@

 FIND_PATH(PUGIXML_INCLUDE_DIR
   NAMES
-    pugixml.h
+    pugixml.hpp
   HINTS
     ${_pugixml_SEARCH_DIRS}
   PATH_SUFFIXES


Build: Sanitizers: Debug doesn't use -gline-tables-only

--- cmake/Modules/FindSanitizers.cmake
+++ cmake/Modules/FindSanitizers.cmake
@@ -45,8 +45,10 @@

 	if (COMPILER_SUPPORTS_FLAGS)
 		message(STATUS "${READABLE_CXX_COMPILER} supports ${SAN_DESCRIPTION}")
-		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS}" PARENT_SCOPE)
 		set (DEBUGINFO_EXTERNALIZE 1 PARENT_SCOPE)
+		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer ${SAN_FLAGS}" PARENT_SCOPE)
+		set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -gline-tables-only" PARENT_SCOPE)
+		set (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -gline-tables-only" PARENT_SCOPE)
 	else ()
 		message(WARNING "${READABLE_CXX_COMPILER} doesn't support ${SAN_DESCRIPTION}")
 	endif ()
@@ -60,7 +62,7 @@
 	endif ()

 	set (ASAN_DESCRIPTION "AddressSanitizer")
-	set (ASAN_FLAGS  "-fno-omit-frame-pointer -gline-tables-only -fsanitize=address")
+	set (ASAN_FLAGS  "-fsanitize=address")
 	check_sanitizer_flags(${ASAN_DESCRIPTION} ${ASAN_FLAGS})
 endif ()

@@ -68,7 +70,7 @@
 # Check for Memory Sanitizer.
 if (MSAN)
 	set (MSAN_DESCRIPTION "MemorySanitizer")
-	set (MSAN_FLAGS  "-fno-omit-frame-pointer -gline-tables-only -fsanitize=memory -fsanitize-memory-track-origins")
+	set (MSAN_FLAGS  "-fsanitize=memory -fsanitize-memory-track-origins")
 	check_sanitizer_flags(${MSAN_DESCRIPTION} ${MSAN_FLAGS})
 endif ()

@@ -76,7 +78,7 @@
 # Check for Undefined Behavior Sanitizer.
 if (UBSAN)
 	set (UBSAN_DESCRIPTION "UndefinedBehaviorSanitizer")
-	set (UBSAN_FLAGS  "-fno-omit-frame-pointer -gline-tables-only -fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all")
+	set (UBSAN_FLAGS  "-fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all")
 	check_sanitizer_flags(${UBSAN_DESCRIPTION} ${UBSAN_FLAGS})
 endif ()

@@ -88,6 +90,6 @@
 	endif ()

 	set (TSAN_DESCRIPTION "ThreadSanitizer")
-	set (TSAN_FLAGS  "-fno-omit-frame-pointer -gline-tables-only -fsanitize=thread")
+	set (TSAN_FLAGS  "-fsanitize=thread")
 	check_sanitizer_flags(${TSAN_DESCRIPTION} ${TSAN_FLAGS})
 endif ()


Fix include paths

Fix include paths

--- cmake/modules/FindKTelepathy.cmake
+++ cmake/modules/FindKTelepathy.cmake
@@ -22,7 +22,6 @@
 find_path(KTELEPATHY_INCLUDE_DIR
   NAMES KTelepathy/presence.h
   PATHS ${KDE4_INCLUDE_DIR}
-  PATH_SUFFIXES telepathy-1.0
 )

 find_library(KTELEPATHY_LIBRARIES NAMES telepathykdecommoninternalsprivate )


FindPostgreSQL.cmake: Add PATH_SUFFIX for searching.

This slightly changes lookup order: Namely, the system-folder "/usr/include/postgresql"
is now preferred over "/usr/include/" even if both container libpq-fe.h.
This finds the correct path on a standard Gentoo installation, where "/usr/include/postgresql"
is a symlink to the folder with all include-files for the user-selected postgresql-version,
while "/usr/include/libpq-fe.h" is a single symlink provided for backwards-compatibility.

Since ROOT uses also e.g. "pg_config.h", selecting "/usr/include/" over "/usr/include/postgresql"
leads to failure on Gentoo.

--- cmake/modules/FindPostgreSQL.cmake
+++ cmake/modules/FindPostgreSQL.cmake
@@ -28,6 +28,9 @@
    "/usr/include/pgsql/server"
    "/usr/include/postgresql/server"
    "/usr/include/postgresql/*/server"
+  PATH_SUFFIXES
+    postgresql
+    include
 )

 find_library(POSTGRESQL_LIBRARY NAMES pq


llvm: add support for building x86_64-pc

set triplet for 64bit x86.

Signed-off-by: Anas Nashif <0d9952ec84ac43c159f6b7e7ed99a9080c00dd6e@intel.com>

--- cmake/toolchain/llvm/generic.cmake
+++ cmake/toolchain/llvm/generic.cmake
@@ -12,7 +12,11 @@
   set(triple arm-none-eabi)
   set(CMAKE_EXE_LINKER_FLAGS_INIT "--specs=nosys.specs")
 elseif("${ARCH}" STREQUAL "x86")
-  set(triple i686-pc-none-elf)
+  if(CONFIG_64BIT)
+    set(triple x86_64-pc-none-elf)
+  else()
+    set(triple i686-pc-none-elf)
+  endif()
 endif()

 set(CMAKE_C_COMPILER_TARGET   ${triple})


Remove CoreLocation requirement from framework build

--- toolchains/iOS.framework.cmake
+++ toolchains/iOS.framework.cmake
@@ -37,7 +37,7 @@
     endif()
 endif()

-set(FRAMEWORKS CoreGraphics CoreFoundation CoreLocation QuartzCore UIKit OpenGLES Security CFNetwork GLKit)
+set(FRAMEWORKS CoreGraphics CoreFoundation QuartzCore UIKit OpenGLES Security CFNetwork GLKit)

 # Tell SQLiteCpp to not build its own copy of SQLite, we will use the system library instead.
 set(SQLITECPP_INTERNAL_SQLITE OFF CACHE BOOL "")


config/VigraDetectCppVersion: Provide better output if compiled try_run file fails to run.

--- config/VigraDetectCppVersion.cmake
+++ config/VigraDetectCppVersion.cmake
@@ -9,6 +9,13 @@
         message(FATAL_ERROR "Failed to detect c++ version with a simple test program!  Compiler Output is below.\n"
                 "${COMPILE_OUTPUT_FROM_CPP_DETECT}")
     endif()
+
+    if(RUN_RESULT)
+        message(FATAL_ERROR "Failed to detect c++ version with a simple test program!\n"
+			    "Test program compiled, but did not execute cleanly. Run output is shown below.\n"
+ 			    "${VIGRA_CPP_VERSION}")
+    endif()
+
     message(STATUS "Detected C++ version: ${VIGRA_CPP_VERSION}")

 endmacro(VIGRA_DETECT_CPP_VERSION)


fixed for windows

fixed for windows

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -113,7 +113,7 @@
 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Embree: High Performance Ray Tracing Kernels")
 SET(CPACK_PACKAGE_VENDOR "Intel Corporation")
 SET(CPACK_PACKAGE_CONTACT embree_support@intel.com)
-SET(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
+#SET(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})

 SET(CPACK_COMPONENT_LIB_DISPLAY_NAME "Library")
 SET(CPACK_COMPONENT_LIB_DESCRIPTION "The Embree library including documentation.")


build

build

--- modules/zlib.cmake
+++ modules/zlib.cmake
@@ -1,4 +1,4 @@
-if(NOT TARGET zlib)
+if(NOT TARGET zlibstatic)

   # Temporary disable some warnings
   # C4127: conditional expression is constant
@@ -31,10 +31,10 @@
   endif()

   # Set module folder
-  set_target_properties(zlib zlibstatic example minigzip PROPERTIES FOLDER modules/zlib)
+  set_target_properties(zlibstatic zlib example minigzip PROPERTIES FOLDER modules/zlib)

   # Exclude some modules from the build
-  set_target_properties(example minigzip PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
+  set_target_properties(zlib example minigzip PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)

   # Restore default warnings
   set(CMAKE_C_FLAGS ${CMAKE_OLD_C_FLAGS})


Fix logic error in Boost.Test detection

Fix logic error in Boost.Test detection

An error is only raised if the imported target AND the variable
are not defined.

--- Modules/CetCMakeUtilities.cmake
+++ Modules/CetCMakeUtilities.cmake
@@ -202,9 +202,9 @@
       )
   endif()
   if((NOT TARGET Boost::unit_test_framework)
-     OR (NOT Boost_UNIT_TEST_FRAMEWORK_LIBRARY))
+    AND (NOT Boost_UNIT_TEST_FRAMEWORK_LIBRARY))
     message(FATAL_ERROR
-      "set_boost_unit_properties: No Target of Variable found for Boost's Unit Test Framework\n"
+      "set_boost_unit_properties: No Target or Variable found for Boost's Unit Test Framework\n"
       "Ensure the project calls\n"
       "find_package(Boost REQUIRED unit_test_framework)\n"
       "before using this function"
@@ -212,7 +212,7 @@
   endif()

   # Append, don't overwrite, compile definitions.
-  # All target types need(or rather use) BOOST_TEST_DYN_LINK
+  # All target types need (or rather use) BOOST_TEST_DYN_LINK
   # BOOST_TEST_MAIN for executables only
   set_property(TARGET ${_target}
     APPEND PROPERTY


COMP(#17181): Deactivated tests which failed randomly

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -8,11 +8,13 @@
    # mark it as critical.

    ################## ON THE FENCE TESTS #################################################
-   mitkNavigationToolStorageDeserializerTest.cpp # This test was disabled because of bug 17303.
-  # Has been activated to test if bug has been fixed. If it proves to be stable move to RUNNING TESTS
-   mitkNavigationToolStorageSerializerAndDeserializerIntegrationTest.cpp # This test was disabled because of bug 17181.
-  # Has been activated to test if bug has been fixed. If it proves to be stable move to RUNNING TESTS
-   ################# RUNNING TESTS ###################################################
+   # none
+
+   ################## DISABLED TESTS #####################################################
+   # mitkNavigationToolStorageDeserializerTest.cpp # This test was disabled because of bug 17303.
+   # mitkNavigationToolStorageSerializerAndDeserializerIntegrationTest.cpp # This test was disabled because of bug 17181.
+
+   ################# RUNNING TESTS #######################################################
    mitkCameraVisualizationTest.cpp
    mitkClaronInterfaceTest.cpp
    mitkClaronToolTest.cpp


WIN32 packaging: fix un-updated path to ico that prevented the nsis packaging

Having a wrong path for the CPACK_NSIS_MUI_ICON made NSIS fail with cryptic error:
CPack Error: Problem running NSIS command: "C:/Program Files (x86)/NSIS/makensis.exe" "C:/lv-b/_CPack_Packages/win64/NSIS/project.nsi"
Please check C:/lv-b/_CPack_Packages/win64/NSIS/NSISOutput.log for errors

--- Superbuild/Projects/win32/lidarview.bundle.cmake
+++ Superbuild/Projects/win32/lidarview.bundle.cmake
@@ -8,7 +8,7 @@

 set(CPACK_NSIS_HELP_LINK "https://www.paraview.org/lidarview/")
 set(${SOFTWARE_NAME}_description "${SOFTWARE_NAME} ${lidarview_version_full}")
-set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_LIST_DIR}/../../../SoftwareInformation/logo.ico")
+set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_LIST_DIR}/../../../Application/SoftwareInformation/logo.ico")

 set(library_paths "lib")


Scripting Update

Scripting Update

--- ctest-scripts/ContinuousTest.cmake
+++ ctest-scripts/ContinuousTest.cmake
@@ -20,7 +20,7 @@

 # Set locations of src/build
-set (CTEST_DASHBOARD_ROOT "$ENV{HOME}/Dashboards")
+set (CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}/Dashboards")
 SET (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/netcdf-src")
 SET (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/builds/build-cont")


Addressed an issue with building tests on Mac OS X (probably also valid on Linux?...).

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -544,17 +544,23 @@
                     ../../plugin.h
                     ../../pluginmanager.h

+                    ../../misc/Core/src/dockwidget.h
+
                     ${HEADERS_MOC}
                     ${TEST_HEADER_MOC_FILE}
                 )

                 ADD_EXECUTABLE(${TEST_NAME}
                     ../../../../test/testutils.cpp
+
                     ../../coreinterface.cpp
                     ../../interface.cpp
                     ../../plugin.cpp
                     ../../plugininfo.cpp
                     ../../pluginmanager.cpp
+
+                    ../../misc/Core/src/commonwidget.cpp
+                    ../../misc/Core/src/dockwidget.cpp

                     ${TEST_SOURCE_FILE}
                     ${TEST_SOURCES_MOC}


Some minor cleaning up [ci skip].

Some minor cleaning up [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -604,7 +604,7 @@
         ENDFOREACH()
     ENDIF()

-    # Package the plugin, but only if we are not on OS X since it will  have
+    # Package the plugin, but only if we are not on OS X since it will have
     # already been copied

     IF(NOT APPLE)


MDEV-9869 INSTALL SONAME 'ha_connect'

MDEV-9869 INSTALL SONAME 'ha_connect'

make storage engine RPMs require the exact server
version RPM: "MariaDB = %{version}-%{release}",
other plugins require simply "MariaDB", as before.

--- cmake/plugin.cmake
+++ cmake/plugin.cmake
@@ -194,8 +194,11 @@
     # Install dynamic library
     IF(ARG_COMPONENT)
       IF(CPACK_COMPONENTS_ALL AND NOT CPACK_COMPONENTS_ALL MATCHES ${ARG_COMPONENT})
+        IF (ARG_STORAGE_ENGINE)
+          SET(ver " = %{version}-%{release}")
+        ENDIF()
         SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} ${ARG_COMPONENT} PARENT_SCOPE)
-        SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB" PARENT_SCOPE)
+        SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB${ver}" PARENT_SCOPE)

         IF (NOT ARG_CONFIG)
           SET(ARG_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/${target}.cnf")


cmake

cmake

--- cmake/shared.cmake
+++ cmake/shared.cmake
@@ -69,6 +69,10 @@
         message("Using clang-cl")
         set(CLANG_CL 1)

+		set(CMAKE_CXX_STANDARD 14)
+		set(CMAKE_CXX_STANDARD_REQUIRED on)
+		set(CMAKE_CXX_EXTENSIONS OFF)
+
 		if(CMAKE_GENERATOR MATCHES "Visual Studio")
 			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++14 /GX /wd4996")
 		else()


Put back trailing white-spaces for output reference for regression.


probably fix for mingw compile flags #68

--- cmake/PlatformWindowsGCC.cmake
+++ cmake/PlatformWindowsGCC.cmake
@@ -37,16 +37,38 @@
     set(EXCEPTION_FLAG "-fno-exceptions")
 endif()

-set(MINGW_COMPILE_FLAGS "-pthread -pipe -fPIC -Wreturn-type -Wall -Wextra -Wfloat-equal -Wshadow -Wcast-align -Wconversion ${EXCEPTION_FLAG}")
-# pthread       -> use pthread library
-# no-rtti       -> disable c++ rtti
-# no-exceptions -> disable exception handling
-# pipe          -> use pipes
-# fPIC          -> use position independent code
-# -Wreturn-type -Werror=return-type -> missing returns in functions and methods are handled as errors which stops the compilation
+set(MINGW_COMPILE_FLAGS
+
+      ${EXCEPTION_FLAG}
+      -pthread      # -> use pthread library
+    # -no-rtti      # -> disable c++ rtti
+      -pipe         # -> use pipes
+      -Wall         # ->
+      -Wextra       # ->
+      -Werror       # ->
+      -fPIC         # -> use position independent code
+      -Wreturn-type
+      -Wfloat-equal
+      -Wcast-align
+      -Wconversion
+    # -Werror=return-type -> missing returns in functions and methods are handled as errors which stops the compilation
+      -Wcast-align  # ->
+      -Wshadow      # -> e.g. when a parameter is named like a member, too many warnings, disabled for now
+)

-set(DEFAULT_COMPILE_FLAGS ${MINGW_COMPILE_FLAGS})
+set(DEFAULT_COMPILE_FLAGS
+    ${MINGW_COMPILE_FLAGS}
+    $<$<CONFIG:Debug>:
+    >
+    $<$<CONFIG:Release>:
+    >
+)

+set(MINGW_LINKER_FLAGS "-pthread")
+
+set(DEFAULT_LINKER_FLAGS_RELEASE ${MINGW_LINKER_FLAGS})
+set(DEFAULT_LINKER_FLAGS_DEBUG ${MINGW_LINKER_FLAGS})
+set(DEFAULT_LINKER_FLAGS ${MINGW_LINKER_FLAGS})

 # Add platform specific libraries for linking
 set(EXTRA_LIBS "")


Add secondary libstdc++ 4.8 and 5.1 detection mechanisms

Summary:
The date-based approach to detecting unsupported versions of libstdc++
does not handle bug fix releases of older versions. As an example, the
`__GLIBCXX__` value associated with version 5.1, `20150422`, is less
than the values associated with versions 4.8.5 and 4.9.3.

This patch adds secondary checks based on certain properties in
sufficiently new versions of libstdc++.

Reviewers: jfb, tstellar, rnk, sfertile, nemanjai

Reviewed By: jfb

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

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

--- cmake/modules/CheckCompilerVersion.cmake
+++ cmake/modules/CheckCompilerVersion.cmake
@@ -58,6 +58,8 @@
     set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
     set(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
     set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++0x")
+    # Test for libstdc++ version of at least 4.8 by checking for _ZNKSt17bad_function_call4whatEv.
+    # Note: We should check _GLIBCXX_RELEASE when possible (i.e., for GCC 7.1 and up).
     check_cxx_source_compiles("
 #include <iosfwd>
 #if defined(__GLIBCXX__)
@@ -65,18 +67,30 @@
 #error Unsupported libstdc++ version
 #endif
 #endif
-int main() { return 0; }
+#if defined(__GLIBCXX__)
+extern const char _ZNKSt17bad_function_call4whatEv[];
+const char *chk = _ZNKSt17bad_function_call4whatEv;
+#else
+const char *chk = \"\";
+#endif
+int main() { ++chk; return 0; }
 "
       LLVM_LIBSTDCXX_MIN)
     if(NOT LLVM_LIBSTDCXX_MIN)
       message(FATAL_ERROR "libstdc++ version must be at least ${GCC_MIN}.")
     endif()
+    # Test for libstdc++ version of at least 5.1 by checking for std::iostream_category().
+    # Note: We should check _GLIBCXX_RELEASE when possible (i.e., for GCC 7.1 and up).
     check_cxx_source_compiles("
 #include <iosfwd>
 #if defined(__GLIBCXX__)
 #if __GLIBCXX__ < ${GCC_SOFT_ERROR_DATE}
 #error Unsupported libstdc++ version
 #endif
+#endif
+#if defined(__GLIBCXX__)
+#include <ios>
+void foo(void) { (void) std::iostream_category(); }
 #endif
 int main() { return 0; }
 "


Use unicode on windows

Use unicode on windows

--- cmake/modules/DeskvoxHandleOptions.cmake
+++ cmake/modules/DeskvoxHandleOptions.cmake
@@ -9,6 +9,11 @@

 if(NOT BUILD_SHARED_LIBS)
   add_definitions(-DNODLL)
+endif()
+
+
+if(WIN32)
+  add_definitions(-D_UNICODE -DUNICODE)
 endif()


qt: for some reason STL support is turned off on OS X

--- projects/qt.cmake
+++ projects/qt.cmake
@@ -48,6 +48,7 @@
                       -no-xvideo
                       -no-script
                       -no-cups
+                      -stl
                       -opensource
                       -qt-libjpeg
                       -qt-libtiff


ENH: Removing unused file

ENH: Removing unused file

--- CMake/OTBModuleExternalProject.cmake
+++ CMake/OTBModuleExternalProject.cmake
@@ -1,252 +0,0 @@
-#
-# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
-#
-# This file is part of Orfeo Toolbox
-#
-#     https://www.orfeo-toolbox.org/
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#Adapted from ITKModuleExternal.cmake
-# This file ensures the appropriate variables are set up for a project extending
-# OTB before including OTBModuleMacros. This is the preferred way to build an
-# OTB module outside of the OTB source tree.
-
-
-macro(otb_module _name)
-  otb_module_check_name(${_name})
-  set(otb-module ${_name})
-  set(otb-module-test ${_name}-Test)
-  set(_doing "")
-  set(OTB_MODULE_${otb-module}_DECLARED 1)
-  set(OTB_MODULE_${otb-module-test}_DECLARED 1)
-  set(OTB_MODULE_${otb-module}_DEPENDS "")
-  set(OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS "")
-  set(OTB_MODULE_${otb-module-test}_DEPENDS "${otb-module}")
-  set(OTB_MODULE_${otb-module}_DESCRIPTION "description")
-  set(OTB_MODULE_${otb-module}_EXCLUDE_FROM_DEFAULT 0)
-  set(OTB_MODULE_${otb-module}_ENABLE_SHARED 0)
-  foreach(arg ${ARGN})
-    if("${arg}" MATCHES "^(DEPENDS|OPTIONAL_DEPENDS|TEST_DEPENDS|DESCRIPTION|DEFAULT)$")
-      set(_doing "${arg}")
-    elseif("${arg}" MATCHES "^EXCLUDE_FROM_DEFAULT$")
-      set(_doing "")
-      set(OTB_MODULE_${otb-module}_EXCLUDE_FROM_DEFAULT 1)
-    elseif("${arg}" MATCHES "^EXCLUDE_FROM_ALL$") # To maintain backward compatibility
-      set(_doing "")
-      message(AUTHOR_WARNING "EXCLUDE_FROM_ALL is deprecated, please use EXCLUDE_FROM_DEFAULT.")
-      set(OTB_MODULE_${otb-module}_EXCLUDE_FROM_DEFAULT 1)
-    elseif("${arg}" MATCHES "^ENABLE_SHARED$")
-      set(_doing "")
-      set(OTB_MODULE_${otb-module}_ENABLE_SHARED 1)
-    elseif("${arg}" MATCHES "^[A-Z][A-Z][A-Z]$")
-      set(_doing "")
-      message(AUTHOR_WARNING "Unknown argument [${arg}]")
-    elseif("${_doing}" MATCHES "^DEPENDS$")
-      list(APPEND OTB_MODULE_${otb-module}_DEPENDS "${arg}")
-    elseif("${_doing}" MATCHES "^OPTIONAL_DEPENDS$")
-      list(APPEND OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS "${arg}")
-    elseif("${_doing}" MATCHES "^TEST_DEPENDS$")
-      list(APPEND OTB_MODULE_${otb-module-test}_DEPENDS "${arg}")
-    elseif("${_doing}" MATCHES "^DESCRIPTION$")
-      set(_doing "")
-      set(OTB_MODULE_${otb-module}_DESCRIPTION "${arg}")
-    elseif("${_doing}" MATCHES "^DEFAULT")
-      message(FATAL_ERROR "Invalid argument [DEFAULT]")
-    else()
-      set(_doing "")
-      message(AUTHOR_WARNING "Unknown argument [${arg}]")
-    endif()
-  endforeach()
-  list(SORT OTB_MODULE_${otb-module}_DEPENDS) # Deterministic order.
-  list(SORT OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS) # Deterministic order.
-  list(SORT OTB_MODULE_${otb-module-test}_DEPENDS) # Deterministic order.
-endmacro()
-
-set(OTB_MODULE_ACTIVATION_OPTION_LIST "")
-macro(otb_module_activation_option _option_desc _default)
-  string(REGEX REPLACE "OTB(.*)" "OTB_USE_\\1" _option_name ${otb-module})
-  string(TOUPPER ${_option_name} _option_name)
-  option(${_option_name} ${_option_desc} ${_default})
-  set(OTB_MODULE_${otb-module}_ACTIVATION_OPTION ${_option_name})
-  list(APPEND OTB_MODULE_ACTIVATION_OPTION_LIST ${_option_name})
-endmacro()
-
-macro(otb_module_check_name _name)
-  if( NOT "${_name}" MATCHES "^[a-zA-Z][a-zA-Z0-9]*$")
-    message(FATAL_ERROR "Invalid module name: ${_name}")
-  endif()
-endmacro()
-
-
-
-macro(otb_module_impl_ext)
-  include(otb-module.cmake) # Load module meta-data
-  set(${otb-module}_INSTALL_RUNTIME_DIR ${OTB_INSTALL_RUNTIME_DIR})
-  set(${otb-module}_INSTALL_LIBRARY_DIR ${OTB_INSTALL_LIBRARY_DIR})
-  set(${otb-module}_INSTALL_ARCHIVE_DIR ${OTB_INSTALL_ARCHIVE_DIR})
-  set(${otb-module}_INSTALL_INCLUDE_DIR ${OTB_INSTALL_INCLUDE_DIR})
-
-  # Collect all sources and headers for IDE projects.
-  set(_srcs "")
-  if("${CMAKE_GENERATOR}" MATCHES "Xcode|Visual Studio|KDevelop"
-      OR CMAKE_EXTRA_GENERATOR)
-    # Add sources to the module target for easy editing in the IDE.
-    set(_include ${${otb-module}_SOURCE_DIR}/include)
-    if(EXISTS ${_include})
-      set(_src ${${otb-module}_SOURCE_DIR}/src)
-      file(GLOB_RECURSE _srcs ${_src}/*.cxx)
-      file(GLOB_RECURSE _hdrs ${_include}/*.h ${_include}/*.hxx)
-      list(APPEND _srcs ${_hdrs})
-    endif()
-  endif()
-
-  # Create a ${otb-module}-all target to build the whole module.
-  add_custom_target(${otb-module}-all ALL SOURCES ${_srcs})
-
-  otb_module_use(${OTB_MODULE_${otb-module}_DEPENDS})
-
-  foreach(dep IN LISTS OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS)
-    if (${dep}_ENABLED)
-      otb_module_use(${dep})
-    endif()
-  endforeach()
-
-  if(NOT DEFINED ${otb-module}_LIBRARIES)
-    set(${otb-module}_LIBRARIES "")
-
-    foreach(dep IN LISTS OTB_MODULE_${otb-module}_DEPENDS)
-      list(APPEND ${otb-module}_LIBRARIES "${${dep}_LIBRARIES}")
-    endforeach()
-
-    foreach(dep IN LISTS OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS)
-      if (${dep}_ENABLED)
-        list(APPEND ${otb-module}_LIBRARIES "${${dep}_LIBRARIES}")
-      endif()
-    endforeach()
-
-    if(${otb-module}_LIBRARIES)
-      list(REMOVE_DUPLICATES ${otb-module}_LIBRARIES)
-    endif()
-  endif()
-
-  if(EXISTS ${${otb-module}_SOURCE_DIR}/include)
-    list(APPEND ${otb-module}_INCLUDE_DIRS ${${otb-module}_SOURCE_DIR}/include)
-    install(DIRECTORY include/ DESTINATION ${${otb-module}_INSTALL_INCLUDE_DIR} COMPONENT Development)
-  endif()
-
-  if(NOT OTB_SOURCE_DIR)
-    # When building a module outside the OTB source tree, find the export
-    # header.
-    list(APPEND ${otb-module}_INCLUDE_DIRS ${${otb-module}_BINARY_DIR}/include)
-  else()
-    # if OTB_SOURCE_DIR is set all auto-generated export headers for a class
-    # goes into OTBCommon_BINARY_DIR/src.
-    # Hence it is required to include   ${OTBCommon_BINARY_DIR} to list of
-    # ${otb-module}_INCLUDE_DIRS. Not doing this will force developer to
-    # to include them explicitly for each module which can result in
-    # more problems. ( stephane albert)
-    list(APPEND ${otb-module}_INCLUDE_DIRS ${OTBCommon_BINARY_DIR})
-  endif()
-
-  if(${otb-module}_INCLUDE_DIRS)
-    include_directories(${${otb-module}_INCLUDE_DIRS})
-  endif()
-  if(${otb-module}_SYSTEM_INCLUDE_DIRS)
-    include_directories(${${otb-module}_SYSTEM_INCLUDE_DIRS})
-  endif()
-
-  if(${otb-module}_SYSTEM_LIBRARY_DIRS)
-    link_directories(${${otb-module}_SYSTEM_LIBRARY_DIRS})
-  endif()
-
-  if(${otb-module}_THIRD_PARTY)
-    otb_module_warnings_disable(C CXX)
-  else()
-    if(OTB_CPPCHECK_TEST)
-      otb_module_cppcheck_test( ${otb-module} )
-    endif()
-    if(EXISTS "${${otb-module}_SOURCE_DIR}/include" AND BUILD_TESTING)
-      otb_module_headertest(${otb-module})
-    endif()
-  endif()
-
-  if(EXISTS ${${otb-module}_SOURCE_DIR}/src/CMakeLists.txt)
-    set_property(GLOBAL APPEND PROPERTY OTBTargets_MODULES ${otb-module})
-    add_subdirectory(src)
-  endif()
-
-  if(EXISTS ${${otb-module}_SOURCE_DIR}/app/CMakeLists.txt AND NOT ${otb-module}_NO_SRC)
-    add_subdirectory(app)
-  endif()
-
-  if( OTB_MODULE_${otb-module}_ENABLE_SHARED )
-    if(OTB_SOURCE_DIR)
-      set(_export_header_file "${OTBCommon_BINARY_DIR}/${otb-module}Export.h")
-    else()
-      set(_export_header_file "${${otb-module}_BINARY_DIR}/include/${otb-module}Export.h")
-    endif()
-
-    # Generate the export macro header for symbol visibility/Windows DLL declspec
-    generate_export_header(${otb-module}
-      EXPORT_FILE_NAME ${_export_header_file}
-      EXPORT_MACRO_NAME ${otb-module}_EXPORT
-      NO_EXPORT_MACRO_NAME ${otb-module}_HIDDEN
-      STATIC_DEFINE OTB_STATIC )
-    install(FILES
-      ${_export_header_file}
-      DESTINATION ${${otb-module}_INSTALL_INCLUDE_DIR}
-      COMPONENT Development
-      )
-
-    if (BUILD_SHARED_LIBS)
-      # export flags are only added when building shared libs, they cause
-      # mismatched visibility warnings when building statically.
-      add_compiler_export_flags(my_abi_flags)
-      set_property(TARGET ${otb-module} APPEND
-        PROPERTY COMPILE_FLAGS "${my_abi_flags}")
-    endif()
-  endif()
-
-  set(otb-module-EXPORT_CODE-build "${${otb-module}_EXPORT_CODE_BUILD}")
-  set(otb-module-EXPORT_CODE-install "${${otb-module}_EXPORT_CODE_INSTALL}")
-
-  set(otb-module-DEPENDS "${OTB_MODULE_${otb-module}_DEPENDS}")
-  foreach(dep IN LISTS OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS)
-    if (${dep}_ENABLED)
-      list(APPEND otb-module-DEPENDS ${dep})
-    endif()
-  endforeach()
-  set(otb-module-LIBRARIES "${${otb-module}_LIBRARIES}")
-  set(otb-module-INCLUDE_DIRS-build "${${otb-module}_INCLUDE_DIRS}")
-  set(otb-module-INCLUDE_DIRS-install "\${OTB_INSTALL_PREFIX}/${${otb-module}_INSTALL_INCLUDE_DIR}")
-  if(${otb-module}_SYSTEM_INCLUDE_DIRS)
-    list(APPEND otb-module-INCLUDE_DIRS-build "${${otb-module}_SYSTEM_INCLUDE_DIRS}")
-    list(APPEND otb-module-INCLUDE_DIRS-install "${${otb-module}_SYSTEM_INCLUDE_DIRS}")
-  endif()
-  set(otb-module-LIBRARY_DIRS "${${otb-module}_SYSTEM_LIBRARY_DIRS}")
-  set(otb-module-INCLUDE_DIRS "${otb-module-INCLUDE_DIRS-build}")
-  set(otb-module-EXPORT_CODE "${otb-module-EXPORT_CODE-build}")
-  configure_file(${_OTBModuleMacros_DIR}/OTBModuleInfo.cmake.in ${OTB_MODULES_DIR}/${otb-module}.cmake @ONLY)
-  set(otb-module-INCLUDE_DIRS "${otb-module-INCLUDE_DIRS-install}")
-  set(otb-module-EXPORT_CODE "${otb-module-EXPORT_CODE-install}")
-  configure_file(${_OTBModuleMacros_DIR}/OTBModuleInfo.cmake.in CMakeFiles/${otb-module}.cmake @ONLY)
-  install(FILES
-    ${${otb-module}_BINARY_DIR}/CMakeFiles/${otb-module}.cmake
-    DESTINATION ${OTB_INSTALL_PACKAGE_DIR}/Modules
-    COMPONENT Development
-    )
-  otb_module_doxygen(${otb-module})   # module name
-endmacro()
-


COMP: In ctkDashboardDriverScript, WITH_COVERAGE now configured properly

This variable was alaways set to True when written to the initial CMakeCache.txt

--- CMake/ctkDashboardDriverScript.cmake
+++ CMake/ctkDashboardDriverScript.cmake
@@ -115,7 +115,7 @@
 CTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
 QT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
 SUPERBUILD_EXCLUDE_CTKBUILD_TARGET:BOOL=TRUE
-WITH_COVERAGE:BOOL=TRUE
+WITH_COVERAGE:BOOL=${WITH_COVERAGE}
 DOCUMENTATION_TARGET_IN_ALL:BOOL=${WITH_DOCUMENTATION}
 ${ADDITIONNAL_CMAKECACHE_OPTION}
 ")


Updated comments.

Updated comments.

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

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -257,8 +257,7 @@
 macro (configure_dbus_glib)
     sagase_configure_package (DBUS_GLIB
         NAMES dbus-glib dbus
-        COMPONENTS dbus-glib # dbus-glib added to help sagese to find include folder with dbus-glib.h file
-        # TODO: Add real components
+        COMPONENTS dbus-glib
         PREFIXES ${ENV_NAALI_DEP_PATH}/dbus-glib)
     sagase_configure_report (DBUS_GLIB)
 endmacro (configure_dbus_glib)


CMake: let *_cuda targets depend on *.inst targets

--- cmake/macros/macro_expand_instantiations.cmake
+++ cmake/macros/macro_expand_instantiations.cmake
@@ -23,9 +23,9 @@
 #
 # target
 #
-#    where target.${build_type} will depend on the generation of all .inst
-#    files, to ensure that all .inst files are generated prior to
-#    compiling.
+#    where target.${build_type} (and if present) target.${build_type}_cuda
+#    will depend on the generation of all .inst files, to ensure that all
+#    .inst files are generated prior to compiling.
 #
 # inst_in_files
 #
@@ -58,7 +58,7 @@
            < ${CMAKE_CURRENT_SOURCE_DIR}/${_inst_in_file}
            > ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file}.tmp
       COMMAND ${CMAKE_COMMAND}
-      ARGS -E rename
+      ARGS -E rename
            ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file}.tmp
            ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file}
       )
@@ -78,7 +78,12 @@
   #
   FOREACH(_build ${DEAL_II_BUILD_TYPES})
     STRING(TOLOWER ${_build} _build_lowercase)
+
     ADD_DEPENDENCIES(${_target}.${_build_lowercase} ${_target}.inst)
+
+    IF(TARGET ${_target}.${_build_lowercase}_cuda)
+      ADD_DEPENDENCIES(${_target}.${_build_lowercase}_cuda ${_target}.inst)
+    ENDIF()
   ENDFOREACH()

 ENDMACRO()


Improve of the C ++ feature - check.

Improve of the C ++ feature - check.

The result of the check is stored in a sub-directory and not directly in the build folder

--- cmake/CheckCXX11Features.cmake
+++ cmake/CheckCXX11Features.cmake
@@ -76,7 +76,7 @@

 function(cxx11_check_feature FEATURE_NAME RESULT_VAR)
     if (NOT DEFINED ${RESULT_VAR})
-        set(_bindir "${CMAKE_CURRENT_BINARY_DIR}/cxx11_${FEATURE_NAME}")
+        set(_bindir "${CMAKE_CURRENT_BINARY_DIR}/cxx11/${FEATURE_NAME}")

         set(_SRCFILE_BASE ${CMAKE_CURRENT_LIST_DIR}/CheckCXX11Features/cxx11-test-${FEATURE_NAME})
         set(_LOG_NAME "\"${FEATURE_NAME}\"")


Fix: the QUIET argument is not correctly handled in cmake < 2.8.3

Treat the two cases separately, state QUIET only when cmake version >= 2.8.3

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

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -8,8 +8,12 @@
 # OPENNI_DEFINITIONS - Compiler flags for OPENNI.

 find_package(PkgConfig)
-#don't use QUIET
-pkg_check_modules(PC_OPENNI openni-dev)
+if(${CMAKE_VERSION} VERSION_LESS 2.8.3)
+	pkg_check_modules(PC_OPENNI openni-dev)
+else(${CMAKE_VERSION} VERSION_LESS 2.8.3)
+	pkg_check_modules(PC_OPENNI QUIET openni-dev)
+endif(${CMAKE_VERSION} VERSION_LESS 2.8.3)
+
 set(OPENNI_DEFINITIONS ${PC_OPENNI_CFLAGS_OTHER})

 find_path(OPENNI_INCLUDE_DIR XnStatus.h


Fix clang configuration output

Fix clang configuration output

--- cmake/PlatformLinuxClang.cmake
+++ cmake/PlatformLinuxClang.cmake
@@ -1,4 +1,4 @@
-message(STATUS "Configuring for platform Linux/GCC.")
+message(STATUS "Configuring for platform Linux/Clang.")

 # Enable C++11 support


[modules] Do not offer header files from two different locations.

If we have -Icomponent/inc and -I$ROOTSYS/include we first try to resolve the
header A from component/inc. However if header B from $ROOTSYS/include
activated a module containing header A we get a redefinition errors.

Those errors are in a way correct because we cannot possibly know that two
headers with the same name coming from two different locations are the same.

This patch disables the addition of component/inc as an include path when
-Dcxxmodules=On is specified.

This should fix the clangHEAD nightly builds.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -822,22 +822,28 @@
 #---------------------------------------------------------------------------------------------------
 function(ROOT_ADD_INCLUDE_DIRECTORIES library)
   if(PROJECT_NAME STREQUAL "ROOT")
-    if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc)
-      target_include_directories(${library}
-        PRIVATE
-          ${CMAKE_CURRENT_SOURCE_DIR}/inc
-        INTERFACE
-          $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
-      )
-    endif()
-
-    if(root7 AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/v7/inc)
-      target_include_directories(${library}
-        PRIVATE
-          ${CMAKE_CURRENT_SOURCE_DIR}/v7/inc
-        INTERFACE
-          $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/v7/inc>
-      )
+    # Currently the *non-runtime_cxxmodules* are wired to the $ROOTSYS/include.
+    # When we have blah/inc and $ROOTSYS/include and we resolve a header file
+    # from the former, we hit redefinition errors if a module was already
+    # activated from a header in the latter.
+    if (NOT cxxmodules)
+      if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc)
+        target_include_directories(${library}
+          PRIVATE
+            ${CMAKE_CURRENT_SOURCE_DIR}/inc
+          INTERFACE
+            $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
+        )
+      endif()
+
+      if(root7 AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/v7/inc)
+        target_include_directories(${library}
+          PRIVATE
+            ${CMAKE_CURRENT_SOURCE_DIR}/v7/inc
+          INTERFACE
+            $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/v7/inc>
+        )
+      endif()
     endif()

     if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res)


Fixed cpp test copy to staging area.

Fixed cpp test copy to staging area.

--- cmake/modules/testhelper.cmake
+++ cmake/modules/testhelper.cmake
@@ -1,9 +1,11 @@
 function(addTestTargetToLibavgPythonPackage testTarget)
     add_custom_target(copy_${testTarget} ALL)
     add_dependencies(copy_${testTarget} ${testTarget})
-    copyDirIfDifferent("copy_${testTarget}"
-            "${CMAKE_CURRENT_BINARY_DIR}/${testTarget}"
-            "${CMAKE_BINARY_DIR}/python/libavg/test/cpptest")
+    add_custom_command(TARGET "copy_${testTarget}"
+        COMMAND ${CMAKE_COMMAND}
+        ARGS -E copy_if_different "${CMAKE_CURRENT_BINARY_DIR}/${testTarget}"
+            "${CMAKE_BINARY_DIR}/python/libavg/test/cpptest"
+        )
 endfunction()


Removed duplicate directory

Removed duplicate directory

--- cmake/Modules/CppUTestConfigurationOptions.cmake
+++ cmake/Modules/CppUTestConfigurationOptions.cmake
@@ -51,17 +51,12 @@
     endif (NOT GMOCK_HOME)

     # GMock pulls in gtest.
-    set(REAL_GTEST OFF)
     set(CPPUTEST_USE_REAL_GMOCK 1)

     include_directories(${GMOCK_HOME}/include ${GMOCK_HOME}/gtest ${GMOCK_HOME}/gtest/include)
     add_subdirectory(${GMOCK_HOME} "${CMAKE_CURRENT_BINARY_DIR}/gmock")
     set(CPPUNIT_EXTERNAL_LIBRARIES ${CPPUNIT_EXTERNAL_LIBARIES} gmock gtest)
-    set(GTEST_HOME $ENV{GTEST_HOME})

-    include_directories(${GTEST_HOME} ${GTEST_HOME}/include)
-    add_subdirectory(${GTEST_HOME} "${CMAKE_CURRENT_BINARY_DIR}/gtest")
-    set(CPPUNIT_EXTERNAL_LIBRARIES ${CPPUNIT_EXTERNAL_LIBARIES} gtest)
 endif (GMOCK)

 set(CPPUTEST_C_FLAGS "${CPPUTEST_C_FLAGS} ${CPPUTEST_C_WARNING_FLAGS}")


COMP: Add try_compile check for gold linker.

The gold linker is shipped with bin-utils, and it may not be available with a
given GCC. Be safe and use a try_compile check for the flag.

Change-Id: I0deb9140d817761c5af4ac013252f06157c9fc2d

--- CMake/ITKSetStandardCompilerFlags.cmake
+++ CMake/ITKSetStandardCompilerFlags.cmake
@@ -198,13 +198,16 @@

     if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER "4.7" AND
        "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
-      option(ITK_USE_GOLD_LINKER "Use the gold linker instead of ld." ON)
-      mark_as_advanced(ITK_USE_GOLD_LINKER)
-      # The gold linker is approximately 3X faster.
-      if(ITK_USE_GOLD_LINKER)
-        set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=gold ${CMAKE_EXE_LINKER_FLAGS}")
-        set(CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=gold ${CMAKE_MODULE_LINKER_FLAGS}")
-        set(CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=gold ${CMAKE_SHARED_LINKER_FLAGS}")
+      ITK_CHECK_CXX_COMPILER_FLAG("-fuse-ld=gold" have_gold)
+      if(have_gold)
+        option(ITK_USE_GOLD_LINKER "Use the gold linker instead of ld." ON)
+        mark_as_advanced(ITK_USE_GOLD_LINKER)
+        # The gold linker is approximately 3X faster.
+        if(ITK_USE_GOLD_LINKER)
+          set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=gold ${CMAKE_EXE_LINKER_FLAGS}")
+          set(CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=gold ${CMAKE_MODULE_LINKER_FLAGS}")
+          set(CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=gold ${CMAKE_SHARED_LINKER_FLAGS}")
+        endif()
       endif()
     endif()


fix broken launch services database search under OS X

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -351,8 +351,10 @@
 		# the executable usually resides in the LaunchServices framework Support directory
 		# The LaunchServices framework is a sub-framework of the CoreServices umbrella framework
 		cmake_find_frameworks(CoreServices)
-		find_program (Mathematica_LSRegister_EXECUTABLE NAMES "lsregister" PATH_SUFFIXES "Support"
-			HINTS "${CoreServices_FRAMEWORKS}/Frameworks/LaunchServices.framework")
+		find_program (Mathematica_LSRegister_EXECUTABLE
+			NAMES "lsregister"
+			PATH_SUFFIXES "/Frameworks/LaunchServices.framework/Support"
+			HINTS ${CoreServices_FRAMEWORKS})
 		mark_as_advanced(
 			Mathematica_CoreServices_DIR
 			Mathematica_LaunchServices_DIR


Cygwin fix

Cygwin fix

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -113,8 +113,10 @@
 # file(TO_CMAKE_PATH "C:\Program Files" ...) would result in unworkable "C;/Program Files"
 function (_to_cmake_path _inPath _outPathVariable)
 	if (CYGWIN)
+		find_program(Mathematica_CYGPATH_EXECUTABLE "cygpath")
+		mark_as_advanced(Mathematica_CYGPATH_EXECUTABLE)
 		execute_process(
-			COMMAND cygpath "--unix" "${_inPath}" TIMEOUT 5
+			COMMAND "${Mathematica_CYGPATH_EXECUTABLE}" "--unix" "${_inPath}" TIMEOUT 5
 			OUTPUT_VARIABLE ${_outPathVariable} OUTPUT_STRIP_TRAILING_WHITESPACE)
 	else()
 		file(TO_CMAKE_PATH "${_inPath}" ${_outPathVariable})
@@ -130,8 +132,10 @@
 	# and special characters
 	# under MinGW it produces unworkable paths with forward slashes
 	if (CYGWIN)
+		find_program(Mathematica_CYGPATH_EXECUTABLE "cygpath")
+		mark_as_advanced(Mathematica_CYGPATH_EXECUTABLE)
 		execute_process(
-			COMMAND cygpath "--mixed" "${_inPath}" TIMEOUT 5
+			COMMAND "${Mathematica_CYGPATH_EXECUTABLE}" "--mixed" "${_inPath}" TIMEOUT 5
 			OUTPUT_VARIABLE ${_outPathVariable} OUTPUT_STRIP_TRAILING_WHITESPACE)
 	elseif (CMAKE_HOST_UNIX)
 		# use CMake path literally under UNIX


Force the update of Cleaver

Force the update of Cleaver

--- CMake/Superbuild/External_Cleaver.cmake
+++ CMake/Superbuild/External_Cleaver.cmake
@@ -69,7 +69,6 @@
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "git://public.kitware.com/Bender/Cleaver.git"
     GIT_TAG "09af87b1c9c07e8241c524572d2b38381bf6ce6f"
-    UPDATE_COMMAND ""
     INSTALL_COMMAND ""
     CMAKE_GENERATOR ${gen}
     CMAKE_ARGS


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 03)

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


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   05)
+SET(KWSYS_DATE_STAMP_DAY   06)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   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 02)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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 01)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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   19)
+SET(KWSYS_DATE_STAMP_DAY   20)


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   30)
+SET(KWSYS_DATE_STAMP_DAY   31)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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   22)
+SET(KWSYS_DATE_STAMP_DAY   23)


COMP: Remove warning about replacing flag W3 with W0

A warning is raised because gengetopt does not support default float value.
A truncation from double to float warning is raised when assigning the
default variable to its default value.
Only hide this exact warning to avoid overriding other flags.

--- cmake/FindGengetopt.cmake
+++ cmake/FindGengetopt.cmake
@@ -77,6 +77,8 @@
     endif()
   endif()
   if(MSVC)
-    set_source_files_properties(${${GGO_SRCS}} PROPERTIES COMPILE_FLAGS "/W0")
+    # Disable double to float truncation warning as gengetopt cannot append "f"
+    # to force default numeric float values in the .ggo config file
+    set_source_files_properties(${${GGO_SRCS}} PROPERTIES COMPILE_FLAGS "/wd4305")
   endif()
 endmacro ()


drop the  -Wno-c++11-narrowing flag for windows toolchains

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -5,18 +5,22 @@
   message("ANDROID =====================================================================")
   include(SetOpenCVCMakeArgs-android)
   set_opencv_cmake_args_android()
+  set(CMAKE_CXX_FLAGS_VAR -Wno-c++11-narrowing)
 elseif(is_ios)
   message("is_ios ======================================================================")
   include(SetOpenCVCMakeArgs-iOS)
   set_opencv_cmake_args_ios()
+  set(CMAKE_CXX_FLAGS_VAR -Wno-c++11-narrowing)
 elseif(APPLE)
   message("APPLE =======================================================================")
   include(SetOpenCVCMakeArgs-osx)
   set_opencv_cmake_args_osx()
+  set(CMAKE_CXX_FLAGS_VAR "-Wno-c++11-narrowing")
 elseif(${is_linux})
   message("is_linux =======================================================================")
   include(SetOpenCVCMakeArgs-nix)
   set_opencv_cmake_args_nix()
+  set(CMAKE_CXX_FLAGS_VAR -Wno-c++11-narrowing)
 elseif(${is_msvc})
   message("is_msvc=========================================================================")
   include(SetOpenCVCMakeArgs-windows)
@@ -26,7 +30,7 @@
 list(APPEND OPENCV_CMAKE_ARGS
   BUILD_opencv_world=ON
   BUILD_EIGEN=OFF
-  CMAKE_CXX_FLAGS=-Wno-c++11-narrowing
+  CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS_VAR}
 )

 hunter_config(OpenCV VERSION ${HUNTER_OpenCV_VERSION} CMAKE_ARGS "${OPENCV_CMAKE_ARGS}")


updating submodule linking

updating submodule linking

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -13,13 +13,14 @@

 hunter_config(
     XLink
-    VERSION "luxonis-2020.2-test_usb_info"
-    URL "https://github.com/luxonis/XLink/archive/test_usb_info.zip"
-    SHA1 "1ce5d55a3b0a0b9df85837afe5024986c857c57c"
+    VERSION "luxonis-2020.2"
+    URL  "https://github.com/luxonis/XLink/archive/test_usb_info.zip"
+    SHA1 "1af32e324a18cd0caebba7d768b1b068e24d5709"
     CMAKE_ARGS
         CMAKE_POSITION_INDEPENDENT_CODE=ON
 )

+# "https://github.com/luxonis/XLink/archive/test_usb_info.zip"
 hunter_config(
     BZip2
     VERSION "1.0.8-p0"


fix debug file renaming sheme

fix debug file renaming sheme

--- cmake/InstallMacros.cmake
+++ cmake/InstallMacros.cmake
@@ -186,6 +186,7 @@
       string(SUBSTRING ${FILE_CHECKSUM} 0 2 SUB_DIR)
       string(SUBSTRING ${FILE_CHECKSUM} 2 -1 STRIP_FILE)
       set(SUB_DEBINFO_DIR .build-id/${SUB_DIR})
+      set(STRIP_FILE "${STRIP_FILE}.debug")
     endif()
     execute_process(COMMAND ${CMAKE_OBJCOPY} --only-keep-debug ${FILE} ${STRIP_DIR}/${STRIP_FILE})
     set(FILE ${STRIP_DIR}/${STRIP_FILE})


HPB for DG. A trivial comment fix to cairo cmake file.

svn path=/trunk/; revision=10052

--- cmake/modules/cairo.cmake
+++ cmake/modules/cairo.cmake
@@ -18,7 +18,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA

 # Configuration for the cairo device driver (supporting the memcairo,
-# pdfcairo, pngcairo, pscairo, svgcairo, memcairo, and xcairo devices).
+# pdfcairo, pngcairo, pscairo, svgcairo and xcairo devices).
 #
 # The following variables are set / modified
 #


remove -Wunused-parameter

remove -Wunused-parameter

Change-Id: I9ab42191323b48a12b2d53b2abc95e754b6dfae1
Reviewed-on: http://gerrit.aldebaran.lan:8080/609
Reviewed-by: llec <42f1a1c02cacc0f5b0188f0127ea77bedfdcf21a@aldebaran-robotics.com>
Tested-by: llec <42f1a1c02cacc0f5b0188f0127ea77bedfdcf21a@aldebaran-robotics.com>
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/flags.cmake
+++ cmake/qibuild/flags.cmake
@@ -51,7 +51,7 @@
     # add_definitions("-ansi")

     # Activate warnings
-    add_definitions("-Wall -Wextra")
+    add_definitions("-Wall -Wextra -Wno-unused-parameter")

     if (ARGS_HIDDEN_SYMBOLS)
       add_definitions("-fvisibility=hidden")


Remove CMake string REPEAT (#9771)

Remove CMake string REPEAT (#9771)

According to https://cmake.org/cmake/help/latest/command/string.html#repeat this was added in 3.15, we can revert this if we ever use a minimum cmake newer than that. Until then we should just remove the alternate path to reduce complexity.

Co-authored-by: driazati <d4a88e6bfb8aaeeaf240b84a2d19cb6109e58027@users.noreply.github.com>

--- cmake/utils/Summary.cmake
+++ cmake/utils/Summary.cmake
@@ -20,15 +20,11 @@
     math(EXPR _strlen "${length} - ${_strlen}")

     if(_strlen GREATER 0)
-    if(${CMAKE_VERSION} VERSION_LESS "3.14")
         unset(_pad)
         foreach(_i RANGE 1 ${_strlen}) # inclusive
-        string(APPEND _pad ${padchar})
+            string(APPEND _pad ${padchar})
         endforeach()
-    else()
-        string(REPEAT ${padchar} ${_strlen} _pad)
-    endif()
-    string(APPEND str ${_pad})
+        string(APPEND str ${_pad})
     endif()

     set(${output} "${str}" PARENT_SCOPE)


folly:wangle: fixup libevent detection and export

Summary:
I finally got to the bottom of the weird `-levent` or `event.lib`
linker errors that crop up in the cmake builds.

The issue is that if you have installed a recent libevent it deploys
a cmake CONFIG package that exports just a bare `event` target as the
dep on libevent.  This is unfortunate because it is interpreted as
meaning `-levent` with no library path, which for an installation
of libevent that is not in the default path will result in linker
errors in libraries downstream of folly.

To resolve this, I've given the common `FindLibEvent.cmake` file
(that was derived from the folly library of the same name) a similar
treatment to the recent changes to find glog and taught it how to
locate libevent from a config package and to fall back on a basic
include/library check.

If we find an `event` target then we extract the actual library
path from it and export that.

I've removed folly's and wangle's own FindLibEvent.cmake so that it will pick
up the common library which gets shipit sync'd out to
https://github.com/facebook/folly/blob/master/CMake/FindLibEvent.cmake
and https://github.com/facebook/wangle/blob/master/build/fbcode_builder/CMake/FindLibEvent.cmake

Reviewed By: yfeldblum

Differential Revision: D14702577

fbshipit-source-id: d35d9f741e009dcd77976c0637ba3024a8a4aef3

--- build/fbcode_builder/CMake/FindLibEvent.cmake
+++ build/fbcode_builder/CMake/FindLibEvent.cmake
@@ -11,28 +11,61 @@
   list(APPEND LibEvent_LIB_PATHS "${prefix}/lib")
 endforeach()

-find_path(LIBEVENT_INCLUDE_DIR event.h PATHS ${LibEvent_INCLUDE_PATHS})
-find_library(LIBEVENT_LIB NAMES event PATHS ${LibEvent_LIB_PATHS})
+find_package(Libevent CONFIG QUIET)
+if (TARGET event)
+  # Re-export the config under our own names

-if (LIBEVENT_LIB AND LIBEVENT_INCLUDE_DIR)
-  set(LibEvent_FOUND TRUE)
-  set(LIBEVENT_LIB ${LIBEVENT_LIB})
-else ()
-  set(LibEvent_FOUND FALSE)
-endif ()
+  # Somewhat gross, but some vcpkg installed libevents have a relative
+  # `include` path exported into LIBEVENT_INCLUDE_DIRS, which triggers
+  # a cmake error because it resolves to the `include` dir within the
+  # folly repo, which is not something cmake allows to be in the
+  # INTERFACE_INCLUDE_DIRECTORIES.  Thankfully on such a system the
+  # actual include directory is already part of the global include
+  # directories, so we can just skip it.
+  if (NOT "${LIBEVENT_INCLUDE_DIRS}" STREQUAL "include")
+    set(LIBEVENT_INCLUDE_DIR ${LIBEVENT_INCLUDE_DIRS})
+  else()
+    set(LIBEVENT_INCLUDE_DIR)
+  endif()

-if (LibEvent_FOUND)
+  # Unfortunately, with a bare target name `event`, downstream consumers
+  # of the package that depends on `Libevent` located via CONFIG end
+  # up exporting just a bare `event` in their libraries.  This is problematic
+  # because this in interpreted as just `-levent` with no library path.
+  # When libevent is not installed in the default installation prefix
+  # this results in linker errors.
+  # To resolve this, we ask cmake to lookup the full path to the library
+  # and use that instead.
+  get_target_property(LIBEVENT_LIB event LOCATION)
+
+  set(LibEvent_FOUND ${Libevent_FOUND})
   if (NOT LibEvent_FIND_QUIETLY)
-    message(STATUS "Found libevent: ${LIBEVENT_LIB}")
+    message(STATUS "Found libevent from package config include=${LIBEVENT_INCLUDE_DIRS} lib=${LIBEVENT_LIB}")
+  endif()
+else()
+  find_path(LIBEVENT_INCLUDE_DIR event.h PATHS ${LibEvent_INCLUDE_PATHS})
+  find_library(LIBEVENT_LIB NAMES event PATHS ${LibEvent_LIB_PATHS})
+
+  if (LIBEVENT_LIB AND LIBEVENT_INCLUDE_DIR)
+    set(LibEvent_FOUND TRUE)
+    set(LIBEVENT_LIB ${LIBEVENT_LIB})
+  else ()
+    set(LibEvent_FOUND FALSE)
   endif ()
-else ()
-  if (LibEvent_FIND_REQUIRED)
-    message(FATAL_ERROR "Could NOT find libevent.")
+
+  if (LibEvent_FOUND)
+    if (NOT LibEvent_FIND_QUIETLY)
+      message(STATUS "Found libevent: ${LIBEVENT_LIB}")
+    endif ()
+  else ()
+    if (LibEvent_FIND_REQUIRED)
+      message(FATAL_ERROR "Could NOT find libevent.")
+    endif ()
+    message(STATUS "libevent NOT found.")
   endif ()
-  message(STATUS "libevent NOT found.")
-endif ()

-mark_as_advanced(
+  mark_as_advanced(
     LIBEVENT_LIB
     LIBEVENT_INCLUDE_DIR
   )
+endif()


Submodule Sync

Submodule Sync

--- modules/Catch2.cmake
+++ modules/Catch2.cmake
@@ -1,5 +1,6 @@
 if(NOT Catch2)

+  # Module definition
   set(Catch2 "${CMAKE_CURRENT_SOURCE_DIR}/Catch2/single_include" PARENT_SCOPE)

 endif()


CMake: added msvc flags to deactivate warnings. The warnings which are disabled by this were mostly unnecessary.

--- CMake/GlobalCompilerFlags.cmake
+++ CMake/GlobalCompilerFlags.cmake
@@ -27,7 +27,7 @@
     ### Message
     MESSAGE( STATUS ">> Chose compiler:                MSVC" )
     ### Compiler Flags
-    set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOMINMAX" )
+    set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOMINMAX /wd4018 /wd4244 /wd4267 /wd4661 /wd4996" )
 ######################################################################

 ######## Intel Compiler - icc ########################################


[OGRE-378] Unable to build when using MinGW without samples.

--HG--
branch : v1-9

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -113,10 +113,20 @@
 	  endif ()

 	  if (MINGW)
-      install(FILES ${OIS_LIBRARY_DBG} DESTINATION lib/debug CONFIGURATIONS Debug)
-      install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
-      install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/release CONFIGURATIONS Release)
-      install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
+		if (EXISTS ${OIS_LIBRARY_DBG})
+			install(FILES ${OIS_LIBRARY_DBG} DESTINATION lib/debug CONFIGURATIONS Debug)
+		else()
+			install(FILES DESTINATION lib/debug CONFIGURATIONS Debug)
+		endif ()
+		if (EXISTS ${OIS_LIBRARY_REL})
+			install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
+			install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/release CONFIGURATIONS Release)
+			install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
+		else()
+			install(FILES DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
+			install(FILES DESTINATION lib/release CONFIGURATIONS Release)
+			install(FILES DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
+		endif ()
 	  endif () # MINGW
 	endif () # WIN32
 endif () # OGRE_INSTALL_DEPENDENCIES


Fix install of dependencies (including Boost) into sdk area on OS X

--HG--
branch : v1-7
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/branches/v1-7%401840

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -10,20 +10,9 @@
 #####################################################
 # Install dependencies
 #####################################################
-
-if (UNIX)
+if ((NOT APPLE) AND (NOT WIN32))
   return()
 endif()
-
-# determine if we have a common dependencies folder to install from.
-# this is not a fool-proof test, but it should be good enough.
-get_filename_component(OGRE_DEP1_DIR ${FREETYPE_INCLUDE_DIR}/../ ABSOLUTE)
-get_filename_component(OGRE_DEP2_DIR ${ZLIB_INCLUDE_DIR}/../ ABSOLUTE)
-if (OGRE_DEP1_DIR STREQUAL OGRE_DEP2_DIR)
-  set(OGRE_DEP_DIR ${OGRE_DEP1_DIR})
-else ()
-  return()
-endif ()

 option(OGRE_INSTALL_DEPENDENCIES "Install dependency libs needed for samples" TRUE)
 option(OGRE_COPY_DEPENDENCIES "Copy dependency libs to the build directory" TRUE)


CMake: Fix setting improperly DESKTOP variable on non-desktop platforms.

--- CMake/Modules/UrhoOptions.cmake
+++ CMake/Modules/UrhoOptions.cmake
@@ -52,7 +52,7 @@
     set (MACOS ON)
 endif ()

-if (WIN32 OR LINUX OR MACOS AND NOT WEB)
+if ((WIN32 OR LINUX OR MACOS) AND NOT WEB AND NOT MOBILE)
     set (DESKTOP ON)
 endif ()


understand HCC as a backend (does not compile)

--- CMake/hoomd/HOOMDHIPSetup.cmake
+++ CMake/hoomd/HOOMDHIPSetup.cmake
@@ -11,6 +11,20 @@
     EXECUTE_PROCESS(COMMAND ${HIP_HIPCC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/hoomd/test.cc OUTPUT_VARIABLE _hipcc_verbose_out)

     string(REPLACE " " ";" _hipcc_verbose_options ${_hipcc_verbose_out})
+
+    # get the compiler executable for device code
+    LIST(GET _hipcc_verbose_options 1 _hip_compiler)
+
+    # set it as the compiler
+    if (${_hip_compiler} MATCHES nvcc)
+        set(HIP_PLATFORM nvcc)
+    elseif(${_hip_compiler} MATCHES hcc)
+        set(HIP_PLATFORM hcc)
+    else()
+        message(ERROR "Unknown HIP backend " ${_hip_compiler})
+    endif()
+
+    SET(CMAKE_CUDA_COMPILER ${_hip_compiler})

     # drop the compiler exeuctable and the "hipcc-cmd"
     LIST(REMOVE_AT _hipcc_verbose_options 0 1)
@@ -47,10 +61,10 @@
         target_compile_definitions(HIP::hip INTERFACE $<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:HIP_VERSION_PATCH=${HIP_VERSION_PATCH}>)

         # branch upon HCC or NVCC target
-        if(ENABLE_CUDA)
-        target_compile_definitions(HIP::hip INTERFACE $<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:__HIP_PLATFORM_NVCC__>)
-        # elif(ENABLE_HCC)
-        # .. similar code for AMD here
+        if(${HIP_PLATFORM} STREQUAL "nvcc")
+            target_compile_definitions(HIP::hip INTERFACE $<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:__HIP_PLATFORM_NVCC__>)
+        elseif(${HIP_PLATFORM} STREQUAL "hcc")
+            target_compile_definitions(HIP::hip INTERFACE $<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:__HIP_PLATFORM_HCC__>)
         endif()
     endif()


[cmake] removed unusefull part of FindBinaryen.cmake

--- CMakeModules/FindBinaryen.cmake
+++ CMakeModules/FindBinaryen.cmake
@@ -1,18 +1,13 @@
 # - Try to find BINARYEN
 # Once done this will define
 #  BINARYEN_FOUND - System has BINARYEN
-#  BINARYEN_INCLUDE_DIRS - The BINARYEN include directories
-#  BINARYEN_LIBRARIES - The libraries needed to use BINARYEN
-#  BINARYEN_DEFINITIONS - Compiler switches required for using BINARYEN

 find_program(BINARYEN_BIN s2wasm HINTS ${BINARYEN_ROOT}/bin)
-find_path(BINARYEN_INCLUDE_DIRS binaryen-c.h HINTS ${BINARYEN_ROOT}/include)
-find_library(BINARYEN_LIBRARIES binaryen HINTS ${BINARYEN_ROOT}/lib)

 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set BINARYEN_FOUND to TRUE
 # if all listed variables are TRUE

-find_package_handle_standard_args(BINARYEN DEFAULT_MSG BINARYEN_BIN BINARYEN_INCLUDE_DIRS BINARYEN_LIBRARIES)
+find_package_handle_standard_args(BINARYEN DEFAULT_MSG BINARYEN_BIN)

 mark_as_advanced(BINARYEN_BIN BINARYEN_INCLUDE_DIRS BINARYEN_LIBRARIES)


maybe fix implibrary for win32

maybe fix implibrary for win32

--- CMakeModules/build_clBLAS.cmake
+++ CMakeModules/build_clBLAS.cmake
@@ -1,4 +1,10 @@
 INCLUDE(ExternalProject)
+
+if(WIN32)
+	set(CLBLAS_CLEW_LIB ${CMAKE_INSTALL_PREFIX}/lib/clew.lib)
+else()
+	set(CLBLAS_CLEW_LIB ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}clew${CMAKE_SHARED_LIBRARY_SUFFIX})
+endif()

 message("CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}")
 ExternalProject_Add(
@@ -12,7 +18,7 @@
     -DBUILD_CLIENT:BOOL=OFF
     -DBUILD_TEST:BOOL=OFF
     -DOPENCL_INCLUDE_DIRS:STRING=${CMAKE_CURRENT_SOURCE_DIR}/EasyCL/thirdparty/clew/include;${CMAKE_CURRENT_SOURCE_DIR}/EasyCL/thirdparty/clew/include/proxy-opencl
-	-DOPENCL_LIBRARIES:STRING=${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}clew${CMAKE_SHARED_LIBRARY_SUFFIX}
+	-DOPENCL_LIBRARIES:STRING=${CLBLAS_CLEW_LIB}
     -DBUILD_KTEST:BOOL=OFF
     -DSUFFIX_LIB:STRING=
     -DCORR_TEST_WITH_ACML:BOOL=OFF


SuperBuild: configure and build in same directory for autconf

--- SuperBuild/CMake/External_geotiff.cmake
+++ SuperBuild/CMake/External_geotiff.cmake
@@ -35,7 +35,7 @@
       URL "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-1.4.1.tar.gz"
       URL_MD5 48bdf817e6e7a37671cc1f41b01e10fc
       SOURCE_DIR ${GEOTIFF_SB_SRC}
-      BINARY_DIR ${GEOTIFF_SB_BUILD_DIR}
+      BINARY_DIR ${GEOTIFF_SB_SRC}
       INSTALL_DIR ${SB_INSTALL_PREFIX}
       DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
       DEPENDS ${GEOTIFF_DEPENDENCIES}


No comment.

No comment.

--- msvc/Custom-vs.cmake
+++ msvc/Custom-vs.cmake
@@ -11,7 +11,7 @@
 # find_package(VSTSDK2X)

 set(CMAKE_VERBOSE_MAKEFILE ON)
-set(Eigen3_DIR "D:\\msys64\\home\\restore\\vcpkg\\packages\\eigen3_x64-windows\\share\\eigen3")
+# set(Eigen3_DIR "D:\\msys64\\home\\restore\\vcpkg\\packages\\eigen3_x64-windows\\share\\eigen3")
 find_package (Eigen3 3.3 REQUIRED NO_MODULE)

 # Csound build options for MSVC


Error out if user requests compute 1x build

refs #84

--- CMake/hoomd/HOOMDCUDASetup.cmake
+++ CMake/hoomd/HOOMDCUDASetup.cmake
@@ -7,9 +7,9 @@
 	# the package is needed
 	find_package(CUDA REQUIRED REQUIRED)

-	if (${CUDA_VERSION} VERSION_LESS 4.0)
-		message(SEND_ERROR "CUDA 3.2 and older are not supported")
-	endif (${CUDA_VERSION} VERSION_LESS 4.0)
+	if (${CUDA_VERSION} VERSION_LESS 5.0)
+		message(SEND_ERROR "CUDA 5.0 or newer is required")
+	endif (${CUDA_VERSION} VERSION_LESS 5.0)

     # Find Thrust
     find_package(Thrust)
@@ -52,12 +52,8 @@
     # setup nvcc to build for all CUDA architectures. Allow user to modify the list if desired
     if (CUDA_VERSION VERSION_GREATER 5.99)
         set(CUDA_ARCH_LIST 20 30 35 50 CACHE STRING "List of target sm_ architectures to compile CUDA code for. Separate with semicolons.")
-    elseif (CUDA_VERSION VERSION_GREATER 4.99)
+    else (CUDA_VERSION VERSION_GREATER 4.99)
         set(CUDA_ARCH_LIST 20 30 35 CACHE STRING "List of target sm_ architectures to compile CUDA code for. Separate with semicolons.")
-    elseif (CUDA_VERSION VERSION_GREATER 4.1)
-        set(CUDA_ARCH_LIST 20 30 CACHE STRING "List of target sm_ architectures to compile CUDA code for. Separate with semicolons.")
-    else()
-        set(CUDA_ARCH_LIST 20 CACHE STRING "List of target sm_ architectures to compile CUDA code for. Separate with semicolons.")
     endif()

     foreach(_cuda_arch ${CUDA_ARCH_LIST})
@@ -69,6 +65,10 @@
     list(SORT _cuda_arch_list_sorted)
     list(GET _cuda_arch_list_sorted 0 _cuda_min_arch)
     add_definitions(-DCUDA_ARCH=${_cuda_min_arch})
+
+    if (_cuda_min_arch LESS 20)
+        message(SEND_ERROR "SM1x builds are not supported")
+    endif ()

     # only generage ptx code for the maximum supported CUDA_ARCH (saves on file size)
     list(REVERSE _cuda_arch_list_sorted)


remove trace

remove trace

--- cmake/FindCUTI.cmake
+++ cmake/FindCUTI.cmake
@@ -39,9 +39,6 @@

 string(COMPARE EQUAL "${CUTI_FRONT_END}" "CUTI" USE_CUTI_FRONT_END)
 string(COMPARE EQUAL "${CUTI_BACK_END}" "CUTI" USE_CUTI_BACK_END)
-
-message(STATUS ${USE_CUTI_FRONT_END} )
-message(STATUS ${USE_CUTI_BACK_END} )

 set(CUTI_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
 set(CUTI_INCLUDE_DIRS ${CUTI_ROOT_DIR}/include)


cmake: put elf files for Qemu in /zephyr

The ELF files were placed in ${CMAKE_BINARY_DIR} when all other ELF
files are actually in ${CMAKE_BINARY_DIR}/zephyr, so keep things
consistent and in one place.

Signed-off-by: Anas Nashif <0d9952ec84ac43c159f6b7e7ed99a9080c00dd6e@intel.com>

--- cmake/emu/qemu.cmake
+++ cmake/emu/qemu.cmake
@@ -244,7 +244,7 @@
     ${CMAKE_OBJCOPY}
     -O elf32-i386
     $<TARGET_FILE:${logical_target_for_zephyr_elf}>
-    ${CMAKE_BINARY_DIR}/zephyr-qemu.elf
+    ${ZEPHYR_BINARY_DIR}/zephyr-qemu.elf
     DEPENDS ${logical_target_for_zephyr_elf}
     )

@@ -257,8 +257,8 @@
     COMMAND
     ${CMAKE_OBJCOPY}
     -j .locore
-    ${CMAKE_BINARY_DIR}/zephyr-qemu.elf
-    ${CMAKE_BINARY_DIR}/zephyr-qemu-locore.elf
+    ${ZEPHYR_BINARY_DIR}/zephyr-qemu.elf
+    ${ZEPHYR_BINARY_DIR}/zephyr-qemu-locore.elf
     2>&1 | grep -iv \"empty loadable segment detected\" || true
     DEPENDS qemu_image_target
     )
@@ -267,8 +267,8 @@
     COMMAND
     ${CMAKE_OBJCOPY}
     -R .locore
-    ${CMAKE_BINARY_DIR}/zephyr-qemu.elf
-    ${CMAKE_BINARY_DIR}/zephyr-qemu-main.elf
+    ${ZEPHYR_BINARY_DIR}/zephyr-qemu.elf
+    ${ZEPHYR_BINARY_DIR}/zephyr-qemu-main.elf
     2>&1 | grep -iv \"empty loadable segment detected\" || true
     DEPENDS qemu_image_target
     )
@@ -278,10 +278,10 @@
     DEPENDS qemu_locore_image_target qemu_main_image_target
     )

-  set(QEMU_KERNEL_FILE "${CMAKE_BINARY_DIR}/zephyr-qemu-locore.elf")
+  set(QEMU_KERNEL_FILE "${ZEPHYR_BINARY_DIR}/zephyr-qemu-locore.elf")

   list(APPEND QEMU_EXTRA_FLAGS
-    "-device;loader,file=${CMAKE_BINARY_DIR}/zephyr-qemu-main.elf"
+    "-device;loader,file=${ZEPHYR_BINARY_DIR}/zephyr-qemu-main.elf"
     )
 endif()


start 3.2.0

start 3.2.0

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -3,7 +3,7 @@
 # See the FindMathematica manual for usage hints.
 #
 #=============================================================================
-# Copyright 2010-2015 Sascha Kratky
+# Copyright 2010-2016 Sascha Kratky
 #
 # Permission is hereby granted, free of charge, to any person)
 # obtaining a copy of this software and associated documentation)
@@ -34,7 +34,7 @@
 cmake_policy(POP)

 set (Mathematica_CMAKE_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}")
-set (Mathematica_CMAKE_MODULE_VERSION "3.1.4")
+set (Mathematica_CMAKE_MODULE_VERSION "3.2.0")

 # activate select policies
 if (POLICY CMP0025)


Fix android toolchain error

Fix android toolchain error

--HG--
branch : v1-9

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -521,7 +521,7 @@
 #verify that target ABI is supported
 list( FIND ANDROID_SUPPORTED_ABIS "${ANDROID_ABI}" __androidAbiIdx )
 if( __androidAbiIdx EQUAL -1 )
- string( REPLACE ";" "\", \"", PRINTABLE_ANDROID_SUPPORTED_ABIS  "${ANDROID_SUPPORTED_ABIS}" )
+ string( REPLACE ";" "\", \"" PRINTABLE_ANDROID_SUPPORTED_ABIS  "${ANDROID_SUPPORTED_ABIS}" )
  message( FATAL_ERROR "Specified ANDROID_ABI = \"${ANDROID_ABI}\" is not supported by this cmake toolchain or your NDK/toolchain.
    Supported values are: \"${PRINTABLE_ANDROID_SUPPORTED_ABIS}\"
    " )


Version.cmake update

Version.cmake update

--- src/Version.cmake
+++ src/Version.cmake
@@ -2,4 +2,4 @@
 # Boilerplate package Version.cmake file for BootsOnTheGround PACKAGE.
 # (NOTE: This version number is loaded by the package and the project.)
 #
-SET( VERSION "0.6.0" )
+SET( VERSION "0.7.0" )


CastXML 0.3.0

CastXML 0.3.0

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
-set(CastXML_VERSION_MINOR 2)
-set(CastXML_VERSION_PATCH 20200213)
+set(CastXML_VERSION_MINOR 3)
+set(CastXML_VERSION_PATCH 0)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)


CastXML 0.4.3

CastXML 0.4.3

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 4)
-set(CastXML_VERSION_PATCH 2)
+set(CastXML_VERSION_PATCH 3)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)