Perl is necessary for the octave interface build.
Determine MATWRAP_PATH.

svn path=/trunk/; revision=7063

--- cmake/modules/octave.cmake
+++ cmake/modules/octave.cmake
@@ -28,6 +28,12 @@
   set(ENABLE_octave OFF CACHE BOOL "Enable Octave bindings" FORCE)
 endif(ENABLE_octave AND NOT BUILD_SHARED_LIBS)

+if(ENABLE_octave AND NOT PERL_FOUND)
+  message(STATUS "WARNING: "
+    "The octave build requires perl. Disabling octave bindings")
+  set(ENABLE_octave OFF CACHE BOOL "Enable Octave bindings" FORCE)
+endif(ENABLE_octave AND NOT PERL_FOUND)
+
 if(ENABLE_octave)
   find_program(OCTAVE octave)
   if(OCTAVE)
@@ -51,13 +57,14 @@
 endif(ENABLE_octave)

 if(ENABLE_octave)
-  if (PERL_FOUND)
-    check_perl_modules(PERL_XML_PARSER XML::Parser)
-    check_perl_modules(PERL_XML_DOM XML::DOM)
-  endif (PERL_FOUND)
+  check_perl_modules(PERL_XML_PARSER XML::Parser)
+  check_perl_modules(PERL_XML_DOM XML::DOM)
   #MATWRAP is the path+filename of the matwrap script.
   set(MATWRAP "${CMAKE_CURRENT_SOURCE_DIR}/bindings/octave/matwrap/matwrap")
   message(STATUS "MATWRAP = ${MATWRAP}")
+  #MATWRAP_PATH is the path of the matwrap script
+  get_filename_component(MATWRAP_PATH ${MATWRAP} PATH)
+  message(STATUS "MATWRAP_PATH = ${MATWRAP_PATH}")

   #OCTAVE_VERSION is the (dotted triplet) octave version.
   execute_process(


build: execute inner cmake for sysdig deps

Co-authored-by: Lorenzo Fontana <638e8f0171575864326f06d2a5f8e72287427b15@linux.com>
Signed-off-by: Leonardo Di Donato <2012e0ca99d70aa6c893822ff73002216e5dba72@gmail.com>

--- cmake/modules/sysdig.cmake
+++ cmake/modules/sysdig.cmake
@@ -11,59 +11,66 @@
 # specific language governing permissions and limitations under the License.
 #

-# The sysdig git reference (branch name, commit hash, or tag) set(SYSDIG_VERSION
-# "falco/${FALCO_VERSION_MAJOR}.${FALCO_VERSION_MINOR}.${FALCO_VERSION_PATCH}") # todo(leodido, fntlnz) > use this when
-# FALCO_VERSION variable is ok (PR 872)
-# get_cmake_property(_variableNames VARIABLES)
-# list (SORT _variableNames)
-# foreach (_variableName ${_variableNames})
-#     message(STATUS "${_variableName}=${${_variableName}}")
-# endforeach()

-if(NOT SYSDIG_VERSION)
-  set(SYSDIG_VERSION "dev")
-endif()
+set(SYSDIG_WORKING_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/sysdig-repo")
+set(SYSDIG_REPO_DIR "${CMAKE_BINARY_DIR}/sysdig-repo")
+# execute_process(COMMAND cmake -E make_directory ${SYSDIG_REPO_DIR})
+execute_process(COMMAND "${CMAKE_COMMAND}" -B ${SYSDIG_REPO_DIR} WORKING_DIRECTORY "${SYSDIG_WORKING_DIR}")
+execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${SYSDIG_REPO_DIR}")
+set(SYSDIG_SOURCE_DIR "${SYSDIG_REPO_DIR}/sysdig-prefix/src/sysdig")

-ExternalProject_Add(
-  sysdig
-  GIT_REPOSITORY https://github.com/draios/sysdig.git
-  GIT_TAG ${SYSDIG_VERSION}
-  CONFIGURE_COMMAND ""
-  BUILD_COMMAND ""
-  INSTALL_COMMAND ""
-  TEST_COMMAND "")
+# if(NOT SYSDIG_VERSION)
+#   set(SYSDIG_VERSION "dev")
+# endif()

-# Fetch the sysdig source directory
-ExternalProject_Get_Property(sysdig SOURCE_DIR)
-set(SYSDIG_SOURCE_DIR "${SOURCE_DIR}")
-unset(SOURCE_DIR)
-message(STATUS "Source directory of sysdig: ${SYSDIG_SOURCE_DIR}")
-message(STATUS "Sysdig version: ${SYSDIG_VERSION}")
+# ExternalProject_Add(
+#   sysdig
+#   GIT_REPOSITORY https://github.com/draios/sysdig.git
+#   GIT_TAG ${SYSDIG_VERSION}
+#   CONFIGURE_COMMAND ""
+#   BUILD_COMMAND ""
+#   INSTALL_COMMAND ""
+#   TEST_COMMAND "")

+# # Fetch the sysdig source directory
+# ExternalProject_Get_Property(sysdig SOURCE_DIR)
+# set(SYSDIG_SOURCE_DIR "${SOURCE_DIR}")
+# unset(SOURCE_DIR)
+# message(STATUS "Source directory of sysdig: ${SYSDIG_SOURCE_DIR}")
+# message(STATUS "Sysdig version: ${SYSDIG_VERSION}")

-ExternalProject_Add(
-  libsinsp
-  DEPENDS sysdig
-  DOWNLOAD_COMMAND ""
-  SOURCE_DIR "${SYSDIG_SOURCE_DIR}/userspace/libsinsp"
-  # CMAKE_ARGS "-DB64_INCLUDE=${B64_INCLUDE} -DCURSES_INCLUDE_DIR=${CURSES_INCLUDE_DIR} -DGRPC_INCLUDE=${GRPC_INCLUDE} -DJQ_INCLUDE=${JQ_INCLUDE} -DOPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} -DPROTOBUF_INCLUDE=${PROTOBUF_INCLUDE}"
-  CMAKE_ARGS -DPROTOBUF_INCLUDE=${PROTOBUF_INCLUDE} -DB64_INCLUDE=${B64_INCLUDE} -DJSONCPP_INCLUDE=${JSONCPP_INCLUDE} -DLUAJIT_INCLUDE=${LUAJIT_INCLUDE} -DTBB_INCLUDE_DIR=${TBB_INCLUDE_DIR} -DCURSES_INCLUDE_DIR=${CURSES_INCLUDE_DIR} -DGRPC_INCLUDE=${GRPC_INCLUDE} -DJQ_INCLUDE=${JQ_INCLUDE} -DOPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} -DCURL_INCLUDE_DIR=${CURL_INCLUDE_DIR} -DCURL_LIBRARIES=${CURL_LIBRARIES} -DJSONCPP_LIB=${JSONCPP_LIB} -DTBB_LIB=${TBB_LIB} -DUSE_BUNDLED_LUAJIT=OFF -DUSE_BUNDLED_OPENSSL=OFF -DUSE_BUNDLED_CURL=OFF -DUSE_BUNDLED_TBB=OFF -DUSE_BUNDLED_GRPC=OFF -DGRPC_CPP_PLUGIN=${GRPC_CPP_PLUGIN} -DPROTOC=${PROTOC} -DOPENSSL_LIBRARIES=${OPENSSL_LIBRARIES} -DLUAJIT_LIB=${LUAJIT_LIB}
-)
+# set(LIBSCAP_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set(LIBSCAP_C_FLAGS "${CMAKE_C_FLAGS}")
+
+# ExternalProject_Add( libscap DOWNLOAD_COMMAND "" INSTALL_COMMAND "" SOURCE_DIR
+# "${SYSDIG_SOURCE_DIR}/userspace/libscap" CMAKE_ARGS -DCMAKE_CXX_FLAGS=${LIBSCAP_CXX_FLAGS}
+# -DCMAKE_C_FLAGS=${LIBSCAP_C_FLAGS} -DZLIB_INCLUDE=${ZLIB_INCLUDE} -DZLIB_LIB=${ZLIB_LIB} -DBUILD_LIBSCAP_EXAMPLES=OFF
+# -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} ) target_compile_options(libscap -DPLATFORM_NAME="${CMAKE_SYSTEM_NAME}")
+
+# set(LIBSINPS_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_CAPTURE") set(LIBSINPS_C_FLAGS "${CMAKE_C_FLAGS}")
+
+# ExternalProject_Add( libsinsp DEPENDS sysdig DOWNLOAD_COMMAND "" INSTALL_COMMAND "" SOURCE_DIR
+# "${SYSDIG_SOURCE_DIR}/userspace/libsinsp" CMAKE_ARGS -DCMAKE_CXX_FLAGS=${LIBSINPS_CXX_FLAGS}
+# -DCMAKE_C_FLAGS=${LIBSINPS_C_FLAGS} -DPROTOBUF_INCLUDE=${PROTOBUF_INCLUDE} -DB64_INCLUDE=${B64_INCLUDE}
+# -DJSONCPP_INCLUDE=${JSONCPP_INCLUDE} -DLUAJIT_INCLUDE=${LUAJIT_INCLUDE} -DTBB_INCLUDE_DIR=${TBB_INCLUDE_DIR}
+# -DCURSES_INCLUDE_DIR=${CURSES_INCLUDE_DIR} -DGRPC_INCLUDE=${GRPC_INCLUDE} -DJQ_INCLUDE=${JQ_INCLUDE}
+# -DOPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} -DCURL_INCLUDE_DIR=${CURL_INCLUDE_DIR} -DCURL_LIBRARIES=${CURL_LIBRARIES}
+# -DJSONCPP_LIB=${JSONCPP_LIB} -DTBB_LIB=${TBB_LIB} -DUSE_BUNDLED_LUAJIT=OFF -DUSE_BUNDLED_OPENSSL=OFF
+# -DUSE_BUNDLED_CURL=OFF -DUSE_BUNDLED_TBB=OFF -DUSE_BUNDLED_GRPC=OFF -DGRPC_CPP_PLUGIN=${GRPC_CPP_PLUGIN}
+# -DPROTOC=${PROTOC} -DOPENSSL_LIBRARIES=${OPENSSL_LIBRARIES} -DLUAJIT_LIB=${LUAJIT_LIB} )

 # list(APPEND CMAKE_MODULE_PATH "${SYSDIG_SOURCE_DIR}/cmake/modules")
 #

+# jsoncpp
+set(JSONCPP_SRC "${SYSDIG_SOURCE_DIR}/userspace/libsinsp/third-party/jsoncpp")
+set(JSONCPP_INCLUDE "${JSONCPP_SRC}")
+set(JSONCPP_LIB_SRC "${JSONCPP_SRC}/jsoncpp.cpp")

-# # jsoncpp
-# set(JSONCPP_SRC "${SYSDIG_SOURCE_DIR}/userspace/libsinsp/third-party/jsoncpp")
-# set(JSONCPP_INCLUDE "${JSONCPP_SRC}")
-# set(JSONCPP_LIB_SRC "${JSONCPP_SRC}/jsoncpp.cpp")
+# Add driver directory
+add_subdirectory("${SYSDIG_SOURCE_DIR}/driver" "${PROJECT_BINARY_DIR}/driver")

-# # Add driver directory
-# add_subdirectory("${SYSDIG_SOURCE_DIR}/driver" "${PROJECT_BINARY_DIR}/driver")
+# Add libscap directory
+add_subdirectory("${SYSDIG_SOURCE_DIR}/userspace/libscap" "${PROJECT_BINARY_DIR}/userspace/libscap")

-# # Add libscap directory
-# add_subdirectory("${SYSDIG_SOURCE_DIR}/userspace/libscap" "${PROJECT_BINARY_DIR}/userspace/libscap")
-
-# # Add libsinsp directory
-# add_subdirectory("${SYSDIG_SOURCE_DIR}/userspace/libsinsp" "${PROJECT_BINARY_DIR}/userspace/libsinsp")
+# Add libsinsp directory
+add_subdirectory("${SYSDIG_SOURCE_DIR}/userspace/libsinsp" "${PROJECT_BINARY_DIR}/userspace/libsinsp")


Use the proper status on the error message

--- cmake/snippets/flags.cmake
+++ cmake/snippets/flags.cmake
@@ -68,7 +68,7 @@
     if (gcc_version VERSION_GREATER "4.7.0" AND
         gcc_version VERSION_LESS "4.7.2")
       if (VISTK_ENABLE_CXX11)
-        message(ERROR
+        message(SEND_ERROR
           "C++11 ABI is broken with GCC 4.7.0 and 4.7.1."
           "Refusing to enable C++11 support.")
       endif ()


Bugfixes for MPI detection

Bugfixes for MPI detection

--- cmakemodules/FindMPI.cmake
+++ cmakemodules/FindMPI.cmake
@@ -184,8 +184,11 @@
 # (Windows implementations) do not have compiler wrappers, so this approach must be used.
 #
 function (interrogate_mpi_compiler lang try_libs)
-  # if it's already in the cache, don't bother with any of this stuff
-  if ((NOT MPI_${lang}_NO_INTERROGATE) AND (NOT (MPI_${lang}_INCLUDE_PATH) AND MPI_${lang}_LIBRARIES))
+  # if MPI is already in the cache, or if MPI_${lang}_NO_INTERROGATE is set, don't bother with any of this.
+  # MPI_${lang}_NO_INTERROGATE is set when the *regular* compiler is the MPI compiler and we should not
+  # interrogate it.  This happens on machines like the Cray XE6 with modules.  cc, CC, and ftn there are
+  # all MPI compilers, but it's not possible to interrogate them, so we skip this if we've found them.
+  if ((NOT MPI_${lang}_NO_INTERROGATE) AND ((NOT MPI_${lang}_INCLUDE_PATH) OR (NOT MPI_${lang}_LIBRARIES)))
     if (MPI_${lang}_COMPILER)
       # Check whether the -showme:compile option works. This indicates that we have either OpenMPI
       # or a newer version of LAM-MPI, and implies that -showme:link will also work.
@@ -552,9 +555,11 @@
     endif()

     if (regular_compiler_worked)
+      message("here")
       find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_COMPILER)
     else()
-      find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${LANG}_LIBRARIES MPI_${lang}_INCLUDE_PATH)
+      message("here")
+      find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_LIBRARIES MPI_${lang}_INCLUDE_PATH)
     endif()
   endif()
 endforeach()


headers are now in devel group, embree library are in lib group, and xeon phi library in lib_xeonphi group

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -106,8 +106,8 @@
 CONFIGURE_FILE(common/cmake/embree-config-version.cmake embree-config-version.cmake @ONLY)

 IF (ENABLE_INSTALLER)
-  INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config.cmake" DESTINATION "lib/cmake/embree-${EMBREE_VERSION}" COMPONENT libraries)
-  INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config-version.cmake" DESTINATION "lib/cmake/embree-${EMBREE_VERSION}" COMPONENT libraries)
+  INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config.cmake" DESTINATION "lib/cmake/embree-${EMBREE_VERSION}" COMPONENT headers)
+  INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config-version.cmake" DESTINATION "lib/cmake/embree-${EMBREE_VERSION}" COMPONENT headers)
 ENDIF()

 ##############################################################
@@ -142,12 +142,25 @@
 SET(CPACK_COMPONENT_UTILITIES_DESCRIPTION "Tools to benchmark, test and debug Embree.")

 # devel install group
-SET(CPACK_COMPONENT_LIBRARIES_GROUP devel)
 SET(CPACK_COMPONENT_HEADERS_GROUP devel)
-SET(CPACK_COMPONENT_DOCUMENTATION_GROUP devel)
 SET(CPACK_COMPONENT_GROUP_DEVEL_DISPLAY_NAME "Development")
 SET(CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION "Files needed to develop applications based on Embree.")
 SET(CPACK_COMPONENT_DEVEL_DESCRIPTION ${CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION})
+
+# lib install group
+SET(CPACK_COMPONENT_LIBRARIES_GROUP lib)
+SET(CPACK_COMPONENT_DOCUMENTATION_GROUP lib)
+SET(CPACK_COMPONENT_GROUP_DEVEL_DISPLAY_NAME "Library")
+SET(CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION "Embree Library files.")
+SET(CPACK_COMPONENT_DEVEL_DESCRIPTION ${CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION})
+
+# xeon phi library install groups
+SET(CPACK_COMPONENT_LIBRARIES_XEONPHI_GROUP lib_xeonphi)
+SET(CPACK_COMPONENT_TUTORIALS_XEONPHI_GROUP examples_xeonphi)
+SET(CPACK_COMPONENT_UTILITIES_XEONPHI_GROUP examples_xeonphi)
+SET(XEONPHI_DESCRIPTION "For The Intel Xeon Phi coprocessor." )
+SET(CPACK_COMPONENT_LIB_XEONPHI_DESCRIPTION "${CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION}\n${XEONPHI_DESCRIPTION}")
+SET(CPACK_COMPONENT_EXAMPLES_XEONPHI_DESCRIPTION "${CPACK_COMPONENT_GROUP_EXAMPLES_DESCRIPTION}\n${XEONPHI_DESCRIPTION}")

 # example install group
 SET(CPACK_COMPONENT_TUTORIALS_GROUP examples)
@@ -155,14 +168,6 @@
 SET(CPACK_COMPONENT_GROUP_EXAMPLES_DISPLAY_NAME "Examples")
 SET(CPACK_COMPONENT_GROUP_EXAMPLES_DESCRIPTION "Example tutorials and tools for Embree.")
 SET(CPACK_COMPONENT_EXAMPLES_DESCRIPTION ${CPACK_COMPONENT_GROUP_EXAMPLES_DESCRIPTION})
-
-# xeon phi install groups
-SET(CPACK_COMPONENT_LIBRARIES_XEONPHI_GROUP devel_xeonphi)
-SET(CPACK_COMPONENT_TUTORIALS_XEONPHI_GROUP examples_xeonphi)
-SET(CPACK_COMPONENT_UTILITIES_XEONPHI_GROUP examples_xeonphi)
-SET(XEONPHI_DESCRIPTION "For The Intel Xeon Phi coprocessor." )
-SET(CPACK_COMPONENT_DEVEL_XEONPHI_DESCRIPTION "${CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION}\n${XEONPHI_DESCRIPTION}")
-SET(CPACK_COMPONENT_EXAMPLES_XEONPHI_DESCRIPTION "${CPACK_COMPONENT_GROUP_EXAMPLES_DESCRIPTION}\n${XEONPHI_DESCRIPTION}")

 # dependencies between components
 SET(CPACK_COMPONENT_TUTORIALS_DEPENDS libraries)
@@ -241,10 +246,10 @@
     SET(CPACK_RPM_PACKAGE_URL http://embree.github.io/)

     # post install and uninstall scripts
-    SET(CPACK_RPM_devel_POST_INSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
-    SET(CPACK_RPM_devel_POST_UNINSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
-    SET(CPACK_RPM_devel_xeonphi_POST_INSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
-    SET(CPACK_RPM_devel_xeonphi_POST_UNINSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
+    SET(CPACK_RPM_lib_POST_INSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
+    SET(CPACK_RPM_lib_POST_UNINSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
+    SET(CPACK_RPM_lib_xeonphi_POST_INSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
+    SET(CPACK_RPM_lib_xeonphi_POST_UNINSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
   ELSE()

     SET(CPACK_GENERATOR TGZ)


amigaos: Fix platform description and remove POSIX thread model for now

--- platforms/amigaos-gcc/platform.cmake
+++ platforms/amigaos-gcc/platform.cmake
@@ -1,11 +1,9 @@
-set (PLIBSYS_THREAD_MODEL posix)
-set (PLIBSYS_IPC_MODEL node)
+set (PLIBSYS_THREAD_MODEL none)
+set (PLIBSYS_IPC_MODEL none)
 set (PLIBSYS_TIME_PROFILER_MODEL posix)
 set (PLIBSYS_DIR_MODEL posix)
 set (PLIBSYS_LIBRARYLOADER_MODEL none)

-set (PLIBSYS_PLATFORM_LINK_LIBRARIES pthread dl)
-
 set (PLIBSYS_PLATFORM_DEFINES
         -D_REENTRANT
 )


fix a bug in FindGlog.cmake

fix a bug in FindGlog.cmake

Summary:
Call `find_package_handle_standard_args()` with a package name of `Glog`
rather than `glog`, so that it sets `Glog_FOUND` rather than `glog_FOUND`.
This argument needs to match the case of our file name (FindGlog.cmake), since
CMake variables are case-sensitive.

Reviewed By: Orvid

Differential Revision: D36678745

fbshipit-source-id: 6a0578103d12684e414664b17f7880664c0141f4

--- build/fbcode_builder/CMake/FindGlog.cmake
+++ build/fbcode_builder/CMake/FindGlog.cmake
@@ -19,7 +19,7 @@

 select_library_configurations(GLOG)

-find_package_handle_standard_args(glog DEFAULT_MSG
+find_package_handle_standard_args(Glog DEFAULT_MSG
   GLOG_LIBRARY
   GLOG_INCLUDE_DIR)


Add correct dependency for lua compilation

Lua compilation needs to depend on lua. Otherwise the lua compiler might
not be available.

--- build/UseLua.cmake
+++ build/UseLua.cmake
@@ -49,6 +49,7 @@
 			COMMAND ${LUA_COMPILER} ${LUA_FLAGS} -o ${lua_source_outfile_path} ${lua_source_file_path}
 			MAIN_DEPENDENCY "${lua_source_file_path}"
 			COMMENT "Building Lua file ${it}"
+			DEPENDS ${LUA_DEPENDENCY}
 			VERBATIM)

 		SET_SOURCE_FILES_PROPERTIES("${lua_source_outfile_path}" PROPERTIES GENERATED 1)


CMake: Remove redundant messages from cmake/LLVM.cmake

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -572,7 +572,6 @@
   # TODO -march=CPU flags !
   custom_try_compile_any("${CLANG}" "cl" "constant int test[sizeof(long)==8?1:-1]={1};" RESV  -x cl -S ${CLANG_TARGET_OPTION}${LLC_TRIPLE} ${CLANG_MARCH_FLAG}${LLC_HOST_CPU})
   if(RESV)
-    message(STATUS "Your llvm has the Open-CL-C-long-is-not-8-bytes bug; disabling cl_khr_int64 on host based devices.")
     set(CL_DISABLE_LONG 1)
   endif()
 endif()
@@ -589,7 +588,6 @@
   # TODO -march=CPU flags !
   custom_try_compile_c_cxx("${CLANG}" "c" "__fp16 callfp16(__fp16 a) { return a * (__fp16)1.8; };" "__fp16 x=callfp16((__fp16)argc);" RESV -c ${CLANG_TARGET_OPTION}${LLC_TRIPLE} ${CLANG_MARCH_FLAG}${LLC_HOST_CPU})
   if(RESV)
-    message(STATUS "Disabling cl_khr_fp16, seems your system doesnt support it")
     set(CL_DISABLE_HALF 1)
   endif()
 endif()


CMake: fix FindJava call

CMake: fix FindJava call

--- cmake/java.cmake
+++ cmake/java.cmake
@@ -38,7 +38,7 @@
 add_custom_target(Java${PROJECT_NAME}_proto DEPENDS ${PROTO_JAVAS} ortools::ortools)

 # Setup Java
-find_package(JAVA 1.8 REQUIRED COMPONENTS Development)
+find_package(Java 1.8 REQUIRED COMPONENTS Development)
 find_package(JNI REQUIRED)

 # CMake will remove all '-D' prefix (i.e. -DUSE_FOO become USE_FOO)


Fixed a typo in the ctest S script

Fixed a typo in the ctest S script

git-svn-id: 9be72bd8b79bf6944680671de68cae08993c9086@1709 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/scripts/ctest_hoomd.cmake
+++ src/scripts/ctest_hoomd.cmake
@@ -75,11 +75,11 @@
 	SET (BUILDNAME "${BUILDNAME}-shared")
 endif(ENABLE_STATIC MATCHES "ON")

-if (SINLE_PRECISION MATCHES "ON")
+if (SINGLE_PRECISION MATCHES "ON")
 	SET (BUILDNAME "${BUILDNAME}-single")
-else (SINLE_PRECISION MATCHES "ON")
+else (SINGLE_PRECISION MATCHES "ON")
 	SET (BUILDNAME "${BUILDNAME}-double")
-endif (SINLE_PRECISION MATCHES "ON")
+endif (SINGLE_PRECISION MATCHES "ON")

 if (ENABLE_CUDA MATCHES "ON")
 	SET (BUILDNAME "${BUILDNAME}-cuda")


CMake: some work on simplifying the deployment of plugins' external binaries (#966).

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -613,8 +613,8 @@
             IF(WIN32)
                 STRING(REPLACE "^${CMAKE_SHARED_LIBRARY_PREFIX}" "${CMAKE_IMPORT_LIBRARY_PREFIX}"
                        IMPORT_EXTERNAL_BINARY "${EXTERNAL_BINARY}")
-               STRING(REPLACE "${CMAKE_SHARED_LIBRARY_SUFFIX}$" "${CMAKE_IMPORT_LIBRARY_SUFFIX}"
-                      IMPORT_EXTERNAL_BINARY "${EXTERNAL_BINARY}")
+                STRING(REPLACE "${CMAKE_SHARED_LIBRARY_SUFFIX}$" "${CMAKE_IMPORT_LIBRARY_SUFFIX}"
+                       IMPORT_EXTERNAL_BINARY "${EXTERNAL_BINARY}")

                 TARGET_LINK_LIBRARIES(${PROJECT_NAME}
                     ${FULL_DEST_EXTERNAL_BINARIES_DIR}/${IMPORT_EXTERNAL_BINARY}


Add new functions from LAPACK 3.6.1

Add new functions from LAPACK 3.6.1

--- cmake/lapack.cmake
+++ cmake/lapack.cmake
@@ -2,7 +2,7 @@

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

@@ -96,7 +96,7 @@
   stbrfs.f stbtrs.f stgevc.f stgex2.f stgexc.f stgsen.f
   stgsja.f stgsna.f stgsy2.f stgsyl.f stpcon.f stprfs.f stptri.f
   stptrs.f
-  strcon.f strevc.f strexc.f strrfs.f strsen.f strsna.f strsyl.f
+  strcon.f strevc.f strevc3.f strexc.f strrfs.f strsen.f strsna.f strsyl.f
   strtrs.f DEPRECATED/stzrqf.f stzrzf.f sstemr.f
   slansf.f spftrf.f spftri.f spftrs.f ssfrk.f stfsm.f stftri.f stfttp.f
   stfttr.f stpttf.f stpttr.f strttf.f strttp.f
@@ -165,7 +165,7 @@
   ctbcon.f ctbrfs.f ctbtrs.f ctgevc.f ctgex2.f
   ctgexc.f ctgsen.f ctgsja.f ctgsna.f ctgsy2.f ctgsyl.f ctpcon.f
   ctprfs.f ctptri.f
-  ctptrs.f ctrcon.f ctrevc.f ctrexc.f ctrrfs.f ctrsen.f ctrsna.f
+  ctptrs.f ctrcon.f ctrevc.f ctrevc3.f ctrexc.f ctrrfs.f ctrsen.f ctrsna.f
   ctrsyl.f ctrtrs.f DEPRECATED/ctzrqf.f ctzrzf.f cung2l.f cung2r.f
   cungbr.f cunghr.f cungl2.f cunglq.f cungql.f cungqr.f cungr2.f
   cungrq.f cungtr.f cunm2l.f cunm2r.f cunmbr.f cunmhr.f cunml2.f
@@ -234,7 +234,7 @@
   dtbcon.f dtbrfs.f dtbtrs.f dtgevc.f dtgex2.f dtgexc.f dtgsen.f
   dtgsja.f dtgsna.f dtgsy2.f dtgsyl.f dtpcon.f dtprfs.f dtptri.f
   dtptrs.f
-  dtrcon.f dtrevc.f dtrexc.f dtrrfs.f dtrsen.f dtrsna.f dtrsyl.f
+  dtrcon.f dtrevc.f dtrevc3.f dtrexc.f dtrrfs.f dtrsen.f dtrsna.f dtrsyl.f
   dtrtrs.f DEPRECATED/dtzrqf.f dtzrzf.f dstemr.f
   dsgesv.f dsposv.f dlag2s.f slag2d.f dlat2s.f
   dlansf.f dpftrf.f dpftri.f dpftrs.f dsfrk.f dtfsm.f dtftri.f dtfttp.f
@@ -305,7 +305,7 @@
   ztbcon.f ztbrfs.f ztbtrs.f ztgevc.f ztgex2.f
   ztgexc.f ztgsen.f ztgsja.f ztgsna.f ztgsy2.f ztgsyl.f ztpcon.f
   ztprfs.f ztptri.f
-  ztptrs.f ztrcon.f ztrevc.f ztrexc.f ztrrfs.f ztrsen.f ztrsna.f
+  ztptrs.f ztrcon.f ztrevc.f ztrevc3.f ztrexc.f ztrrfs.f ztrsen.f ztrsna.f
   ztrsyl.f ztrtrs.f DEPRECATED/ztzrqf.f ztzrzf.f zung2l.f
   zung2r.f zungbr.f zunghr.f zungl2.f zunglq.f zungql.f zungqr.f zungr2.f
   zungrq.f zungtr.f zunm2l.f zunm2r.f zunmbr.f zunmhr.f zunml2.f


Update msp430.cmake

Update msp430.cmake

--- cmake/msp430.cmake
+++ cmake/msp430.cmake
@@ -10,6 +10,10 @@
 # worth the effort to find it rather than the user just writing it for themselves. Lastly, on Linux it assumes
 # that all of the binaries are in /usr/bin and thus in the system path. It is assumed on linux the toolchain is
 # installed by a package manager at /usr.
+#
+# - To change the target board, simply change the MSP_BOARD variable.
+# - To make a 'flash' command, call the setup_flash_target function with the TARGET NAME and DRIVER of the launchpad
+#   board.
 #
 #---------------------------------------------------------------------------------------------------------


WIP - deploying Qt5 dependencies automatically

--- cmake/quartz.cmake
+++ cmake/quartz.cmake
@@ -46,16 +46,34 @@
         Quick
         QuickWidgets
         Svg
-        Network)
+        Network
+        Sql
+
+    )
 endmacro( qz_add_qt )

 macro( qz_install )
     vq_install()
-    set( BIN_OUTPUT_DIR "bin/${CMAKE_BUILD_TYPE}" )
-    if( WIN32 )
-        install_qt5_executable( "${BIN_OUTPUT_DIR}/${PROJECT_NAME}.exe" )
-    else()
-        install_qt5_executable( "${BIN_OUTPUT_DIR}/${PROJECT_NAME}" )
+    if (WIN32)
+        find_package( "Qt5Core" )
+        get_filename_component(QT5_BINARY_DIR
+                               "${QT_QMAKE_EXECUTABLE}"
+                               DIRECTORY)
+        set(${WinDep} "${QT5_BINARY_DIR}/windeployqt.exe")
+        add_custom_command(
+            TARGET ${PROJECT_NAME}
+            POST_BUILD
+            COMMAND set PATH=%PATH%$<SEMICOLON>"${QT5_BINARY_DIR}"
+            COMMAND "windeployqt"
+                --dir "${CMAKE_CURRENT_BINARY_DIR}"
+                -xml
+                -sql
+                -serialport
+                -webengine
+                -webchannel
+                -webenginewidgets
+                "$<TARGET_FILE_DIR:${PROJECT_NAME}>/$<TARGET_FILE_NAME:${PROJECT_NAME}>"
+        )
     endif()
 endmacro( qz_install )


Suppress RC banner for Y3 builds

Suppress RC banner for Y3 builds

--- cmake/y3/get.cmake
+++ cmake/y3/get.cmake
@@ -83,7 +83,7 @@
     endif()
     message(STATUS "[Y3] Building ${_dir} (${_config})")
     file(MAKE_DIRECTORY ${_build_dir})
-    y3_run(COMMAND ${CMAKE_COMMAND} -G ${GENERATOR} ${_source_dir}
+    y3_run(COMMAND ${CMAKE_COMMAND} -E env RCFLAGS=/nologo ${CMAKE_COMMAND} -G ${GENERATOR} ${_source_dir}
         -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${PREFIX_DIR}/lib${_output_suffix}
         -DCMAKE_BUILD_TYPE=${_config}
         -DCMAKE_INSTALL_PREFIX=${PREFIX_DIR}


more fixes for windows build

more fixes for windows build


CTest: ignore warning addressing Vc users

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -12,6 +12,7 @@
    "include/qt4" # -Wuninitialized in QWeakPointer(X *ptr)
    " note: " # Notes are additional lines from errors (or warnings) that we don't want to count as additional warnings
    "clang: warning: argument unused during compilation: '-stdlib=libc"
+   "clang 3.6.x miscompiles AVX code" # a preprocessor warning for users of Vc, irrelevant for the dashboard
    )

 set(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION}


add check for CTK_EXPORT_HEADER_TEMPLATE

--- CMake/ctkMacroBuildQtPlugin.cmake
+++ CMake/ctkMacroBuildQtPlugin.cmake
@@ -64,6 +64,10 @@
   set(MY_EXPORT_HEADER_PREFIX ${MY_NAME})
   string(REGEX REPLACE "^CTK" "ctk" MY_EXPORT_HEADER_PREFIX ${MY_EXPORT_HEADER_PREFIX})
   set(MY_LIBNAME ${lib_name})
+
+  if(NOT CTK_EXPORT_HEADER_TEMPLATE)
+    message(FATAL_ERROR "CTK_EXPORT_HEADER_TEMPLATE is mandatory")
+  endif()

   configure_file(
     ${CTK_EXPORT_HEADER_TEMPLATE}


modules: updated FindCorrade.cmake from Corrade repository.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -208,7 +208,7 @@
 set(CORRADE_TESTSUITE_LIBRARIES ${CORRADE_TESTSUITE_LIBRARY} ${CORRADE_UTILITY_LIBRARIES})

 # At least static build needs this
-if((UNIX OR CORRADE_TARGET_NACL) AND NOT CORRADE_TARGET_NACL_NEWLIB)
+if(CORRADE_TARGET_UNIX OR CORRADE_TARGET_NACL_GLIBC)
     set(CORRADE_PLUGINMANAGER_LIBRARIES ${CORRADE_PLUGINMANAGER_LIBRARIES} ${CMAKE_DL_LIBS})
 endif()


Build: Remove CMake find module for YAEP

--- scripts/cmake/Modules/FindYAEP.cmake
+++ scripts/cmake/Modules/FindYAEP.cmake
@@ -1,30 +0,0 @@
-# Try to find YAEP
-# ================
-
-# This find script defines the following variables:
-#
-# - YAEP_FOUND:         System has YAEP
-# - YAEP_INCLUDE_DIRS:  The YAEP include directories
-# - YAEP_LIBRARIES:     The library needed to use YAEP (C)
-# - YAEP_LIBRARIES_CPP: The library needed to use YAEP (C++)
-#
-# .
-
-find_path (YAEP_INCLUDE_DIR NAMES yaep.h PATH_SUFFIXES yaep)
-
-find_library (YAEP_LIBRARY NAMES yaep)
-find_library (YAEP_LIBRARY_CPP NAMES yaep++)
-
-include (FindPackageHandleStandardArgs)
-# Handle the QUIETLY and REQUIRED arguments and set YAEP_FOUND to TRUE, if all listed variables are TRUE
-find_package_handle_standard_args (YAEP
-				   REQUIRED_VARS
-				   YAEP_LIBRARY
-				   YAEP_LIBRARY_CPP
-				   YAEP_INCLUDE_DIR)
-
-mark_as_advanced (YAEP_INCLUDE_DIR YAEP_LIBRARY)
-
-set (YAEP_LIBRARIES ${YAEP_LIBRARY})
-set (YAEP_LIBRARIES_CPP ${YAEP_LIBRARY_CPP})
-set (YAEP_INCLUDE_DIRS ${YAEP_INCLUDE_DIR})


updating OpenALSoft to v1.18.2

updating OpenALSoft to v1.18.2


Fix CPackConfig for Ubuntu

Fix CPackConfig for Ubuntu

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[x] Bugfix
[ ] New Feature
[ ] Cleanup
[ ] Optimization
[ ] Documentation

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -71,7 +71,7 @@
   set(DPUT_HOST "ppa:eilemann/equalizer")
 endif()
 set(CPACK_DEBIAN_BUILD_DEPENDS bison flex libgl1-mesa-dev)
-set(CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6, libboost-system, libx11-dev, libgl1-mesa-dev")
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6, libboost-system-dev, libx11-dev, libgl1-mesa-dev")

 set(CPACK_OSX_PACKAGE_VERSION "10.5")


cmake: Change start time to UTC.

cmake: Change start time to UTC.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,7 +1,7 @@
 set(UPDATE_TYPE "true")

 set(CTEST_PROJECT_NAME "libssh")
-set(CTEST_NIGHTLY_START_TIME "01:00:00 CET")
+set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "test.libssh.org")


Update CTest configuration to submit tests to new public dashboard at http://www.cdash.org/CDashPublic/index.php?project=Teem.

git-svn-id: 9e9401559e51101c165cdce4d49b411eb20436ed@4026 3d70eeeb-363e-0410-a505-8a46323a89f2

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,5 +1,5 @@
 #
-# Teem: Tools to process and visualize scientific data and images
+# Teem: Tools to process and visualize scientific data and images
 # Copyright (C) 2008, 2007, 2006, 2005  Gordon Kindlmann
 # Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998  University of Utah
 #
@@ -20,11 +20,16 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #

-SET (CTEST_PROJECT_NAME "Teem")
-SET(CTEST_DROP_METHOD "xmlrpc")
-SET(CTEST_DROP_SITE "http://dashboard.sci.utah.edu:8081")
-SET(CTEST_DROP_LOCATION "Teem")
-# I'm not sure which one I need to set, so I'll both of these
-SET(NIGHTLY_START_TIME "21:00:00 MST")
-SET(CTEST_NIGHTLY_START_TIME "21:00:00 MST")
+## This file should be placed in the root directory of your project.
+## Then modify the CMakeLists.txt file in the root directory of your
+## project to incorporate the testing dashboard.
+## # The following are required to uses Dart and the Cdash dashboard
+##   ENABLE_TESTING()
+##   INCLUDE(Dart)
+set(CTEST_PROJECT_NAME "Teem")
+set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")

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


feat(battery): add animation-discharging

--- doc/config.cmake
+++ doc/config.cmake
@@ -328,7 +328,7 @@
 format-charging = <animation-charging> <label-charging>
 format-charging-underline = #ffb52a

-format-discharging = <ramp-capacity> <label-discharging>
+format-discharging = <animation-discharging> <label-discharging>
 format-discharging-underline = ${self.format-charging-underline}

 format-full-prefix = " "
@@ -345,6 +345,12 @@
 animation-charging-2 = 
 animation-charging-foreground = ${colors.foreground-alt}
 animation-charging-framerate = 750
+
+animation-discharging-0 = 
+animation-discharging-1 = 
+animation-discharging-2 = 
+animation-discharging-foreground = ${colors.foreground-alt}
+animation-discharging-framerate = 750

 [module/temperature]
 type = internal/temperature


MRG: Merge branch 'abi_backward_compatibility' into release-6.6

--- Packaging/patch_cmake_files.cmake
+++ Packaging/patch_cmake_files.cmake
@@ -59,5 +59,17 @@
   #   endforeach()
   # endif()
   # file(WRITE "${otb_opengl}" ${otb_opengl_cmake_NEW})
+
+  #patch for ABI compatibility
+  if(EXISTS "${PATCH_STAGE_DIR}/UseOTB.cmake")
+    file(APPEND "${PATCH_STAGE_DIR}/UseOTB.cmake"
+"\n\n# ABI compatibility \
+\nif ( CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\") \
+\n  if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0 ) \
+\n    add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) \
+\n  endif() \
+\nendif()" )
+  endif()
+

 endfunction()


More robust file generation in cmake files

--- Utilities.cmake
+++ Utilities.cmake
@@ -379,6 +379,14 @@
 endfunction (SizeClasses)

 #############################################
+# Read one file and append it to another
+function (AppendFileContents input output)
+file(READ ${input} buffer)
+file(APPEND ${output} "${buffer}")
+endfunction (AppendFileContents)
+
+
+#############################################
 # Generate public symbols list
 function (GeneratePublicSymbolsList public_sym_list mangling_map symbol_prefix output_file)

@@ -486,8 +494,10 @@

 message(STATUS "Creating public header ${output_file}")

+file(TO_NATIVE_PATH "${output_file}" ntv_output_file)
+
 # File Header
-file(WRITE "${output_file}.header"
+file(WRITE "${ntv_output_file}"
   "#ifndef JEMALLOC_H_\n"
   "#define	JEMALLOC_H_\n"
   "#ifdef __cplusplus\n"
@@ -495,47 +505,19 @@
   "#endif\n\n"
 )

+foreach(pub_hdr ${header_list} )
+  set(HDR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/include/jemalloc/${pub_hdr}")
+  file(TO_NATIVE_PATH "${HDR_PATH}" ntv_pub_hdr)
+  AppendFileContents(${ntv_pub_hdr} ${ntv_output_file})
+endforeach(pub_hdr)
+
 # Footer
-file(WRITE "${output_file}.footer"
+file(APPEND "${ntv_output_file}"
   "#ifdef __cplusplus\n"
   "}\n"
   "#endif\n"
   "#endif /* JEMALLOC_H_ */\n"
 )
-
-# We need to utlize copy command here because of the unexpected FILE function
-# behavior as follows
-# - file(STRINGS) unexpectedly reads two lines when a preprocessor continuations
-# is encoutered. In the process \ is replaced to a ; and we get a CMake list of
-# two lines, instead of one. When such a line written back we get single line with
-# ; in the middle
-# - file(READ) which is expected to handle files as binaries removes trailing ; and
-# ruins function prototypes.
-
-# Create a Windows path for copy command
-file(TO_NATIVE_PATH "${output_file}" ntv_output_file)
-file(TO_NATIVE_PATH "${output_file}.header" ntv_header)
-file(TO_NATIVE_PATH "${output_file}.footer" ntv_footer)
-
-list(APPEND ntv_path_list ${ntv_header})
-
-foreach(pub_hdr ${header_list} )
-  set(HDR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/include/jemalloc/${pub_hdr}")
-  file(TO_NATIVE_PATH "${HDR_PATH}" ntv_pub_hdr)
-  list(APPEND ntv_path_list +${ntv_pub_hdr})
-endforeach(pub_hdr)
-
-list(APPEND ntv_path_list +${ntv_footer})
-
-execute_process(COMMAND $ENV{COMSPEC} /C copy ${ntv_path_list} ${ntv_output_file}
- RESULT_VARIABLE error_level
- ERROR_VARIABLE error_output)
-
-if(NOT ${error_level} EQUAL 0)
-  message(FATAL_ERROR "Public header concatenation completed with ${error_level} : ${error_output}")
-endif()
-
-file(REMOVE "${output_file}.header" "${output_file}.footer")

 endfunction(CreateJemallocHeader)

@@ -609,7 +591,7 @@

 # This converts #undefs into #cmakedefines so configure_file can handle it
 set(PS_CMD
-"Get-Content ${ntv_file_path} |
+"Get-Content \"${ntv_file_path}\" |
 ForEach {
 if($_ -match '^#undef[ \t]*[^ \t]*')
   { $_ -replace '^#undef[ \t]*([^ \t]*)','#cmakedefine $1 @$1@' } else {$_}}"


remove trailing spaces from comparisons, obsolete quotes and explicit variable expansion

--- rosidl_generator_dds_idl/cmake/rosidl_generate_dds_interfaces.cmake
+++ rosidl_generator_dds_idl/cmake/rosidl_generate_dds_interfaces.cmake
@@ -52,15 +52,15 @@
       set(_output_path "${_output_path}/${_subfolder}")
     endforeach()
     get_filename_component(_name "${_idl_file}" NAME_WE)
-    if("${_extension}" STREQUAL ".msg")
-      if("${_parent_folder} " STREQUAL "msg ")
+    if(_extension STREQUAL ".msg")
+      if(_parent_folder STREQUAL "msg")
         list(APPEND _generated_msg_files "${_output_path}/${_name}_.idl")
-      elseif("${_parent_folder} " STREQUAL "srv ")
+      elseif(_parent_folder STREQUAL "srv")
         list(APPEND _generated_srv_files "${_output_path}/${_name}_.idl")
       else()
         message(FATAL_ERROR "Interface file with unknown parent folder: ${_idl_file}")
       endif()
-    elseif("${_extension}" STREQUAL ".srv")
+    elseif(_extension STREQUAL ".srv")
       # TODO(dirk-thomas) this is only done for opensplice
       # and should be move to the opensplice specific generator package
       list(APPEND _generated_srv_files "${_output_path}/Sample_${_name}_Request_.idl")
@@ -134,13 +134,13 @@
     set(_srv_destination "${_srv_destination}/${_subfolder}")
   endforeach()
   if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
-    if(NOT "${_generated_msg_files} " STREQUAL " ")
+    if(NOT _generated_msg_files STREQUAL "")
       install(
         FILES ${_generated_msg_files}
         DESTINATION "${_msg_destination}"
       )
     endif()
-    if(NOT "${_generated_srv_files} " STREQUAL " ")
+    if(NOT _generated_srv_files STREQUAL "")
       install(
         FILES ${_generated_srv_files}
         DESTINATION "${_srv_destination}"


remove unnecessary include

remove unnecessary include

--- rosidl_generator_dds_idl/cmake/rosidl_generate_dds_interfaces.cmake
+++ rosidl_generator_dds_idl/cmake/rosidl_generate_dds_interfaces.cmake
@@ -11,9 +11,6 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-
-# include CMake functions
-include(CMakeParseArguments)

 #
 # Generate DDS IDL files from ROS IDL files.


Updating FindIDL for IDL 8.2.

Updating FindIDL for IDL 8.2.

--- CMake/Modules/FindIDL.cmake
+++ CMake/Modules/FindIDL.cmake
@@ -44,46 +44,56 @@
 #
 #        /usr/local/itt/idl/idl80

-# convenience variable for IDL's default install directories
+# convenience variable for ITT's install dir
 if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
-  set(_IDL_PROGRAM_FILES_DIR "C:/Program Files/ITT/IDL")
+  set(_IDL_PROGRAM_FILES_DIR "C:/Program Files")
   set(_IDL_NAME "IDL")
   set(_IDL_OS "")
+  set(_IDL_KNOWN_COMPANIES "Exelis" "ITT")
 elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-  set(_IDL_PROGRAM_FILES_DIR "/Applications/itt/idl")
+  set(_IDL_PROGRAM_FILES_DIR "/Applications")
   set(_IDL_NAME "idl")
   set(_IDL_OS ".darwin")
+  set(_IDL_KNOWN_COMPANIES "exelis" "itt")
 elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
-  set(_IDL_PROGRAM_FILES_DIR "/usr/local/itt/idl")
+  set(_IDL_PROGRAM_FILES_DIR "/usr/local")
   set(_IDL_NAME "idl")
   set(_IDL_OS ".linux")
+  set(_IDL_KNOWN_COMPANIES "exelis" "itt")
 endif ()

-# find IDL based on version numbers; if you want a specific one, set
+# find idl based on version numbers, if you want a specific one, set
 # it prior to running configure
 if (NOT DEFINED IDL_FIND_VERSION)
-  set(_IDL_KNOWN_VERSIONS "81" "80" "71" "706" "64")
+  set(_IDL_KNOWN_VERSIONS "82" "81" "80" "71" "706")
+# IDL 8.0 is in a different location than other versions on Windows (extra IDL directory in path)
+  foreach (_IDL_COMPANY ${_IDL_KNOWN_COMPANIES})
+    list(APPEND
+         _IDL_SEARCH_DIRS
+         "${_IDL_PROGRAM_FILES_DIR}/${_IDL_COMPANY}/${_IDL_NAME}/${_IDL_NAME}80")
+    list(APPEND
+         _IDL_SEARCH_DIRS
+         "${_IDL_PROGRAM_FILES_DIR}/${_IDL_COMPANY}/${_IDL_NAME}/${_IDL_NAME}81")
+    foreach (_IDL_KNOWN_VERSION ${_IDL_KNOWN_VERSIONS})
+      list(APPEND _IDL_SEARCH_DIRS
+           "${_IDL_PROGRAM_FILES_DIR}/${_IDL_COMPANY}/${_IDL_NAME}${_IDL_KNOWN_VERSION}")
+    endforeach (_IDL_KNOWN_VERSION ${_IDL_KNOWN_VERSIONS})
+  endforeach (_IDL_COMPANY ${_IDL_KNOWN_COMPANIES})
+endif ()

-  set(_IDL_SEARCH_DIRS "${_IDL_PROGRAM_FILES_DIR}")
-  foreach (_IDL_KNOWN_VERSION ${_IDL_KNOWN_VERSIONS})
-    list(APPEND _IDL_SEARCH_DIRS
-         "${_IDL_PROGRAM_FILES_DIR}/${_IDL_NAME}${_IDL_KNOWN_VERSION}")
-  endforeach ()
-
-  set(APPEND _IDL_SEARCH_DIRS "${_IDL_PROGRAM_FILES_DIR}/${_IDL_NAME}")
-  foreach (_IDL_KNOWN_VERSION ${_IDL_KNOWN_VERSIONS})
-    list(APPEND _IDL_SEARCH_DIRS
-         "${_IDL_PROGRAM_FILES_DIR}${_IDL_KNOWN_VERSION}")
-  endforeach ()
+if (NOT "$ENV{IDL_DIR}" STREQUAL "")
+  set(_IDL_SEARCH_DIRS "$ENV{IDL_DIR}")
 endif ()
+

 find_path(IDL_INCLUDE_DIR
   idl_export.h
   PATHS ${_IDL_SEARCH_DIRS}
   HINTS ${IDL_ROOT}
   PATH_SUFFIXES external/include
-  )
+)
+

 set(IDL_BIN64_PATH /bin/bin${_IDL_OS}.x86_64)
   if (APPLE)
@@ -124,7 +134,7 @@
   get_filename_component(IDL_DIR ${_IDL_BIN_DIR} PATH)
 else ()
    if (IDL_FIND_REQUIRED)
-      message(FATAL_ERROR "Could not find IDL")
+      message(FATAL_ERROR "Could not find IDL. Use -DIDL_INCLUDE_DIR and -DIDL_LIBRARY to specify IDL location.")
    endif ()
 endif ()


Disallow vtk_module argument "DEFAULT"

Disallow vtk_module argument "DEFAULT"

Reject accidental use of the DEFAULT keyword argument.  All module
request variables default to OFF.  Some modules may be built by default
through group variables that default to ON.

Change-Id: I303968fa8a9fa77ad7d4d68e8168c97aa9e49b09

--- CMake/vtkModuleMacros.cmake
+++ CMake/vtkModuleMacros.cmake
@@ -46,10 +46,7 @@
       list(APPEND VTK_MODULE_${vtk-module}_DEPENDS "${arg}")
       list(APPEND VTK_MODULE_${vtk-module}_IMPLEMENTS "${arg}")
     elseif("${_doing}" MATCHES "^DEFAULT")
-      #message(FATAL_ERROR "Invalid argument [DEFAULT]")
-      # Ignore the default again - this should go once groups work.
-      #set(VTK_MODULE_${vtk-module}_DEFAULT "${arg}")
-      set(_doing "")
+      message(FATAL_ERROR "Invalid argument [DEFAULT]")
     elseif("${_doing}" MATCHES "^GROUPS")
       # Groups control larger groups of modules.
       if(NOT DEFINED VTK_GROUP_${arg}_MODULES)


corrected url in cmakeexternals

corrected url in cmakeexternals

--- CMakeExternals/OpenCV.cmake
+++ CMakeExternals/OpenCV.cmake
@@ -29,14 +29,7 @@
     OPTION(OpenCV_BUILD_NEW_PYTHON_SUPPORT "Build OpenCV Python wrappers" OFF)
     MARK_AS_ADVANCED(OpenCV_BUILD_NEW_PYTHON_SUPPORT)

-    #IF(WIN32)
-      #SET(opencv_url http://mitk.org/download/thirdparty/OpenCV-2.2.0-win.tar.bz2)
-    #ELSE()
-      #SET(opencv_url http://mitk.org/download/thirdparty/OpenCV-2.3.1a.tar.bz2)
-    #ENDIF()
-
-    SET(opencv_url http://mitk.org/download/thirdparty/OpenCV-2.3.1a.tar.bz2)
-    #SET(opencv_url file:///tmp/OpenCV-2.3.0.tar.bz2)
+    SET(opencv_url http://mitk.org/download/thirdparty/OpenCV-2.3.0.tar.bz2)

     ExternalProject_Add(${proj}
 URL ${opencv_url}


[generation] fix wrong name of CMake-provided pkg-config path

--- lib/orocos/templates/config/FindOrocosPkgConfig.cmake
+++ lib/orocos/templates/config/FindOrocosPkgConfig.cmake
@@ -38,7 +38,7 @@
 #

 INCLUDE(FindPkgConfig)
-SET(OROCOS_PKGCONFIG_EXECUTABLE ${CMAKE_PKGCONFIG_EXECUTABLE})
+SET(OROCOS_PKGCONFIG_EXECUTABLE ${PKG_CONFIG_EXECUTABLE})
 MARK_AS_ADVANCED(OROCOS_PKGCONFIG_EXECUTABLE)

 MACRO(OROCOS_PKGCONFIG LIBRARY FOUND INCLUDE_DIRS DEFINES LINKDIRS LINKLIBS)


add packaging option to TensileCreateLibraryFiles

--- Tensile/cmake/TensileConfig.cmake
+++ Tensile/cmake/TensileConfig.cmake
@@ -69,7 +69,7 @@
         Tensile_LOGIC_PATH Tensile_OUTPUT_PATH)

   # Tensile_ROOT can be specified instead of using the installed path.
-  set(options NO_MERGE_FILES SHORT_FILE_NAMES)
+  set(options NO_MERGE_FILES SHORT_FILE_NAMES GENERATE_PACKAGE)
   set(oneValueArgs TENSILE_ROOT EMBED_LIBRARY EMBED_KEY VAR_PREFIX)
   set(multiValueArgs "")
   cmake_parse_arguments(Tensile "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
@@ -83,6 +83,10 @@
     set(Options ${Options} "--no-merge-files")
   else()
     set(Options ${Options} "--merge-files")
+  endif()
+
+  if(Tensile_GENERATE_PACKAGE)
+    set(Options ${Options} "--package-library")
   endif()

   if(Tensile_SHORT_FILE_NAMES)


FIX: vs2012 (#3)

FIX: vs2012 (#3)

--- external/UseOsgEarth.cmake
+++ external/UseOsgEarth.cmake
@@ -128,7 +128,7 @@
 ExternalProject_Add(
     osgearth
     DEPENDS ${OSGEARTH_DEPENDS}
-    URL http://omegalib.googlecode.com/files/osgearth-10db273f4f.tar.gz
+    URL http://omegalib.s3-website-us-west-2.amazonaws.com/omegaOsgEarth/osgearth-10db273f4f-cmake3.tar.gz
     CMAKE_ARGS
         ${OSGEARTH_ARGS}
     INSTALL_COMMAND ""


Return bb_factor to 10.

Return bb_factor to 10.

Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>

--- xc7/make/arch_define.cmake
+++ xc7/make/arch_define.cmake
@@ -27,7 +27,8 @@
       --allow_dangling_combinational_nodes on \
       --disable_errors check_unbuffered_edges:check_route \
       --congested_routing_iteration_threshold 0.8 \
-      --astar_fac 1.0 \
+      --astar_fac 1.2 \
+      --bb_factor 10 \
       --suppress_warnings \${OUT_NOISY_WARNINGS},sum_pin_class:check_unbuffered_edges:load_rr_indexed_data_T_values:check_rr_node:trans_per_R"
     RR_PATCH_TOOL
       ${symbiflow-arch-defs_SOURCE_DIR}/xc7/utils/prjxray_routing_import.py


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

 # 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

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


Minor fixes for CMake C++ options

Minor fixes for CMake C++ options

Summary: Simple fixes for C++ options in CMake.

Differential Revision: D6315722

fbshipit-source-id: 18565c1b46d1f394b492ed388c7daf15029a3f49

--- cmake_modules/Commons.cmake
+++ cmake_modules/Commons.cmake
@@ -9,16 +9,18 @@
     set(CMAKE_CXX_STANDARD 14)
     set(CMAKE_CXX_STANDARD_REQUIRED ON)
     set(CMAKE_CXX_EXTENSIONS OFF)
-
     if (MSVC)
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /W1 /D_SCL_SECURE_NO_WARNINGS")
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /W1 /D_SCL_SECURE_NO_WARNINGS")
+        set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
         set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
-        set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
+        set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
+        set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MT")
     else ()
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
-        set(CMAKE_CXX_FLAGS_RELEASE "-O3")
-        set(CMAKE_CXX_FLAGS_DEBUG "-g")
+        set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
+        set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
+        set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3")
+        set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -O3")
     endif ()
 endmacro()


Adds support for finding snap SYS packages quietly.

--- internal/sys_package_utils.cmake
+++ internal/sys_package_utils.cmake
@@ -21,19 +21,18 @@
   SET(${SNAP_FIND_SYS_NAME}_LIBRARIES "")
   FOREACH(curLibName ${SNAP_FIND_SYS_LIBRARY_NAMES})
     FIND_LIBRARY(CUR_LIBRARY_PATH NAMES ${curLibName} PATHS ${SNAP_FIND_SYS_LIBRARY_SEARCH_PATHS})
-    IF(NOT CUR_LIBRARY_PATH)
-      MESSAGE(FATAL_ERROR "Can't find lib: ${curLibName}")
+    IF(CUR_LIBRARY_PATH)
+      LIST(APPEND ${SNAP_FIND_SYS_NAME}_LIBRARIES ${CUR_LIBRARY_PATH})
     ENDIF()
-    LIST(APPEND ${SNAP_FIND_SYS_NAME}_LIBRARIES ${CUR_LIBRARY_PATH})
-    UNSET(CUR_LIBRARY_PATH CACHE) # calling FIND_LIBRARY added something to the cache we don't want... this clears it
-  ENDFOREACH(curLibName ${libNames})
+    UNSET(CUR_LIBRARY_PATH CACHE) # calling FIND_LIBRARY added something to the cache we don't want... this clears it
+  ENDFOREACH()

   LIST(LENGTH SNAP_FIND_SYS_LIBRARY_NAMES requested_num_libs)
   LIST(LENGTH ${SNAP_FIND_SYS_NAME}_LIBRARIES found_num_libs)
   IF(NOT ${found_num_libs} EQUAL ${requested_num_libs})
-    MESSAGE(ERROR "Requested ${requested_num_libs} but found ${found_num_libs}.")
-    MESSAGE(ERROR "Requested: ${SNAP_FIND_SYS_LIBRARY_NAMES}")
-    MESSAGE(ERROR "Found: ${${SNAP_FIND_SYS_NAME}_LIBRARIES}")
+    #MESSAGE(ERROR "Requested ${requested_num_libs} but found ${found_num_libs}.")
+    #MESSAGE(ERROR "Requested: ${SNAP_FIND_SYS_LIBRARY_NAMES}")
+    #MESSAGE(ERROR "Found: ${${SNAP_FIND_SYS_NAME}_LIBRARIES}")
     SET(${SNAP_FIND_SYS_NAME}_FOUND FALSE)
   ELSEIF(NOT ${SNAP_FIND_SYS_NAME}_INCLUDE_DIRS)
     SET(${SNAP_FIND_SYS_NAME}_FOUND FALSE)


Windows: fix PCH logic for generators w/o builtin PCH support.

--- pch.cmake
+++ pch.cmake
@@ -104,16 +104,28 @@

             file( RELATIVE_PATH pch_relative_path ${CMAKE_CURRENT_SOURCE_DIR} ${_input} )
             # check if there are folder-ups - in that case CMake will generate absolute path within CMake.dir folder
-            string( FIND "${pch_relative_path}" "../" pos )
-            if ( NOT ${pos} EQUAL -1 )
+            string( FIND "${pch_relative_path}" "../" pos_nix )
+            string( FIND "${pch_relative_path}" "..\\" pos_win )
+            if ( NOT ${pos_nix} EQUAL -1 OR NOT ${pos_win} EQUAL -1 )
                 set( pch_relative_path ${_input} )
+            endif()
+            file( TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${_targetName}_PCH.dir/${pch_relative_path}.o" built_pch_path )
+
+            if ( CMAKE_HOST_WIN32 )
+                string( REGEX REPLACE "\\\\(.):" "\\\\\\1_" built_pch_path    "${built_pch_path}"    )
+                string( REGEX REPLACE    "/(.):"    "/\\1_" pch_relative_path "${pch_relative_path}" )
+                string( REPLACE       "//"       "/"        pch_relative_path "${pch_relative_path}" )
+                file( TO_NATIVE_PATH "${_output}" _output )
+                set( mklink del "${_output}" && mklink "${_output}" "${built_pch_path}" )
+            else()
+                set( mklink "${CMAKE_COMMAND}" -E create_symlink "${built_pch_path}" "${_output}" )
             endif()

             add_custom_target( ${_targetName}_PCH_symlink
                 COMMAND
                     ${CMAKE_COMMAND} -E make_directory ${GCH_PATH}
                 COMMAND
-                    ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${_targetName}_PCH.dir/${pch_relative_path}.o" "${_output}"
+                    ${mklink}
                 COMMENT
                     "Creating symbolic link to built precompiled header"
                 VERBATIM


SVN_SILENT made messages (.desktop file)

--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -10,6 +10,7 @@
 Comment[hu]=Egyedi beállítófelület a sipe kapcsolatkezelőt használó azonosítókhoz.
 Comment[ia]=Interfacie de usator pro configuration de conto personalisate pro contos usante le gerente de connexion Sipe.
 Comment[it]=Interfaccia utente personalizzata di configurazione account per account che usano il gestore di connessioni Sipe.
+Comment[nb]=Brukerflate for å sette opp egendefinerte kontoer ved bruk av sipe tilkoblingsbehandler.
 Comment[nl]=Gebruikersinterface voor aangepaste accountconfiguratie voor accounts die de Sipe verbindingenbeheerder gebruiken.
 Comment[pt]=Interface de utilizador de configuração de contas personalizadas com o gestor de ligações Sipe.
 Comment[pt_BR]=Interface de configuração de contas personalizadas usando o gerenciador de conexões Sipe.
@@ -34,6 +35,7 @@
 Name[hu]=Sipe azonosítóbeállító felület
 Name[ia]=Interfacie de usator de configuration de conto de Sipe
 Name[it]=Interfaccia utente di configurazione account Sipe
+Name[nb]=Brukerflate for å sette opp Sipe-konto
 Name[nl]=Gebruikersinterface voor Sipe accountconfiguratie
 Name[pt]=Interface de Configuração de Contas do Sipe
 Name[pt_BR]=Interface de configuração de contas do Sipe


cpack: Ignore all object directories

cpack: Ignore all object directories

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -19,7 +19,7 @@

 ### source generator
 set(CPACK_SOURCE_GENERATOR "TGZ")
-set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/obj*/;tags;cscope.*;.ycm_extra_conf.pyc")
+set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/obj*;tags;cscope.*;.ycm_extra_conf.pyc")
 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")

 if (WIN32)


Update dashboard settings

Update dashboard settings

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -8,7 +8,7 @@
 set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "www.cdash.org")
-#set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ParaView")
+set(CTEST_DROP_SITE "open.cdash.org")
+#set(CTEST_DROP_LOCATION "/CDash/submit.php?project=MatViz")
 set(CTEST_DROP_LOCATION "/CDash/submit.php")
 set(CTEST_DROP_SITE_CDASH TRUE)


TEST: copy the CTestConfig given by CDash

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -2,8 +2,8 @@
 ## Then modify the CMakeLists.txt file in the root directory of your
 ## project to incorporate the testing dashboard.
 ## # The following are required to uses Dart and the Cdash dashboard
-##   enable_testing()
-##   include(Dart)
+##   ENABLE_TESTING()
+##   INCLUDE(CTest)
 set(CTEST_PROJECT_NAME "OTB-Wrapper")
 set(CTEST_NIGHTLY_START_TIME "20:00:00 CEST")


ENH: Prefer https vs http for ctest submission.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,7 +1,7 @@
 set(CTEST_PROJECT_NAME "ITK")
 set(CTEST_NIGHTLY_START_TIME "1:00:00 UTC")

-set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_METHOD "https")
 set(CTEST_DROP_SITE "open.cdash.org")
 set(CTEST_DROP_LOCATION "/submit.php?project=Insight")
 set(CTEST_DROP_SITE_CDASH TRUE)


updates models hash

updates models hash

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -2,4 +2,4 @@
 ## SPDX-License-Identifier: Apache-2.0

 set(CTEST_PROJECT_NAME "Embree")
-set(TEST_MODELS_HASH f7869349babc4000bd3c3fe98a2f09506c3d95e8)
+set(TEST_MODELS_HASH fb6b209fcb17ff6fce661f31557758308d3bae4d)


Workaround for a CDash bug affecting submission.

Use the slicer4 URL for now until the underlying issue is resolved.

Change-Id: I2f7b537aa4f0a30fe746b4499acdcc87edb654ef

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -2,6 +2,9 @@
 set(CTEST_NIGHTLY_START_TIME "23:59:59 UTC")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "trunk.cdash.org")
-set(CTEST_DROP_LOCATION "/submit.php?project=MolCore")
+#set(CTEST_DROP_SITE "trunk.cdash.org")
+#set(CTEST_DROP_LOCATION "/submit.php?project=MolCore")
+# Use the slicer URL for submission for now, bug in CDash processing code.
+set(CTEST_DROP_SITE "www.cdash.org")
+set(CTEST_DROP_LOCATION "/slicer4/submit.php?project=MolCore")
 set(CTEST_DROP_SITE_CDASH TRUE)


ENH: Set SOVERSION to match VERSION on ITK module targets

Teach itk_module_target_name to set SOVERSION to the same value as
VERSION.  Since the ITK version appears in the library name the ABI
compatibility version is not needed.

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -99,6 +99,7 @@

 macro(itk_module_target_name _name)
   set_property(TARGET ${_name} PROPERTY VERSION 1)
+  set_property(TARGET ${_name} PROPERTY SOVERSION 1)
   set_property(TARGET ${_name} PROPERTY OUTPUT_NAME ${_name}-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR})
 endmacro()


Added ability to change library suffix

Added ability to change library suffix

This is desirable for other projects such as ParaView reusing the VTK
build infrastructure, and for cases where you need something custom for
a VTK build.

Change-Id: I491fb31e64429d12fefc460b5a4f3d0e897d1c10

--- CMake/vtkModuleMacros.cmake
+++ CMake/vtkModuleMacros.cmake
@@ -239,6 +239,9 @@
   set_property(TARGET ${_target_name} PROPERTY LABELS ${_label})
 endmacro()

+# This macro does some basic checking for library naming, and also adds a suffix
+# to the output name with the VTK version by default. Setting the variable
+# VTK_CUSTOM_LIBRARY_SUFFIX will override the suffix.
 macro(vtk_target_name _name)
   set_property(TARGET ${_name} PROPERTY VERSION 1)
   set_property(TARGET ${_name} PROPERTY SOVERSION 1)
@@ -248,7 +251,14 @@
     set(_vtk "vtk")
     #message(AUTHOR_WARNING "Target [${_name}] does not start in 'vtk'.")
   endif()
-  set_property(TARGET ${_name} PROPERTY OUTPUT_NAME ${_vtk}${_name}-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION})
+  # Support custom library suffix names, for other projects wanting to inject
+  # their own version numbers etc.
+  if(DEFINED VTK_CUSTOM_LIBRARY_SUFFIX)
+    set(_lib_suffix "${VTK_CUSTOM_LIBRARY_SUFFIX}")
+  else()
+    set(_lib_suffix "-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")
+  endif()
+  set_property(TARGET ${_name} PROPERTY OUTPUT_NAME ${_vtk}${_name}${_lib_suffix})
 endmacro()

 macro(vtk_target_export _name)


pv_add_test creates a symlink to the source tree's input directory, and configures ctest to run from the build directory

--- cmake/PVAddTest.cmake
+++ cmake/PVAddTest.cmake
@@ -68,7 +68,7 @@

 macro(pv_add_test)
   cmake_parse_arguments(PARSED_ARGS "MPI_ONLY;NO_MPI;NO_PARAMS" "MIN_MPI_COPIES;MAX_MPI_COPIES;FLAGS;BASE_NAME" "PARAMS" ${ARGN})
-
+
   set(ERROR_STATE OFF)

   get_filename_component(BASE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
@@ -135,6 +135,13 @@

     pv_add_executable(${BASE_NAME} SRC ${libSrcCPP} ${libSrcC} ${libSrcHPP} ${libSrcH} OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
     add_dependencies(${BASE_NAME} pv)
+    if (NOT ${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
+      set(TEST_SOURCE_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/input")
+      if (EXISTS "${TEST_SOURCE_INPUT}")
+        set(TEST_BINARY_INPUT "${CMAKE_CURRENT_BINARY_DIR}/input")
+        execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${TEST_SOURCE_INPUT} ${TEST_BINARY_INPUT})
+      endif (EXISTS "${TEST_SOURCE_INPUT}")
+    endif()

     set(FIRST_TEST ON)
     set(PREV_TEST_NAME "")
@@ -154,8 +161,8 @@
           set(TEST_NAME "${TEST_BASE_NAME}_1")
           set(TEST_LOG "${TEST_LOG_DIR}/${TEST_NAME}.log")
           set(TEST_PARAMS "input/${PARAM}.params")
-          add_test(${TEST_NAME} ${CMAKE_COMMAND} -E chdir ${TEST_TOP_DIR}
-            ${TEST_BINARY} ${TEST_FLAGS} -p ${TEST_PARAMS} -l ${TEST_LOG})
+          add_test(NAME ${TEST_NAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+            COMMAND ${TEST_BINARY} ${TEST_FLAGS} -p ${TEST_PARAMS} -l ${TEST_LOG})
           set(FIRST_TEST OFF)
           set(PREV_TEST_NAME ${TEST_NAME})
         endif()
@@ -168,8 +175,8 @@
             set(TEST_NAME "${TEST_BASE_NAME}_${COPIES}")
             set(TEST_LOG "${TEST_LOG_DIR}/${TEST_NAME}.log")
             set(TEST_PARAMS "input/${PARAM}.params")
-            add_test(${TEST_NAME} ${CMAKE_COMMAND} -E chdir ${TEST_TOP_DIR}
-              ${MPIEXEC} -np ${COPIES} ${TEST_BINARY} ${TEST_FLAGS} -p ${TEST_PARAMS} -l ${TEST_LOG})
+            add_test(NAME ${TEST_NAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+              COMMAND ${MPIEXEC} -np ${COPIES} ${TEST_BINARY} ${TEST_FLAGS} -p ${TEST_PARAMS} -l ${TEST_LOG})

             if (NOT FIRST_TEST)
               set_tests_properties(${TEST_NAME} PROPERTIES DEPENDS ${PREV_TEST_NAME})
@@ -192,8 +199,8 @@
         # One process, no MPI
         set(TEST_NAME "${TEST_BASE_NAME}_1")
         set(TEST_LOG "${TEST_LOG_DIR}/${TEST_NAME}.log")
-        add_test(${TEST_NAME} ${CMAKE_COMMAND} -E chdir ${TEST_TOP_DIR}
-          ${TEST_BINARY} ${TEST_FLAGS} -l ${TEST_LOG})
+        add_test(NAME ${TEST_NAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+          COMMAND ${TEST_BINARY} ${TEST_FLAGS} -l ${TEST_LOG})
         set(FIRST_TEST OFF)
         set(PREV_TEST_NAME ${TEST_NAME})
       endif()
@@ -206,8 +213,8 @@
           set(TEST_NAME "${TEST_BASE_NAME}_${COPIES}")
           set(TEST_LOG "${TEST_LOG_DIR}/${TEST_NAME}.log")

-          add_test(${TEST_NAME} ${CMAKE_COMMAND} -E chdir ${TEST_TOP_DIR}
-            ${MPIEXEC} -np ${COPIES} ${TEST_BINARY} ${TEST_FLAGS} -l ${TEST_LOG})
+          add_test(NAME ${TEST_NAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+            COMMAND ${MPIEXEC} -np ${COPIES} ${TEST_BINARY} ${TEST_FLAGS} -l ${TEST_LOG})

           if (NOT FIRST_TEST)
             set_tests_properties(${TEST_NAME} PROPERTIES DEPENDS ${PREV_TEST_NAME})


[CMake] Allow overriding MSVC_DIA_SDK_DIR via CMake

This eases using it in cross-msvc setups.

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

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -474,7 +474,8 @@
   set(strdup "_strdup")

   # See if the DIA SDK is available and usable.
-  set(MSVC_DIA_SDK_DIR "$ENV{VSINSTALLDIR}DIA SDK")
+  set(MSVC_DIA_SDK_DIR "$ENV{VSINSTALLDIR}DIA SDK" CACHE PATH
+      "Path to the DIA SDK")

   # Due to a bug in MSVC 2013's installation software, it is possible
   # for MSVC 2013 to write the DIA SDK into the Visual Studio 2012


Revert "Upgrade ios min version to 8"

Revert "Upgrade ios min version to 8"

Accidental commit

This reverts commit f21d4a6836ea159e95e5042ba8383f20d4899cda.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -208,7 +208,7 @@
     list(APPEND DARWIN_EMBEDDED_PLATFORMS ios)
     set(DARWIN_ios_MIN_VER_FLAG -miphoneos-version-min)
     set(DARWIN_ios_SANITIZER_MIN_VER_FLAG
-      ${DARWIN_ios_MIN_VER_FLAG}=8.0)
+      ${DARWIN_ios_MIN_VER_FLAG}=7.0)
   endif()
   if(COMPILER_RT_ENABLE_WATCHOS)
     list(APPEND DARWIN_EMBEDDED_PLATFORMS watchos)


clean up the main CMakeLists.txt

clean up the main CMakeLists.txt

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@2798 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -8,6 +8,12 @@
 #if(EXISTS ${RPM_PROGRAM})
 #  list(APPEND CPACK_GENERATOR "RPM")
 #endif(EXISTS ${RPM_PROGRAM})
+
+set(CPACK_PACKAGE_VERSION "${PCL_VERSION}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${PCL_MAJOR_VERSION}")
+set(CPACK_PACKAGE_VERSION_MINOR "${PCL_MINOR_VERSION}")
+set(CPACK_PACKAGE_VERSION_PATCH "${PCL_REVISION_VERSION}")
+set(CPACK_PACKAGE_CONFIG_INSTALL_DIR ${PCLCONFIG_INSTALL_DIR})

 # DEB
 if("${CMAKE_SYSTEM}" MATCHES "Linux")
@@ -23,6 +29,18 @@
   if(EXISTS ${NSIS_PROGRAM})
     list(APPEND CPACK_GENERATOR "NSIS")
   endif(EXISTS ${NSIS_PROGRAM})
+  if(CMAKE_CL_64)
+    set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
+    set(win_system_name win64)
+  else(CMAKE_CL_64)
+    set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES32")
+    set(win_system_name win32)
+  endif(CMAKE_CL_64)
+  set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION}-${win_system_name}")
+  # force CPACK_PACKAGE_INSTALL_REGISTRY_KEY because of a known limitation in cmake/cpack to be fixed in next releases
+  # http://public.kitware.com/Bug/view.php?id=9094
+  # This is to allow a 32bit and a 64bit of PCL to get installed on one system
+  set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${PROJECT_NAME} ${PCL_VERSION} ${win_system_name}" )
 endif()

 # dpkg


CMake: use response files

CMake: use response files

As Mbed OS is built as whole, we have long paths again. This is known issue with windows. To fix the paths, we need to use response files.

Ninja is special, needs to be forced to use long paths.

--- cmake/toolchain.cmake
+++ cmake/toolchain.cmake
@@ -76,3 +76,22 @@
 set(CMAKE_ASM_FLAGS_DEBUG "" CACHE STRING "" FORCE)
 set(CMAKE_ASM_FLAGS_RELEASE "" CACHE STRING "" FORCE)
 set(CMAKE_ASM_FLAGS_RELWITHDEBINFO "" CACHE STRING "" FORCE)
+
+# Use response files always
+set(CMAKE_ASM_USE_RESPONSE_FILE_FOR_INCLUDES 1)
+set(CMAKE_C_USE_RESPONSE_FILE_FOR_INCLUDES 1)
+set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 1)
+
+set(CMAKE_ASM_USE_RESPONSE_FILE_FOR_OBJECTS 1)
+set(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
+set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
+
+set(CMAKE_ASM_USE_RESPONSE_FILE_FOR_LIBRARIES 1)
+set(CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES 1)
+set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES 1)
+
+# Ninja requires to be forced for response files
+if ("${CMAKE_GENERATOR}" MATCHES "Ninja")
+    set(CMAKE_NINJA_FORCE_RESPONSE_FILE 1 CACHE INTERNAL "")
+endif()
+


add "-fPIC" to CMAKE_Fortran_FLAGS

add "-fPIC" to CMAKE_Fortran_FLAGS

--- flags/fpic.cmake
+++ flags/fpic.cmake
@@ -15,7 +15,9 @@
 if(_not_android)
   polly_add_cache_flag(CMAKE_CXX_FLAGS "-fPIC")
   polly_add_cache_flag(CMAKE_C_FLAGS "-fPIC")
+  polly_add_cache_flag(CMAKE_Fortran_FLAGS "-fPIC")
 else()
   polly_add_cache_flag(CMAKE_CXX_FLAGS_INIT "-fPIC")
   polly_add_cache_flag(CMAKE_C_FLAGS_INIT "-fPIC")
+  polly_add_cache_flag(CMAKE_Fortran_FLAGS_INIT "-fPIC")
 endif()


Cmake build checks for C++14 compiler support.

--- EnableCPP11.cmake
+++ EnableCPP11.cmake
@@ -1,9 +1,17 @@

 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
 	include(CheckCXXCompilerFlag)
+	check_cxx_compiler_flag(--std=c++14 SUPPORTS_STD_CXX14)
+	check_cxx_compiler_flag(--std=c++1y SUPPORTS_STD_CXX1Y)
 	check_cxx_compiler_flag(--std=c++11 SUPPORTS_STD_CXX11)
 	check_cxx_compiler_flag(--std=c++0x SUPPORTS_STD_CXX0X)
-	if(SUPPORTS_STD_CXX11)
+	if(SUPPORTS_STD_CXX14)
+		message("-- Enabling C++14 support with --std=c++14.")
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++14")
+	elseif(SUPPORTS_STD_CXX1Y)
+		message("-- Enabling C++14 support with --std=c++1y.")
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++1y")
+	elseif(SUPPORTS_STD_CXX11)
 		message("-- Enabling C++11 support with --std=c++11.")
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
 	elseif(SUPPORTS_STD_CXX0X)


Fix issues with libpng for good

Fix issues with libpng for good

Add "prusaslicer_" prefix to static libpng in deps

--- deps/PNG/PNG.cmake
+++ deps/PNG/PNG.cmake
@@ -5,6 +5,7 @@
     CMAKE_ARGS
         -DPNG_SHARED=OFF
         -DPNG_STATIC=ON
+        -DPNG_PREFIX=prusaslicer_
         -DPNG_TESTS=OFF
 )


Fixes apple

Fixes apple

--- config/Compiler.cmake
+++ config/Compiler.cmake
@@ -11,7 +11,7 @@
     else()
         message(FATAL_ERROR "Atlas requires Visual Studio 12 or 14 to run.")
     endif()
-elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
     set(ATLAS_COMPILER_CLANG 1)
     message(STATUS "Using Clang...")
 elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")


From Mattias Helsing, "I just made Find3rdPartyDependencies search for curllib if it can't
find libcurl. Mike's 3rdParty only has curllib.

I realize now that the in appended file I have earlier removed
searching for freetype219 since I have it but it will break the build
of osg."

--- CMakeModules/Find3rdPartyDependencies.cmake
+++ CMakeModules/Find3rdPartyDependencies.cmake
@@ -52,14 +52,14 @@

 MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
         FIND_DEPENDENCY(TIFF tiff.h libtiff ${OSG_3RDPARTY_BIN} "D")
-        FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype219;freetype234;freetype234MT;freetype235" ${OSG_3RDPARTY_BIN} "_D")
+        FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype234;freetype234MT;freetype235" ${OSG_3RDPARTY_BIN} "_D")
         IF(FREETYPE_FOUND)
             #forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
             SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "")
             SET(FREETYPE_INCLUDE_DIR_freetype2 ${FREETYPE_INCLUDE_DIR} CACHE PATH "")
             MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
         ENDIF(FREETYPE_FOUND)
-        FIND_DEPENDENCY(CURL curl/curl.h libcurl ${OSG_3RDPARTY_BIN} "D")
+        FIND_DEPENDENCY(CURL curl/curl.h "libcurl;curllib" ${OSG_3RDPARTY_BIN} "D")
         FIND_DEPENDENCY(JPEG jpeglib.h libjpeg ${OSG_3RDPARTY_BIN} "D")
         #FIND_DEPENDENCY(GDAL gdal.h "gdal;gdal_i" ${OSG_3RDPARTY_BIN})
         FIND_DEPENDENCY(GLUT GL/glut.h glut32 ${OSG_3RDPARTY_BIN} "D")


May have finally got copying resource files truly working right.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -15,10 +15,11 @@

   if ("${ARGN}" STREQUAL "")
     #    message("No sources for ${target}")
-    file(GLOB_RECURSE SOURCES source/*.cpp source/*.mm source/*.m source/*.c)
+    file(GLOB_RECURSE CURRENT_SOURCES source/*.cpp source/*.mm source/*.m source/*.c)

     file(GLOB_RECURSE HEADERS source/*.h)
-    add_library(${target} ${SOURCES} ${HEADERS})
+    set(CURRENT_SOURCES ${CURRENT_SOURCES} PARENT_SCOPE)
+    add_library(${target} ${CURRENT_SOURCES} ${HEADERS})
   else ()
     add_library(${target} ${ARGN})
   endif ()
@@ -174,8 +175,8 @@

 macro(add_resources resources_dir)

+  file(GLOB_RECURSE BUNDLE_RESOURCES ${resources_dir}/*)
   if (IOS)
-    file(GLOB_RECURSE BUNDLE_RESOURCES ${resources_dir}/*)
     add_executable("${CURRENT_TARGET}_resources" MACOSX_BUNDLE ${BUNDLE_RESOURCES})
     get_filename_component(base_path ${resources_dir} ABSOLUTE)

@@ -193,9 +194,33 @@
     set(ALL_RESOURCES "${ALL_RESOURCES} BUNDLE_RESOURCES" PARENT_SCOPE)
   else ()
     #MESSAGE(WARNING "${CMAKE_CURRENT_LIST_DIR}/${resource_dir} $<TARGET_FILE_DIR:${CURRENT_TARGET}>/${resources_dir}")
-    add_custom_command(TARGET ${CURRENT_TARGET} POST_BUILD
+
+    #    add_custom_target(
+    #      ${CURRENT_TARGET}_resources
+    #      DEPENDS ${BUNDLE_RESOURCES}
+    #      VERBATIM
+    #    )
+
+    #    add_dependencies(${CURRENT_TARGET} ${CURRENT_TARGET}_resources)
+    list(GET CURRENT_SOURCES 0 FIRST_SOURCE)
+#    message("${CURRENT_SOURCES}")
+#    message("first: ${FIRST_SOURCE}")
+#      message("${BUNDLE_RESOURCES}")
+    set_source_files_properties(${FIRST_SOURCE} PROPERTIES OBJECT_DEPENDS "${BUNDLE_RESOURCES}")
+
+    add_custom_command(TARGET ${CURRENT_TARGET}
       COMMAND ${CMAKE_COMMAND} -E copy_directory
-      ${CMAKE_CURRENT_LIST_DIR}/${resources_dir} $<TARGET_FILE_DIR:${CURRENT_TARGET}>/${resources_dir})
+      ${CMAKE_CURRENT_LIST_DIR}/${resources_dir} $<TARGET_FILE_DIR:${CURRENT_TARGET}>/${resources_dir}
+      COMMENT "Copying ${CURRENT_TARGET} files"
+      )
+
+    #    get_property(output_dir TARGET ${CURRENT_TARGET} PROPERTY LOCATION)
+    #message("$<TARGET_FILE_DIR:${CURRENT_TARGET}>/$")
+    #      print_info()
+    #    file(COPY
+    #      ${CMAKE_CURRENT_LIST_DIR}/${resources_dir}
+    #      DESTINATION ${EXECUTABLE_OUTPUT_PATH}/${resources_dir}
+    #      )
   endif ()

 endmacro(add_resources)
@@ -241,7 +266,7 @@
     endif ()

   endif ()
-#  message("${path} ${name} ${extension}")
+  #  message("${path} ${name} ${extension}")
   if (path AND EXISTS ${path}/${name}.${extension})
   else ()
     string(SUBSTRING "${name}" 0 3 libprefix)


Add QmitkSceneViewer

Add QmitkSceneViewer

--- Qmitk/files.cmake
+++ Qmitk/files.cmake
@@ -43,6 +43,11 @@
   QmitkPropertyObservers/QmitkStringPropertyEditor.cpp
   QmitkPropertyObservers/QmitkStringPropertyOnDemandEdit.cpp
   QmitkPropertyObservers/QmitkStringPropertyView.cpp
+  QmitkPropertyObservers/QmitkSceneListView.cpp
+  QmitkPropertyObservers/QmitkBoolPropertyObserver.cpp
+  QmitkPropertyObservers/QmitkSceneListViewGroupItem.cpp
+  QmitkPropertyObservers/QmitkSceneListViewItem.cpp
+  QmitkPropertyObservers/QmitkStringPropertyObserver.cpp
   QmitkRenderingManager.cpp
   QmitkRenderingManagerFactory.cpp
   QmitkRenderWindow.cpp


[FIX] added CUDA support to Xcode

[FIX] added CUDA support to Xcode

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@13024 e6417c60-b987-48fd-844e-b20f0fcc1017

--- seqan/util/cmake/cuda/FindCUDA.cmake
+++ seqan/util/cmake/cuda/FindCUDA.cmake
@@ -351,7 +351,7 @@
 ###############################################################################

 # Allow the user to specify if the device code is supposed to be 32 or 64 bit.
-if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+if((NOT DEFINED CMAKE_SIZEOF_VOID_P) OR (CMAKE_SIZEOF_VOID_P EQUAL 8))
   set(CUDA_64_BIT_DEVICE_CODE_DEFAULT ON)
 else()
   set(CUDA_64_BIT_DEVICE_CODE_DEFAULT OFF)
@@ -586,6 +586,9 @@
   if(_cuda_path_to_cudart)
     list(APPEND CUDA_LIBRARIES -Wl,-rpath "-Wl,${_cuda_path_to_cudart}")
   endif()
+  find_library(CUDA_CUDA_LIBRARY_FW Cuda)
+  mark_as_advanced(CUDA_CUDA_LIBRARY_FW)
+  list(APPEND CUDA_LIBRARIES ${CUDA_CUDA_LIBRARY_FW})
 endif()

 # 1.1 toolkit on linux doesn't appear to have a separate library on


in cmake, to stop warnings, find_package wants a string, not a macro.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -247,7 +247,7 @@
 	message(STATUS "OpenMP support will be disabled on Windows until we have a chance to fix the installer to support it")
 	# TJ: 8.5.8 disabling OpenMP on Windows because it adds a dependency on an additional merge module for VCOMP110.DLL
 else()
-	find_package (OpenMP)
+	find_package ("OpenMP")
 endif()

 if (FIPS_BUILD)


Fix shellcheck install on fresh setup.

Fix shellcheck install on fresh setup.

If shellcheck got installed before other test dependencies, the bin
directory didn't exist, causing an error during install.

--- build/cmake/test/shellcheck.cmake
+++ build/cmake/test/shellcheck.cmake
@@ -7,5 +7,6 @@
   BUILD_COMMAND cabal sandbox init
     COMMAND cabal update
     COMMAND cabal install --reinstall --disable-library-profiling --disable-profiling --disable-optimization --disable-tests --disable-coverage --disable-benchmarks --disable-documentation
-  INSTALL_COMMAND cp <SOURCE_DIR>/.cabal-sandbox/bin/shellcheck ${TEST_INSTALL_PREFIX}/bin/
+  INSTALL_COMMAND mkdir -p ${TEST_INSTALL_PREFIX}/bin
+    COMMAND cp <SOURCE_DIR>/.cabal-sandbox/bin/shellcheck ${TEST_INSTALL_PREFIX}/bin/
 )


Tidy builds for mbed LPC11U24

Tidy builds for mbed LPC11U24

--- Source/PLT/target/mbedLPC11U24/config.cmake
+++ Source/PLT/target/mbedLPC11U24/config.cmake
@@ -60,10 +60,10 @@
 set(CMAKE_EXECUTABLE_SUFFIX   .axf)

 set(CMAKE_C_LINK_EXECUTABLE
-    "${PLT_prefix}ld ${PLT_ld_flags} <OBJECTS> -o <TARGET> <LINK_LIBRARIES>; \
-     ${CMAKE_OBJCOPY} -O binary <TARGET> <TARGET>.bin; \
-     ${CMAKE_OBJDUMP} -d <TARGET>; \
-     ${CMAKE_SIZE} <TARGET>")
+    "${PLT_prefix}ld ${PLT_ld_flags} <OBJECTS> -o <TARGET>.elf <LINK_LIBRARIES>; \
+     ${CMAKE_OBJCOPY} -O binary <TARGET>.elf <TARGET>.bin; \
+     ${CMAKE_SOURCE_DIR}/Platform/objdump.py -b ${CMAKE_OBJDUMP} <TARGET>.elf; \
+     ${CMAKE_SIZE} <TARGET>.elf")

 set(CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE})


fixed: list->string conversion

fixed: list->string conversion

--- share/hugh/cmake/compiler/msvc.cmake
+++ share/hugh/cmake/compiler/msvc.cmake
@@ -42,7 +42,7 @@
 # unreachable code (somewhere in boost)
 list(APPEND DISABLED_WARNINGS "/wd4702")

-string(REGEX REPLACE ";" " " DISABLED_WARNINGS "${DISABLED_WARNINGS}") # ";" -> " "
+separate_arguments(DISABLED_WARNINGS)

 set(GLOBAL_COMPILER_FLAGS)
 set(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} /W4")  # warn almost everything


Fix compilation for MSVC10 (could not find inc folder)

--- adm/cmake/OccBuildKit.cmake
+++ adm/cmake/OccBuildKit.cmake
@@ -55,7 +55,7 @@
 	SET(TOOLKIT_HEADER_FILES ${TOOLKIT_HEADER_FILES} ${header_files})
 	# required include paths
 	SET(TARGET_INCLUDE_DIRECTORIES
-		"${TARGET_INCLUDE_DIRECTORIES} -I${OpenCASCADE_SOURCE_DIR}/src/${MODULE} -I${OpenCASCADE_SOURCE_DIR}/drv/${MODULE} ")
+		"${TARGET_INCLUDE_DIRECTORIES} -I${OpenCASCADE_SOURCE_DIR}/src/${MODULE} -I${OpenCASCADE_SOURCE_DIR}/drv/${MODULE} -I${OpenCASCADE_SOURCE_DIR}/inc ")
 ENDFOREACH(MODULE ${TOOLKIT_MODULES})
 ADD_LIBRARY(${TOOLKIT} ${OPENCASCADE_LIBRARY_TYPE} ${TOOLKIT_SOURCE_FILES})
 # TODO Add current toolkit header files into a source group?


skip generic os check (#292)

skip generic os check (#292)

--- conan.cmake
+++ conan.cmake
@@ -97,7 +97,7 @@
         set(_CONAN_SETTING_ARCH ${ARGUMENTS_ARCH})
     endif()
     #handle -s os setting
-    if(CMAKE_SYSTEM_NAME)
+    if(CMAKE_SYSTEM_NAME AND NOT CMAKE_SYSTEM_NAME STREQUAL "Generic")
         #use default conan os setting if CMAKE_SYSTEM_NAME is not defined
         set(CONAN_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
         if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")


Start using -fno-strict-aliasing to fix alignment bug when Eigen uses avx

Former-commit-id: afc8eff0fd0bb4147dd6fffb23886fc4fcf1425b

--- cmake-modules/CompilerFlags.cmake
+++ cmake-modules/CompilerFlags.cmake
@@ -24,16 +24,41 @@
 endif()

-###########################################
-###  Apply RELEASE/DEBUG compile flags  ###
-###########################################
+######################################################################################
+###                   Apply RELEASE/DEBUG compile flags                            ###
+######################################################################################
+# I have benchmarked the compiler flags below
+#        -fstack-protector
+#        -D_FORTIFY_SOURCE=2
+#        -fno-omit-frame-pointer
+#        -fno-strict-aliasing
+# and found that there is NO significant performance difference in tensor contractions.
+# These were the results from Tensorbench, best of 2 runs,
+# variability between runs ~0.3 seconds.
+# (all with -O3 -mfma -DNDEBUG -march=native -mtune=native):
+# 19.3789 s: -fstack-protector
+# 19.2768 s: -fstack-protector -fno-omit-frame-pointer -fno-strict-aliasing
+# 19.6200 s: -fstack-protector -fno-omit-frame-pointer -fno-strict-aliasing -D_FORTIFY_SOURCE=2
+# 19.3540 s: (none)
+#
+# In particular, -fno-strict-aliasing fixes a bug in tensor shuffle using -O3 -DNDEBUG
+# in gcc 10.0.1. The bug causes the dimensions to blow up when assigning the shuffling
+# operation to a new tensor, such as in:
+#       Eigen::Tensor<Scalar, 3> mps_shuffled = mps.shuffle(Textra::array3{1, 0, 2});
+# Since the dimensions become kind of random (and not near the limits of int/long),
+# I believe gcc-10 is simply reordering something it shouldn't, thus assigning
+# uninitialized values on these dimensions.
+# The bug was hard to track down, and could be fixed by various other flags that
+# hurt performance more, like -mno-avx, removing -DNDEBUG, or lowering -O3 to -O2.
+######################################################################################
 if(CXX_MARCH)
     message(STATUS "Using microarchitechture: ${CXX_MARCH}")
     list(APPEND CMAKE_CXX_FLAGS            -march=${CXX_MARCH} -mtune=${CXX_MARCH})
 endif()
+
 list(APPEND CMAKE_CXX_FLAGS                )
-list(APPEND CMAKE_CXX_FLAGS_RELEASE        )
-list(APPEND CMAKE_CXX_FLAGS_DEBUG          -fstack-protector -D_FORTIFY_SOURCE=2) #-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
+list(APPEND CMAKE_CXX_FLAGS_RELEASE  -g -O3 -fno-omit-frame-pointer -fno-strict-aliasing -fstack-protector -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wpedantic)
+list(APPEND CMAKE_CXX_FLAGS_DEBUG    -g -O0 -fno-omit-frame-pointer -fno-strict-aliasing -fstack-protector -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wpedantic) #-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
 list(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO )
 list(APPEND CMAKE_CXX_FLAGS_MINSIZEREL)


Replace \n with \\n of git commit message to prevent generating invalid JSON files

--- cmake/CoverallsGenerateGcov.cmake
+++ cmake/CoverallsGenerateGcov.cmake
@@ -130,6 +130,8 @@
 	git_log_format(ce GIT_COMMITTER_EMAIL)
 	git_log_format(B GIT_COMMIT_MESSAGE)
 	git_log_format(H GIT_COMMIT_HASH)
+
+	string(REPLACE "\n" "\\n" GIT_COMMIT_MESSAGE ${GIT_COMMIT_MESSAGE})

 	message("Git exe: ${GIT_EXECUTABLE}")
 	message("Git branch: ${GIT_BRANCH}")


Use the same sonames in cmake as in configure

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -39,7 +39,7 @@
 if(soversion)
   set(ROOT_LIBRARY_PROPERTIES ${ROOT_LIBRARY_PROPERTIES}
       VERSION ${ROOT_VERSION}
-      SOVERSION ${ROOT_MAJOR_VERSION}
+      SOVERSION ${ROOT_MAJOR_VERSION}.${ROOT_MINOR_VERSION}
       SUFFIX ${libsuffix}
       PREFIX ${libprefix} )
 else()


Fix google tests for dataframe on Windows

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -1305,6 +1305,11 @@
   # to implement because some ROOT components create more than one library.
   ROOT_EXECUTABLE(${test_suite} ${source_files} LIBRARIES ${ARG_LIBRARIES})
   target_link_libraries(${test_suite} gtest gtest_main gmock gmock_main)
+  if(MSVC)
+    set(test_exports "/EXPORT:_Init_thread_abort /EXPORT:_Init_thread_epoch
+        /EXPORT:_Init_thread_footer /EXPORT:_Init_thread_header /EXPORT:_tls_index")
+    set_property(TARGET ${test_suite} APPEND_STRING PROPERTY LINK_FLAGS ${test_exports})
+  endif()

   ROOT_PATH_TO_STRING(mangled_name ${test_suite} PATH_SEPARATOR_REPLACEMENT "-")
   ROOT_ADD_TEST(gtest${mangled_name} COMMAND ${test_suite} WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR})


changes to ensure compilation issues in windows is fixed by disabling the level 3 warning 4267 (#5147)

while a more permanent fix is found

Co-authored-by: sfatimar <f5986f0de9d2b1f55c434cc95efc2e1df8f90cab@intel/com>


Squashed '3rdparty/github/cmake-utils/' changes from 6df21ca9..a63aebdc

a63aebdc Support of EMBEDDED keyword
a4548255 Support of EMBEDDED keyword

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


Updated the repacker invocation to use quiet_cmd.sh

Signed-off-by: Maciej Kurc <572803cc6e8d7bb35033942e4b03254951a2e0d6@antmicro.com>

--- quicklogic/common/cmake/quicklogic_qlf_arch.cmake
+++ quicklogic/common/cmake/quicklogic_qlf_arch.cmake
@@ -57,8 +57,8 @@
     NET_PATCH_TOOL
       ${symbiflow-arch-defs_SOURCE_DIR}/quicklogic/qlf_k4n8/utils/repacker/repack.py
     NET_PATCH_TOOL_CMD "${CMAKE_COMMAND} -E env \
-     PYTHONPATH=${symbiflow-arch-defs_SOURCE_DIR}/utils \
-     \${PYTHON3} \${NET_PATCH_TOOL} \
+      PYTHONPATH=${symbiflow-arch-defs_SOURCE_DIR}/utils \
+      \${QUIET_CMD} \${PYTHON3} \${NET_PATCH_TOOL} \
          --net-in \${IN_NET} \
          --eblif-in \${IN_EBLIF} \
          --place-in \${IN_PLACE} \
@@ -66,6 +66,8 @@
          --eblif-out \${OUT_EBLIF} \
          --place-out \${OUT_PLACE} \
          --vpr-arch \${VPR_ARCH} \
+         --log \${OUT_NET}.log \
+         --log-level DEBUG \
          --absorb_buffer_luts on"

     # With the current support there is no bitstream generation support yet.


detect int128

detect int128

--- cmake/lib.cmake
+++ cmake/lib.cmake
@@ -1,6 +1,13 @@
 if(WIN32 OR MSVC)
     set(SECP256K1_USE_CMAKE 1)
+    include(CheckTypeSize)
+    check_type_size("__int128" SIZEOF_INT128 BUILTIN_TYPES_ONLY)
+    if(SIZEOF_INT128)
+        add_definitions(-D__HAS_INT128__=1)
+    endif()
 endif()
+
+
 include(cmake/secp256k1.cmake)
 include(cmake/libscrypt.cmake)
 include(cmake/core.cmake)


fix include for glog

fix include for glog

--- cmake/ten.cmake
+++ cmake/ten.cmake
@@ -7,10 +7,10 @@
 include_directories(${CWD}/..) # for boost.context
 include_directories(${CWD}/../jansson)
 include_directories(${CWD}/../msgpack)
+include_directories(${CWD}/../glog)

 file(RELATIVE_PATH REL ${CMAKE_CURRENT_SOURCE_DIR} ${CWD}/..)
-get_filename_component(LIBTEN_INC ${CMAKE_CURRENT_BINARY_DIR}/${REL}/include ABSOLUTE)
-get_filename_component(LIBTEN_LIB ${CMAKE_CURRENT_BINARY_DIR}/${REL}/lib ABSOLUTE)
-
-include_directories(${LIBTEN_INC})
-link_directories(${LIBTEN_LIB})
+#get_filename_component(LIBTEN_INC ${CMAKE_CURRENT_BINARY_DIR}/${REL}/include ABSOLUTE)
+#get_filename_component(LIBTEN_LIB ${CMAKE_CURRENT_BINARY_DIR}/${REL}/lib ABSOLUTE)
+#include_directories(${LIBTEN_INC})
+#link_directories(${LIBTEN_LIB})


Refactor out the creation of the benchmark libraries into a helper routine swift_benchmark_library. Initially just use it for DriverUtils.

This will allow for per-benchmark flags to be added.

rdar://34556274

--- benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+++ benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
@@ -20,6 +20,57 @@
   set(${RUNCMD_VARIABLE} ${${RUNCMD_VARIABLE}} PARENT_SCOPE)
 endfunction(runcmd)

+function (swift_benchmark_library objfile_out sibfile_out)
+  cmake_parse_arguments(BENCHLIB "" "MODULE_PATH;SOURCE_DIR;OBJECT_DIR" "SOURCES;LIBRARY_FLAGS" ${ARGN})
+
+  precondition(BENCHLIB_MODULE_PATH)
+  precondition(BENCHLIB_SOURCE_DIR)
+  precondition(BENCHLIB_OBJECT_DIR)
+  precondition(BENCHLIB_SOURCES)
+
+  set(module_name_path "${BENCHLIB_MODULE_PATH}")
+  get_filename_component(module_name "${module_name_path}" NAME)
+  set(srcdir "${BENCHLIB_SOURCE_DIR}")
+  set(objdir "${BENCHLIB_OBJECT_DIR}")
+  set(sources "${BENCHLIB_SOURCES}")
+
+  set(objfile "${objdir}/${module_name}.o")
+  set(swiftmodule "${objdir}/${module_name}.swiftmodule")
+
+  precondition(objfile_out)
+  add_custom_command(
+    OUTPUT "${objfile}"
+    DEPENDS ${stdlib_dependencies} ${sources}
+    COMMAND "${SWIFT_EXEC}"
+      ${BENCHLIB_LIBRARY_FLAGS}
+      "-force-single-frontend-invocation"
+      "-parse-as-library"
+      "-module-name" "${module_name}"
+      "-emit-module" "-emit-module-path" "${swiftmodule}"
+      "-o" "${objfile}"
+      ${sources})
+  set(${objfile_out} "${objfile}" PARENT_SCOPE)
+
+  if(SWIFT_BENCHMARK_EMIT_SIB)
+    precondition(sibfile_out)
+    set(sibfile "${objdir}/${module_name}.sib")
+
+    add_custom_command(
+      OUTPUT "${sibfile}"
+      DEPENDS
+      ${stdlib_dependencies} ${sources}
+      COMMAND "${SWIFT_EXEC}"
+        ${BENCHLIB_LIBRARY_FLAGS}
+        "-force-single-frontend-invocation"
+        "-parse-as-library"
+        "-module-name" "${module_name}"
+        "-emit-sib"
+        "-o" "${sibfile}"
+        ${sources})
+    set(sibfile_out "${sibfile}" PARENT_SCOPE)
+  endif()
+endfunction()
+
 function (swift_benchmark_compile_archopts)
   cmake_parse_arguments(BENCH_COMPILE_ARCHOPTS "" "PLATFORM;ARCH;OPT" "" ${ARGN})
   set(sdk ${${BENCH_COMPILE_ARCHOPTS_PLATFORM}_sdk})
@@ -67,45 +118,26 @@
   set(bench_library_objects)
   set(bench_library_sibfiles)
   foreach(module_name_path ${BENCH_DRIVER_LIBRARY_MODULES})
+    set(sources "${srcdir}/${module_name_path}.swift")
+
     get_filename_component(module_name "${module_name_path}" NAME)
-
     if("${module_name}" STREQUAL "DriverUtils")
-      set(extra_sources "${srcdir}/utils/ArgParse.swift")
-    endif()
-
-    set(objfile "${objdir}/${module_name}.o")
-    set(swiftmodule "${objdir}/${module_name}.swiftmodule")
-    list(APPEND bench_library_objects "${objfile}")
-    set(source "${srcdir}/${module_name_path}.swift")
-    add_custom_command(
-        OUTPUT "${objfile}"
-        DEPENDS ${stdlib_dependencies} "${source}" ${extra_sources}
-        COMMAND "${SWIFT_EXEC}"
-        ${common_options_driver}
-        ${BENCH_DRIVER_LIBRARY_FLAGS}
-        "-force-single-frontend-invocation"
-        "-parse-as-library"
-        "-module-name" "${module_name}"
-        "-emit-module" "-emit-module-path" "${swiftmodule}"
-        "-o" "${objfile}"
-        "${source}" ${extra_sources})
-    if(SWIFT_BENCHMARK_EMIT_SIB)
-      set(sibfile "${objdir}/${module_name}.sib")
-      list(APPEND bench_library_sibfiles "${sibfile}")
-      add_custom_command(
-          OUTPUT "${sibfile}"
-          DEPENDS
-            ${stdlib_dependencies} "${srcdir}/${module_name_path}.swift"
-            ${extra_sources}
-          COMMAND "${SWIFT_EXEC}"
-          ${common_options_driver}
-          ${BENCH_DRIVER_LIBRARY_FLAGS}
-          "-force-single-frontend-invocation"
-          "-parse-as-library"
-          "-module-name" "${module_name}"
-          "-emit-sib"
-          "-o" "${sibfile}"
-          "${source}" ${extra_sources})
+      list(APPEND sources "${srcdir}/utils/ArgParse.swift")
+    endif()
+
+    set(objfile_out)
+    set(sibfile_out)
+    swift_benchmark_library(objfile_out sibfile_out
+      MODULE_PATH "${module_name_path}"
+      SOURCE_DIR "${srcdir}"
+      OBJECT_DIR "${objdir}"
+      SOURCES ${sources}
+      LIBRARY_FLAGS ${common_options_driver} ${BENCH_DRIVER_LIBRARY_FLAGS})
+    precondition(objfile_out)
+    list(APPEND bench_library_objects "${objfile_out}")
+    if (SWIFT_BENCHMARK_EMIT_SUB)
+      precondition(sibfile_out)
+      list(APPEND bench_library_subfiles "${sibfile_out}")
     endif()
   endforeach()


botan: Update filename for bundle

botan: Update filename for bundle

--- cmake/botan.cmake
+++ cmake/botan.cmake
@@ -4,7 +4,7 @@
 include(ExternalProject)
 ExternalProject_Add(botan
         PREFIX botan
-        URL https://github.com/includeos/botan/releases/download/inc-2.0/botan-includeos.tar.gz
+        URL https://github.com/includeos/botan/releases/download/inc-2.0/botan-includeos-i686.tar.gz
         URL_HASH MD5=5ef7f26047f8fe17219f62755938621d
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ""


refine cblas.cmake

refine cblas.cmake

--- cmake/cblas.cmake
+++ cmake/cblas.cmake
@@ -33,20 +33,18 @@
   ${MKL_ROOT}/lib
   ${MKL_ROOT}/lib/intel64)

-if(MKL_INC_DIR AND MKL_CORE_LIB AND MKL_SEQUENTIAL_LIB AND MKL_INTEL_LP64)
+if(MKL_LAPACK_INC_DIR AND MKL_INC_DIR AND MKL_CORE_LIB AND MKL_SEQUENTIAL_LIB AND MKL_INTEL_LP64)
+  set(CBLAS_FOUND ON)
   set(CBLAS_PROVIDER MKL)
-  set(CBLAS_INC_DIR ${MKL_INC_DIR})
-  set(CBLAS_LIBRARIES ${MKL_INTEL_LP64}
-          ${MKL_SEQUENTIAL_LIB}
-          ${MKL_CORE_LIB})
+  set(CBLAS_INC_DIR ${MKL_INC_DIR} ${MKL_LAPACK_INC_DIR})
+  set(CBLAS_LIBRARIES ${MKL_INTEL_LP64} ${MKL_SEQUENTIAL_LIB} ${MKL_CORE_LIB})
+
   add_definitions(-DPADDLE_USE_MKL)
   add_definitions(-DLAPACK_FOUND)
-  message(STATUS "Found MKL (include: ${CBLAS_INC_DIR}, library: ${CBLAS_LIBRARIES})")
-  set(CBLAS_FOUND ON)
-  if(${MKL_LAPACK_INC_DIR})
-    message(STATUS "Found lapack in MKL (include: ${MKL_LAPACK_INC_DIR})")
-  endif()
-  return() # return file.
+
+  message(STATUS "Found MKL (include: ${MKL_INC_DIR}, library: ${CBLAS_LIBRARIES})")
+  message(STATUS "Found lapack in MKL (include: ${MKL_LAPACK_INC_DIR})")
+  return()
 endif()

 ## Then find atlas.
@@ -68,21 +66,20 @@
   PATHS ${ATLAS_INCLUDE_SEARCH_PATHS})
 find_library(ATLAS_CBLAS_LIB NAMES cblas libcblas.so.3
   PATHS ${ATLAS_LIB_SEARCH_PATHS})
-find_library(ATLAS_LIB NAMES lapack_atlas liblapack_atlas.so.3
+find_library(ATLAS_CLAPACK_LIB NAMES lapack_atlas liblapack_atlas.so.3
   PATHS ${ATLAS_LIB_SEARCH_PATHS})

-if(ATLAS_INC_DIR AND ATLAS_CBLAS_LIB AND ATLAS_LIB AND NOT CBLAS_FOUND)
+if(ATLAS_CLAPACK_INC_DIR AND ATLAS_INC_DIR AND ATLAS_CBLAS_LIB AND ATLAS_CLAPACK_LIB)
+  set(CBLAS_FOUND ON)
   set(CBLAS_PROVIDER ATLAS)
-  set(CBLAS_INC_DIR ${ATLAS_INC_DIR})
-  set(CBLAS_LIBRARIES ${ATLAS_LIB} ${ATLAS_CBLAS_LIB})
+  set(CBLAS_INC_DIR ${ATLAS_INC_DIR} ${ATLAS_CLAPACK_INC_DIR})
+  set(CBLAS_LIBRARIES ${ATLAS_CLAPACK_LIB} ${ATLAS_CBLAS_LIB})
+
   add_definitions(-DPADDLE_USE_ATLAS)
   add_definitions(-DLAPACK_FOUND)
-  message(STATUS "Found ATLAS (include: ${CBLAS_INC_DIR}, library: ${CBLAS_LIBRARIES})")
-  set(CBLAS_FOUND ON)
-  if(ATLAS_CLAPACK_INC_DIR)
-    set(CBLAS_INC_DIR ${CBLAS_INC_DIR} ${ATLAS_CLAPACK_INC_DIR})
-    message(STATUS "Found lapack in ATLAS (include: ${ATLAS_CLAPACK_INC_DIR})")
-  endif()
+
+  message(STATUS "Found ATLAS (include: ${ATLAS_INC_DIR}, library: ${CBLAS_LIBRARIES})")
+  message(STATUS "Found lapack in ATLAS (include: ${ATLAS_CLAPACK_INC_DIR})")
   return()
 endif()

@@ -107,16 +104,16 @@
 find_library(OPENBLAS_LIB NAMES openblas
   PATHS ${OPENBLAS_LIB_SEARCH_PATHS})

-if(OPENBLAS_INC_DIR AND OPENBLAS_LIB)
+if(OPENBLAS_LAPACKE_INC_DIR AND OPENBLAS_INC_DIR AND OPENBLAS_LIB)
+  set(CBLAS_FOUND ON)
   set(CBLAS_PROVIDER OPENBLAS)
-  set(CBLAS_INC_DIR ${OPENBLAS_INC_DIR})
+  set(CBLAS_INC_DIR ${OPENBLAS_INC_DIR} ${OPENBLAS_LAPACKE_INC_DIR})
   set(CBLAS_LIBRARIES ${OPENBLAS_LIB})
+
   add_definitions(-DLAPACK_FOUND)
-  message(STATUS "Found OpenBLAS (include: ${CBLAS_INC_DIR}, library: ${CBLAS_LIBRARIES})")
-  set(CBLAS_FOUND ON)
-  if(OPENBLAS_LAPACKE_INC_DIR)
-    message(STATUS "Found lapack in OpenBLAS (include: ${OPENBLAS_LAPACKE_INC_DIR})")
-  endif()
+
+  message(STATUS "Found OpenBLAS (include: ${OPENBLAS_INC_DIR}, library: ${CBLAS_LIBRARIES})")
+  message(STATUS "Found lapack in OpenBLAS (include: ${OPENBLAS_LAPACKE_INC_DIR})")
   return()
 endif()

@@ -145,9 +142,10 @@
         ${REFERENCE_CBLAS_LIB_SEARCH_PATHS})

 if (REFERENCE_CBLAS_INCLUDE_DIR AND REFERENCE_CBLAS_LIBRARY)
+  set(CBLAS_FOUND ON)
   set(CBLAS_PROVIDER REFERENCE)
   set(CBLAS_INC_DIR ${REFERENCE_CBLAS_INCLUDE_DIR})
   set(CBLAS_LIBRARIES ${REFERENCE_CBLAS_LIBRARY})
-  message(STATUS "Found reference-cblas (include: ${CBLAS_INC_DIR}, library: ${CBLAS_LIBS})")
-  set(CBLAS_FOUND ON)
+
+  message(STATUS "Found reference-cblas (include: ${CBLAS_INC_DIR}, library: ${CBLAS_LIBRARIES})")
 endif()


Fix Qt search for macOS.

Fix Qt search for macOS.

--- cmake/macos.cmake
+++ cmake/macos.cmake
@@ -35,7 +35,7 @@
 # Homebrew has issues, fix it
 macro(add_homebrew_qt_prefix_path)
     if (APPLE)
-        file (GLOB dirs  /usr/local/Cellar/qt/* /usr/local/Cellar/qt@5/*)
+        file (GLOB dirs /usr/local/Cellar/qt@5/*)
         list(APPEND CMAKE_PREFIX_PATH ${dirs})
     endif()
 endmacro()


cmake: Change PATCH computation

cmake: Change PATCH computation

now extract it from `git describe --tags`

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -6,18 +6,21 @@
   else()
     # If no tags can be found, it is a git shallow clone
     execute_process(COMMAND
-      ${GIT_EXECUTABLE} describe --tags
-      RESULT_VARIABLE _OUTPUT_VAR
-      OUTPUT_VARIABLE FULL
+      ${GIT_EXECUTABLE} describe --tags --long
+      RESULT_VARIABLE _RESULT_VAR
+      OUTPUT_VARIABLE _FULL_VAR
       ERROR_QUIET
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-    if(NOT _OUTPUT_VAR)
-      execute_process(COMMAND
-        ${GIT_EXECUTABLE} rev-list HEAD --count
-        RESULT_VARIABLE _OUTPUT_VAR
-        OUTPUT_VARIABLE PATCH
-        ERROR_QUIET
-        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+    if(NOT _RESULT_VAR) # since 0 is success, need invert it
+      if(${_FULL_VAR} MATCHES "v[0-9]+\.[0-9]+-([0-9]+)-g.*")
+        set(PATCH ${CMAKE_MATCH_1})
+      else()
+        execute_process(COMMAND
+          ${GIT_EXECUTABLE} rev-list HEAD --count
+          OUTPUT_VARIABLE PATCH
+          ERROR_QUIET
+          WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+      endif()
       STRING(STRIP PATCH ${PATCH})
       STRING(REGEX REPLACE "\n$" "" PATCH ${PATCH})
       STRING(REGEX REPLACE " " "" PATCH ${PATCH})


cleanup cmake config

cleanup cmake config

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -238,12 +238,6 @@
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs")
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftest-coverage")

-        set(CMAKE_REQUIRED_FLAGS "--coverage")
-        CHECK_CXX_SOURCE_COMPILES("${TEST_PROGRAM}" COMPILER_SUPPORTS_COVERAGE)
-        if(COMPILER_SUPPORTS_COVERAGE)
-                set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
-        endif()
-
         to_parent()
 endfunction()


Explicitly search for system boost libraries

Prerequisites.cmake now searches for system + filesystem Boost in
addition to Boost Thread. This seems to be necessary for OSX at least.

All found libraries can be linked using ${Boost_LIBRARIES}

--- src/main/resources/project-files/jace/Prerequisites.cmake
+++ src/main/resources/project-files/jace/Prerequisites.cmake
@@ -64,7 +64,7 @@
 if(WIN32)
   set(BOOST_ROOT ${Boost_INCLUDE_DIR})
 endif(WIN32)
-find_package(Boost COMPONENTS thread REQUIRED)
+find_package(Boost COMPONENTS system filesystem thread REQUIRED)

 # HACK - Make linking to Boost work on Windows systems.
 string(REGEX REPLACE "/[^/]*$" ""


emscripten: add the generel _emsc_pass_data hook to exported functions

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -63,7 +63,7 @@
 set(FIPS_EMSCRIPTEN_LTO_LEVEL 1 CACHE STRING "emscripten: Link-time-optimization level (0..3)")
 set(FIPS_EMSCRIPTEN_OUTLINING_LIMIT 60000 CACHE STRING "emscripten: outlining limit")
 set(FIPS_EMSCRIPTEN_MEM_INIT_METHOD 1 CACHE STRING "emscripten: how to represent initial memory content (0..2)")
-set(FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS "['_main','_enter_fullscreen','_enter_soft_fullscreen']" CACHE STRING "emscripten: exported C function names")
+set(FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS "['_main','_enter_fullscreen','_enter_soft_fullscreen','_emsc_pass_data']" CACHE STRING "emscripten: exported C function names")
 set(FIPS_EMSCRIPTEN_SHELL_HTML "${EMSCRIPTEN_ROOT_PATH}/src/shell_minimal.html" CACHE STRING "emscripten: path to shell html file")
 set(EMSCRIPTEN_TOTAL_MEMORY_WORKER 16777216)


Update FW with SDK update

Update FW with SDK update

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "eb69fc0283cf82608e6eccf6f37b1709a2db8b5b")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "673983dd2b693f267cb3cb11a4247ec4a38a6508")

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


From Pere:
CMake: put liblzma.dll into bin directory, so we can run root.exe from the build (F5).

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@40351 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -74,9 +74,9 @@
 	  PREFIX LZMA
 	  INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND "" BUILD_COMMAND ""
-	  INSTALL_COMMAND cmake -E copy lib/liblzma.dll <INSTALL_DIR>/bin
+	  INSTALL_COMMAND cmake -E copy lib/liblzma.dll <INSTALL_DIR>/bin/${CMAKE_CFG_INTDIR}
 	  BUILD_IN_SOURCE 1)
-    install(FILES ${CMAKE_BINARY_DIR}/bin/liblzma.dll DESTINATION bin)
+    install(FILES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.dll DESTINATION bin)
     set(LZMA_LIBRARIES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.lib)
     set(LZMA_INCLUDE_DIR ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/include)
   else()


Revert "Enable builtin GSL when mathcore=ON, but external GSL is not found"

This reverts commit c4978f1bf0fbeee80900509e5a87fe0fcc069e82.

The reason to revert is that this breaks offline builds of ROOT,
since no check for an active internet connection is performed in
in the build system.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -413,51 +413,44 @@
 endif()

 #---Check for GSL library---------------------------------------------------------------
-if(builtin_gsl)
-  message(STATUS "Using builtin GSL")
-  unset(GSL_FOUND)
-  unset(GSL_FOUND CACHE)
-  set(gsl ON CACHE BOOL "" FORCE)
-elseif(mathmore)
+if(mathmore OR builtin_gsl)
   message(STATUS "Looking for GSL")
-  if(fail-on-missing)
-    find_package(GSL 1.10 REQUIRED)
-    if(NOT GSL_FOUND)
-      message(FATAL_ERROR "Could not find GSL.")
-    endif()
-  else()
+  if(NOT builtin_gsl)
     find_package(GSL 1.10)
     if(NOT GSL_FOUND)
-      message(STATUS "GSL not found, but mathmore support is enabled.")
-      message(STATUS "Using builtin GSL, since mathmore depends on it.")
-      set(gsl ON CACHE BOOL "" FORCE)
-      set(builtin_gsl ON CACHE BOOL "" FORCE)
-    endif()
-  endif()
-endif()
-
-if(gsl AND NOT GSL_FOUND)
-  set(gsl_version 2.1)
-  message(STATUS "Downloading and building GSL version ${gsl_version}")
-  foreach(l gsl gslcblas)
-    set(LIBNAME "${CMAKE_STATIC_LIBRARY_PREFIX}${l}${CMAKE_STATIC_LIBRARY_SUFFIX}")
-    list(APPEND GSL_LIBRARIES "${CMAKE_BINARY_DIR}/lib/${LIBNAME}")
-    unset(LIBNAME)
-  endforeach()
-  ExternalProject_Add(
-    GSL
-    # http://mirror.switch.ch/ftp/mirror/gnu/gsl/gsl-${gsl_version}.tar.gz
-    URL ${lcgpackages}/gsl-${gsl_version}.tar.gz
-    INSTALL_DIR ${CMAKE_BINARY_DIR}
-    CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR>
-                      CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS}
-                      --libdir=<INSTALL_DIR>/lib --enable-shared=no
-    LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
-    BUILD_BYPRODUCTS ${GSL_LIBRARIES}
+      if(fail-on-missing)
+        message(FATAL_ERROR "GSL package not found and 'mathmore' component if required ('fail-on-missing' enabled). "
+                            "Alternatively, you can enable the option 'builtin_gsl' to build the GSL libraries internally.")
+      else()
+        message(STATUS "GSL not found. Set variable GSL_DIR to point to your GSL installation")
+        message(STATUS "               Alternatively, you can also enable the option 'builtin_gsl' to build the GSL libraries internally'")
+        message(STATUS "               For the time being switching OFF 'mathmore' option")
+        set(mathmore OFF CACHE BOOL "" FORCE)
+      endif()
+    endif()
+  else()
+    set(gsl_version 2.1)
+    message(STATUS "Downloading and building GSL version ${gsl_version}")
+    foreach(l gsl gslcblas)
+      list(APPEND GSL_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${l}${CMAKE_STATIC_LIBRARY_SUFFIX})
+    endforeach()
+    ExternalProject_Add(
+      GSL
+      # http://mirror.switch.ch/ftp/mirror/gnu/gsl/gsl-${gsl_version}.tar.gz
+      URL ${lcgpackages}/gsl-${gsl_version}.tar.gz
+      INSTALL_DIR ${CMAKE_BINARY_DIR}
+      CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR>
+                        --libdir=<INSTALL_DIR>/lib
+                        --enable-shared=no
+                        CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS}
+      LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
+      BUILD_BYPRODUCTS ${GSL_LIBRARIES}
     )
-  set(GSL_TARGET GSL)
-  set(mathmore ON CACHE BOOL "" FORCE)
-endif()
+    set(GSL_TARGET GSL)
+    set(mathmore ON CACHE BOOL "" FORCE)
+  endif()
+endif()
+

 #---Check for Python installation-------------------------------------------------------
 if(python OR python3)