fix a bug

fix a bug

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -58,8 +58,10 @@
   cmake_parse_arguments(cc_binary "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
   add_executable(${TARGET_NAME} ${cc_binary_SRCS})
   link_paddle_exe(${TARGET_NAME})
-  target_link_libraries(${TARGET_NAME} ${cc_binary_DEPS})
-  add_dependencies(${TARGET_NAME} ${cc_binary_DEPS})
+  if(cc_binary_DEPS)
+    target_link_libraries(${TARGET_NAME} ${cc_binary_DEPS})
+    add_dependencies(${TARGET_NAME} ${cc_binary_DEPS})
+  endif()
 endfunction(cc_binary)

 # The dependency to target tensor implies that if any of
@@ -76,8 +78,10 @@
   cmake_parse_arguments(cc_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
   add_executable(${TARGET_NAME} ${cc_test_SRCS})
   link_paddle_test(${TARGET_NAME})
-  target_link_libraries(${TARGET_NAME} ${cc_test_DEPS})
-  add_dependencies(${TARGET_NAME} ${cc_test_DEPS})
+  if(cc_test_DEPS)
+    target_link_libraries(${TARGET_NAME} ${cc_test_DEPS})
+    add_dependencies(${TARGET_NAME} ${cc_test_DEPS})
+  endif()
   add_test(${TARGET_NAME} ${TARGET_NAME})
 endfunction(cc_test)

@@ -109,8 +113,10 @@
   cmake_parse_arguments(nv_binary "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
   cuda_add_executable(${TARGET_NAME} ${nv_binary_SRCS})
   link_paddle_exe(${TARGET_NAME})
-  target_link_libraries(${TARGET_NAME} ${nv_binary_DEPS})
-  add_dependencies(${TARGET_NAME} ${nv_binary_DEPS})
+  if(nv_binary_DEPS)
+    target_link_libraries(${TARGET_NAME} ${nv_binary_DEPS})
+    add_dependencies(${TARGET_NAME} ${nv_binary_DEPS})
+  endif()
 endfunction(nv_binary)

 # The dependency to target tensor implies that if any of
@@ -127,7 +133,9 @@
   cmake_parse_arguments(nv_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
   cuda_add_executable(${TARGET_NAME} ${nv_test_SRCS})
   link_paddle_test(${TARGET_NAME})
-  target_link_libraries(${TARGET_NAME} ${nv_test_DEPS})
-  add_dependencies(${TARGET_NAME} ${nv_test_DEPS})
+  if(nv_test_DEPS)
+    target_link_libraries(${TARGET_NAME} ${nv_test_DEPS})
+    add_dependencies(${TARGET_NAME} ${nv_test_DEPS})
+  endif()
   add_test(${TARGET_NAME} ${TARGET_NAME})
 endfunction(nv_test)


cmake: make shield list available to Kconfig

For application portability, it is required that feature activation
is made conditional in shield configuration. This way features remain
controlled on application side.
To enable this we need that list of user activated shield is made
available to Kconfig.

Signed-off-by: Erwan Gouriou <de4d967452b83bb0e37525652734e7d9163b6a4c@linaro.org>

--- cmake/kconfig.cmake
+++ cmake/kconfig.cmake
@@ -42,6 +42,7 @@
 set(ENV{ARCH}      ${ARCH})
 set(ENV{BOARD_DIR} ${BOARD_DIR})
 set(ENV{SOC_DIR}   ${SOC_DIR})
+set(ENV{SHIELD_AS_LIST} "${SHIELD_AS_LIST}")
 set(ENV{CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR})
 set(ENV{ARCH_DIR}   ${ARCH_DIR})
 set(ENV{GENERATED_DTS_BOARD_CONF} ${GENERATED_DTS_BOARD_CONF})
@@ -86,6 +87,7 @@
     ARCH=$ENV{ARCH}
     BOARD_DIR=$ENV{BOARD_DIR}
     SOC_DIR=$ENV{SOC_DIR}
+    SHIELD_AS_LIST=$ENV{SHIELD_AS_LIST}
     CMAKE_BINARY_DIR=$ENV{CMAKE_BINARY_DIR}
     ZEPHYR_TOOLCHAIN_VARIANT=${ZEPHYR_TOOLCHAIN_VARIANT}
     ARCH_DIR=$ENV{ARCH_DIR}


Move away from deprecated PackageManager to the productbuild generator.

--- CMakeInstallation.cmake
+++ CMakeInstallation.cmake
@@ -104,7 +104,7 @@

 IF(APPLE)
   SET(CPACK_SOURCE_GENERATOR "TGZ")
-  SET(CPACK_GENERATOR "PackageMaker" "STGZ" "TBZ2" "TGZ" "ZIP")
+  SET(CPACK_GENERATOR "productbuild" "STGZ" "TBZ2" "TGZ" "ZIP")
 ENDIF()

 ##


Split off 8.0.30

Split off 8.0.30

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 29 )
+set ( HPCC_POINT 31 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.8.72

Split off 7.8.72

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 8 )
-set ( HPCC_POINT 71 )
+set ( HPCC_POINT 73 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


[ioninja] release 3.4.3;

[ioninja] release 3.4.3;

[axl] release 5.3.7;
[jancy] release 1.5.5;

--- version.cmake
+++ version.cmake
@@ -1,6 +1,6 @@
 set (VERSION_MAJOR     1)
 set (VERSION_MINOR     5)
-set (VERSION_REVISION  4)
+set (VERSION_REVISION  5)
 set (VERSION_TAG)

 set (VERSION_FILE_SUFFIX "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")


Community Edition Release Candidate 6

Community Edition Release Candidate 6

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -6,5 +6,5 @@
 set ( HPCC_MINOR 8 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 5 )
+set ( HPCC_SEQUENCE 6 )
 ###


Split off 8.10.0

Split off 8.10.0

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -4,8 +4,8 @@
 set ( HPCC_NAME "Nagios Monitoring" )
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
-set ( HPCC_MINOR 9 )
+set ( HPCC_MINOR 10 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "trunk" )
+set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.0.66

Split off 8.0.66

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 65 )
+set ( HPCC_POINT 67 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.0.14

Split off 8.0.14

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 13 )
+set ( HPCC_POINT 15 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


[ioninja] release 3.5.0

[ioninja] release 3.5.0

[axl] release 5.5.0
[jancy] release 1.6.0

--- version.cmake
+++ version.cmake
@@ -1,6 +1,6 @@
 set (VERSION_MAJOR     1)
-set (VERSION_MINOR     5)
-set (VERSION_REVISION  8)
+set (VERSION_MINOR     6)
+set (VERSION_REVISION  0)
 set (VERSION_TAG)

 set (VERSION_FILE_SUFFIX "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")


for C++11 we need at least GCC 4.7

for C++11 we need at least GCC 4.7

--- test.cmake
+++ test.cmake
@@ -208,7 +208,7 @@
       endif()
    endif()
    if(NOT ${dashboard_model} STREQUAL "Continuous" OR res GREATER 0)
-      if("${COMPILER_VERSION}" MATCHES "(g\\+\\+|GCC|Open64).*4\\.[012345]\\.")
+      if("${COMPILER_VERSION}" MATCHES "(g\\+\\+|GCC|Open64).*4\\.[0123456]\\.")
          file(WRITE "${CTEST_BINARY_DIRECTORY}/abort_reason" "Compiler too old for C++11: ${COMPILER_VERSION}")
          list(APPEND CTEST_NOTES_FILES "${CTEST_BINARY_DIRECTORY}/abort_reason")
          ctest_submit(PARTS Notes)


CI: fix cmake syntax

CI: fix cmake syntax

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -26,12 +26,17 @@
 set (CTEST_BUILD_CONFIGURATION "Release")
 set (CTEST_CMAKE_GENERATOR "Ninja")

+# Find the build name
+set(ci_mr_source "$ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}")
+set(ci_mr_target "$ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME}")
+set(ci_ref_name "$ENV{CI_COMMIT_REF_NAME}")
 set (CTEST_BUILD_NAME "$ENV{CI_COMMIT_SHORT_SHA}")
-if("$ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}" AND "$ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME}")
-  set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} ($ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} to $ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME})")
-elseif(CI_COMMIT_REF_NAME)
-  set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} ($ENV{CI_COMMIT_REF_NAME})")
+if(ci_mr_source AND ci_mr_target)
+  set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} (${ci_mr_source} to ${ci_mr_target})")
+elseif(ci_ref_name)
+  set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} (${ci_ref_name})")
 endif()
+
 set (CTEST_SITE "${IMAGE_NAME}")

 # Directory variable
@@ -48,8 +53,6 @@
 set (OTB_LARGEINPUT_ROOT "") # todo

 message(STATUS "CI profile : $ENV{OTB_CI_PROFILE}")
-message(STATUS "CI_COMMIT_REF_NAME : $ENV{CI_COMMIT_REF_NAME}")
-message(STATUS "CTEST_BUILD_NAME : ${CTEST_BUILD_NAME}")

 #The following file set the CONFIGURE_OPTIONS variable
 set (CONFIGURE_OPTIONS  "")


COMP: Remove unused JsonCpp linker flags.

--- CMake/Superbuild/External_JsonCpp.cmake
+++ CMake/Superbuild/External_JsonCpp.cmake
@@ -65,8 +65,6 @@
       -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
       -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
       -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-      -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
-      -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
       -DCMAKE_BUILD_TYPE:STRING=${build_type}
       ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
       -DBUILD_SHARED_LIBS:BOOL=OFF


Squashed 'cmake/yacma/' changes from 7e96072..b2c7f57

b2c7f57 Refactor the compiler/linker settings macro.
5f26425 Some work on the functionality in YACMA to setup compiler flags.
f57318f Merge commit '1785722c7756efcac0820afdae609ad69afbf6d6'
623f976 A few more small changes.
5196131 WIP mul, not functional.
d13ef42 Change detection of compiler flags to write into cached variables rather than updating global flags.

git-subtree-dir: cmake/yacma
git-subtree-split: b2c7f57e06e30ff7a7ee091e62807ea2ebb2c3f8

--- YACMACompilerLinkerSettings.cmake
+++ YACMACompilerLinkerSettings.cmake
@@ -1,120 +1,150 @@
-if(YACMACompilerLinkerSettingsIncluded)
+if(_YACMACompilerLinkerSettingsIncluded)
     return()
 endif()

 include(CheckCXXCompilerFlag)

-message(STATUS "The C++ compiler ID is: ${CMAKE_CXX_COMPILER_ID}")
+# NOTE: we want to make sure the following variables are defined each time we include
+# this file, even when the file is re-included (e.g., from a parallel unrelated tree).

 # Clang detection:
 # http://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang
 # http://www.cmake.org/cmake/help/v2.8.10/cmake.html#variable:CMAKE_LANG_COMPILER_ID
+# NOTE: we use MATCHES here because on OSX sometimes the compiler calls itself "AppleClang".
 if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
-    set(YACMA_COMPILER_IS_CLANGXX 1)
+    set(YACMA_COMPILER_IS_CLANGXX TRUE)
 endif()

-if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
-    set(YACMA_COMPILER_IS_INTELXX 1)
+if(${CMAKE_CXX_COMPILER_ID} MATCHES "Intel")
+    set(YACMA_COMPILER_IS_INTELXX TRUE)
 endif()

 if(MSVC)
-    set(YACMA_COMPILER_IS_MSVC 1)
+    set(YACMA_COMPILER_IS_MSVC TRUE)
 endif()

 if(CMAKE_COMPILER_IS_GNUCXX)
-    set(YACMA_COMPILER_IS_GNUCXX 1)
+    set(YACMA_COMPILER_IS_GNUCXX TRUE)
 endif()

-# Enable conditionally a CXX flags, is supported by the compiler.
-# The flag will be enabled in all buld types.
-macro(YACMA_CHECK_ENABLE_CXX_FLAG flag)
-    set(YACMA_CHECK_CXX_FLAG)
+# This is an OS X specific setting that is suggested to be enabled. See:
+# https://blog.kitware.com/upcoming-in-cmake-2-8-12-osx-rpath-support/
+# http://stackoverflow.com/questions/31561309/cmake-warnings-under-os-x-macosx-rpath-is-not-specified-for-the-following-targe
+if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+    set(CMAKE_MACOSX_RPATH TRUE)
+endif()
+
+# Helper function to print out the autodetected flags.
+function(_YACMA_REPORT_FLAGS)
+    message(STATUS "The C++ compiler ID is: ${CMAKE_CXX_COMPILER_ID}")
+    message(STATUS "YACMA autodetected C++ flags: ${YACMA_CXX_FLAGS}")
+    message(STATUS "YACMA autodetected C++ debug flags: ${YACMA_CXX_FLAGS_DEBUG}")
+endfunction()
+
+# Enable conditionally a CXX flags, if supported by the compiler.
+# This is for flags intended to be enabled in all configurations.
+# NOTE: we use macros and go through temporary private variables
+# because it's apparently impossible to append to an internal
+# CACHEd list.
+macro(_YACMA_CHECK_ENABLE_CXX_FLAG flag)
+    set(CMAKE_REQUIRED_QUIET TRUE)
     check_cxx_compiler_flag("${flag}" YACMA_CHECK_CXX_FLAG)
+    unset(CMAKE_REQUIRED_QUIET)
     if(YACMA_CHECK_CXX_FLAG)
-        message(STATUS "Enabling the '${flag}' compiler flag.")
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+        message(STATUS "'${flag}': flag is supported by the compiler, enabling.")
+        list(APPEND _YACMA_CXX_FLAGS "${flag}")
     else()
-        message(STATUS "Disabling the '${flag}' compiler flag.")
+        message(STATUS "'${flag}': flag is not supported by the compiler.")
     endif()
+    # NOTE: check_cxx_compiler stores variables in the cache.
     unset(YACMA_CHECK_CXX_FLAG CACHE)
 endmacro()

 # Enable conditionally a debug CXX flags, is supported by the compiler.
-# The flag will be enabled only in debug builds.
-macro(YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG flag)
-    set(YACMA_CHECK_DEBUG_CXX_FLAG)
+# This is for flags intended to be enabled in debug mode.
+macro(_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG flag)
+    set(CMAKE_REQUIRED_QUIET TRUE)
     check_cxx_compiler_flag("${flag}" YACMA_CHECK_DEBUG_CXX_FLAG)
+    unset(CMAKE_REQUIRED_QUIET)
     if(YACMA_CHECK_DEBUG_CXX_FLAG)
-        message(STATUS "Enabling the '${flag}' debug compiler flag.")
-        set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${flag}")
+        message(STATUS "'${flag}': debug flag is supported by the compiler, enabling.")
+        list(APPEND _YACMA_CXX_FLAGS_DEBUG "${flag}")
     else()
-        message(STATUS "Disabling the '${flag}' debug compiler flag.")
+        message(STATUS "'${flag}': debug flag is not supported by the compiler.")
     endif()
     unset(YACMA_CHECK_DEBUG_CXX_FLAG CACHE)
 endmacro()

-# NOTE: all these flags are with a Unix-like syntax. We will need to change them
-# for MSVC and clang on windows possibly.
-macro(YACMA_SETUP_CXX_FLAGS)
+# What we want to avoid is to re-run the expensive flag checks. We will set cache variables
+# on the initial run and skip following CMake runs.
+if(NOT _YACMACompilerLinkerSettingsRun)
+    # Init the flags lists.
+    set(_YACMA_CXX_FLAGS "")
+    set(_YACMA_CXX_FLAGS_DEBUG "")
+
+    # NOTE: all these flags are with a Unix-like syntax. We will need to change them
+    # for MSVC and clang on windows possibly.
+
     # Configuration bits specific for GCC.
     if(YACMA_COMPILER_IS_GNUCXX)
-        YACMA_CHECK_ENABLE_CXX_FLAG(-fdiagnostics-color=auto)
+        _YACMA_CHECK_ENABLE_CXX_FLAG(-fdiagnostics-color=auto)
     endif()

     # Configuration bits specific for clang.
     if(YACMA_COMPILER_IS_CLANGXX)
         # For now it seems like -Wshadow from clang behaves better than GCC's, just enable it here
         # for the time being.
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshadow)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshadow)
         # Clang is better at this flag than GCC.
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Werror)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Werror)
     endif()

     # Common configuration for GCC, clang and Intel.
     if (YACMA_COMPILER_IS_CLANGXX OR YACMA_COMPILER_IS_INTELXX OR YACMA_COMPILER_IS_GNUCXX)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wall)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnon-virtual-dtor)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnoexcept)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wlogical-op)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wconversion)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wdeprecated)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wall)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnon-virtual-dtor)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnoexcept)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wlogical-op)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wconversion)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wdeprecated)
         # This limit is supposed to be at least 1024 in C++11, but for some reason
         # clang sets this to 256, and gcc to 900.
-        YACMA_CHECK_ENABLE_CXX_FLAG(-ftemplate-depth=1024)
+        _YACMA_CHECK_ENABLE_CXX_FLAG(-ftemplate-depth=1024)
         # NOTE: this can be useful, but at the moment it triggers lots of warnings in type traits.
         # Keep it in mind for the next time we touch type traits.
-        # YACMA_CHECK_ENABLE_CXX_FLAG(-Wold-style-cast)
+        # _YACMA_CHECK_ENABLE_CXX_FLAG(-Wold-style-cast)
         # NOTE: disable this for now, as it results in a lot of clutter from Boost.
-        # YACMA_CHECK_ENABLE_CXX_FLAG(-Wzero-as-null-pointer-constant)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-pedantic-errors)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wdisabled-optimization)
-        YACMA_CHECK_ENABLE_CXX_FLAG(-fvisibility-inlines-hidden)
-        YACMA_CHECK_ENABLE_CXX_FLAG(-fvisibility=hidden)
+        # _YACMA_CHECK_ENABLE_CXX_FLAG(-Wzero-as-null-pointer-constant)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-pedantic-errors)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wdisabled-optimization)
+        _YACMA_CHECK_ENABLE_CXX_FLAG(-fvisibility-inlines-hidden)
+        _YACMA_CHECK_ENABLE_CXX_FLAG(-fvisibility=hidden)
         # This is useful when the compiler decides the template backtrace is too verbose.
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-ftemplate-backtrace-limit=0)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-fstack-protector-all)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-ftemplate-backtrace-limit=0)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-fstack-protector-all)
         # These became available in GCC from version 5.
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wodr)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-types)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-methods)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wodr)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-types)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-methods)
     endif()

     # MSVC setup.
     if(YACMA_COMPILER_IS_MSVC)
         # Enable higher warning level than usual.
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/W4)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/W4)
         # Treat warnings as errors.
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX)
     endif()
-endmacro()

-# This is an OS X specific setting that is suggested to be enabled. See:
-# https://blog.kitware.com/upcoming-in-cmake-2-8-12-osx-rpath-support/
-# http://stackoverflow.com/questions/31561309/cmake-warnings-under-os-x-macosx-rpath-is-not-specified-for-the-following-targe
-if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-    set(CMAKE_MACOSX_RPATH 1)
+    # Set the cache variables.
+    set(YACMA_CXX_FLAGS "${_YACMA_CXX_FLAGS}" CACHE INTERNAL "")
+    set(YACMA_CXX_FLAGS_DEBUG "${_YACMA_CXX_FLAGS_DEBUG}" CACHE INTERNAL "")
+    set(_YACMACompilerLinkerSettingsRun YES CACHE INTERNAL "")
 endif()

+# Final report.
+_YACMA_REPORT_FLAGS()
+
 # Mark as included.
-set(YACMACompilerLinkerSettingsIncluded YES)
+set(_YACMACompilerLinkerSettingsIncluded YES)


COMP: dashboard trigger FIX (#1731): doxygen url for public dashboard at kitware fixed

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -24,9 +24,8 @@

     SET(CTEST_NIGHTLY_START_TIME "21:00 CET")
     SET (NIGHTLY_START_TIME "21:00:00 CET")
-#
-#    SET (CVS_WEB_URL "http://mbi-srv/docs/programming/cvs/viewcvs/cgi/viewcvs.cgi/ip%2b%2b/")
-#    SET (DOXYGEN_URL "http://mbi-srv.inet.dkfz-heidelberg.de/docs/image_processing/mitk/doxygen/" )
+
+    SET (DOXYGEN_URL "http://docs.mitk.org/nightly/" )

 ENDIF(USE_KITWARE_DARTBOARD)


FIX: Use the right file extension for python modules on Windows

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -407,13 +407,8 @@
     target_link_libraries(${PYTHON_MODULE_NAME} ${CEGUI_BASE_LIBNAME} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ${EXTRA_LIBS} )
     set_target_properties(${PYTHON_MODULE_NAME} PROPERTIES PREFIX "")

-    # link the default modules when doing a static build.
-    if (NOT BUILD_SHARED_LIBS)
-        target_link_libraries(${PYTHON_MODULE_NAME}
-            ${CEGUI_STATIC_XMLPARSER_MODULE}
-            ${CEGUI_STATIC_IMAGECODEC_MODULE}
-            ${CEGUI_FALAGARD_WR_LIBNAME}
-        )
+    if (WIN32)
+        set_target_properties(${PYTHON_MODULE_NAME} PROPERTIES SUFFIX ".pyd")
     endif()

     if (NOT APPLE)


Use configure instead of configure.bat for qt

--- cmake/ExternalQt5.cmake
+++ cmake/ExternalQt5.cmake
@@ -126,7 +126,7 @@
         URL ${URL}
 	URL_HASH ${URL_HASH}
         CONFIGURE_COMMAND
-            ${FAST_EXTERNAL_BUILD_DIR}/qt5/src/qt5/configure.bat
+            ${FAST_EXTERNAL_BUILD_DIR}/qt5/src/qt5/configure
             -prefix ${FAST_EXTERNAL_INSTALL_DIR};
  		${OPTIONS}
         BUILD_COMMAND


fixed unbound static lib on mingw as libunbound.dll.a

--- cmake/FindUnbound.cmake
+++ cmake/FindUnbound.cmake
@@ -38,7 +38,11 @@
 )

 if(STATIC)
-  find_library(UNBOUND_LIBRARIES libunbound.a)
+  if(MINGW)
+    find_library(UNBOUND_LIBRARIES libunbound.dll.a)
+  else()
+    find_library(UNBOUND_LIBRARIES libunbound.a)
+  endif()
 else()
   find_library(UNBOUND_LIBRARIES unbound)
 endif()


[cmake] Improve AppleClang detection

[cmake] Improve AppleClang detection

--- cmake/compilation.cmake
+++ cmake/compilation.cmake
@@ -60,7 +60,7 @@
   endif()
 elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
   # Xcode 10 was based on Clang 6 which has full C++17 support.
-  if (APPLE AND "${CMAKE_CXX_COMPILER}" MATCHES "Xcode")
+  if (APPLE AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang")
     set(target_version "10.0")
   else()
     set(target_version "6")


Fix tarball target to last release

Fix tarball target to last release

--- GitTargets.cmake
+++ GitTargets.cmake
@@ -85,12 +85,15 @@
   )

 # tarball
-set(TARBALL "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar")
+if(NOT LAST_RELEASE)
+  set(LAST_RELEASE ${VERSION})
+endif()
+set(TARBALL "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${LAST_RELEASE}.tar")

 add_custom_target(tarball-create
   COMMAND ${GIT_EXECUTABLE} archive --worktree-attributes
-    --prefix ${CMAKE_PROJECT_NAME}-${VERSION}/ -o ${TARBALL}
-    release-${VERSION}
+    --prefix ${CMAKE_PROJECT_NAME}-${LAST_RELEASE}/ -o ${TARBALL}
+    release-${LAST_RELEASE}
   WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
   COMMENT "Creating ${TARBALL}"
   )


build: make sure LLVM is exactly correct

 * check the version to be the correct major version
 * ensure that it has all the default targets enabled

--- cmake/Findllvm.cmake
+++ cmake/Findllvm.cmake
@@ -15,14 +15,50 @@
         "c:/msys64/mingw64/bin"
         "C:/Libraries/llvm-8.0.0/bin")

+if ("${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND")
+  message(FATAL_ERROR "unable to find llvm-config")
+endif()
+
 execute_process(
 	COMMAND ${LLVM_CONFIG_EXE} --version
 	OUTPUT_VARIABLE LLVM_CONFIG_VERSION
 	OUTPUT_STRIP_TRAILING_WHITESPACE)

-if(LLVM_CONFIG_VERSION VERSION_LESS 7)
-  message(FATAL_ERROR "expected LLVM version >=7 but found ${LLVM_CONFIG_VERSION}")
+if("${LLVM_CONFIG_VERSION}" VERSION_LESS 7)
+  message(FATAL_ERROR "expected LLVM 7.x but found ${LLVM_CONFIG_VERSION}")
 endif()
+if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 8)
+  message(FATAL_ERROR "expected LLVM 7.x but found ${LLVM_CONFIG_VERSION}")
+endif()
+if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 8)
+  message(FATAL_ERROR "expected LLVM 7.x but found ${LLVM_CONFIG_VERSION}")
+endif()
+
+execute_process(
+	COMMAND ${LLVM_CONFIG_EXE} --targets-built
+    OUTPUT_VARIABLE LLVM_TARGETS_BUILT_SPACES
+	OUTPUT_STRIP_TRAILING_WHITESPACE)
+string(REPLACE " " ";" LLVM_TARGETS_BUILT "${LLVM_TARGETS_BUILT_SPACES}")
+function(NEED_TARGET TARGET_NAME)
+    list (FIND LLVM_TARGETS_BUILT "${TARGET_NAME}" _index)
+    if (${_index} EQUAL -1)
+        message(FATAL_ERROR "LLVM is missing target ${TARGET_NAME}. Zig requires LLVM to be built with all default targets enabled.")
+    endif()
+endfunction(NEED_TARGET)
+NEED_TARGET("AArch64")
+NEED_TARGET("AMDGPU")
+NEED_TARGET("ARM")
+NEED_TARGET("BPF")
+NEED_TARGET("Hexagon")
+NEED_TARGET("Lanai")
+NEED_TARGET("Mips")
+NEED_TARGET("MSP430")
+NEED_TARGET("NVPTX")
+NEED_TARGET("PowerPC")
+NEED_TARGET("Sparc")
+NEED_TARGET("SystemZ")
+NEED_TARGET("X86")
+NEED_TARGET("XCore")

 if(NOT(CMAKE_BUILD_TYPE STREQUAL "Debug") OR ZIG_STATIC)
   execute_process(


increase timeout to handle slow Travis

increase timeout to handle slow Travis

--- cmake/P4CUtils.cmake
+++ cmake/P4CUtils.cmake
@@ -75,6 +75,7 @@
 #
 # It generates a ${p4name}.test file invoking ${driver} on the p4
 # program with command line arguments ${args}
+# Sets the timeout on tests at 300s (for the slow Travis machines)
 #
 macro(p4c_add_test_with_args tag driver isXfail alias p4test args)
   set(__testfile "${P4C_BINARY_DIR}/${tag}/${p4test}.test")
@@ -88,7 +89,7 @@
     COMMAND ${tag}/${p4test}.test ${args}
     WORKING_DIRECTORY ${P4C_BINARY_DIR})
   if (NOT DEFINED ${tag}_timeout)
-    set (${tag}_timeout 120)
+    set (${tag}_timeout 300)
   endif()
   set_tests_properties(${__testname} PROPERTIES LABELS ${tag} TIMEOUT ${${tag}_timeout})
   if (${isXfail})


link against dynamic libraries as needed

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -5,3 +5,5 @@
 elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
   set(CMAKE_Fortran_FLAGS_INIT "-openmp -stand f08")
 endif()
+
+set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--as-needed")


renamed USE_STATIC_RUNTIME to EMBREE_STATIC_RUNTIME

--- common/cmake/msvc.cmake
+++ common/cmake/msvc.cmake
@@ -50,8 +50,8 @@
 SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG")

 # optionally use static runtime library
-OPTION(USE_STATIC_RUNTIME "Use the static version of the C/C++ runtime library." ON)
-IF (USE_STATIC_RUNTIME)
+OPTION(EMBREE_STATIC_RUNTIME "Use the static version of the C/C++ runtime library." ON)
+IF (EMBREE_STATIC_RUNTIME)
   STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
   STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
   STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})


using find_path to find embree models for CI testing

--- common/cmake/test.cmake
+++ common/cmake/test.cmake
@@ -22,7 +22,12 @@
     SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
 ENDIF()

-SET(EMBREE_TESTING_MODEL_DIR "${PROJECT_SOURCE_DIR}/models" CACHE PATH "Path to the folder containing the Embree models for regression testing.")
+FIND_PATH(EMBREE_TESTING_MODEL_DIR
+  NAMES test-models-intensity2.txt
+  PATHS "${PROJECT_SOURCE_DIR}/models"
+  DOC "Path to the folder containing the Embree models for regression testing."
+  NO_DEFAULT_PATHS)
+
 SET(EMBREE_TESTING_INTENSITY 1 CACHE INT "Intensity of testing (0 = no testing, 1 = verify and tutorials, 2 = light testing, 3 = intensive testing.")
 SET(EMBREE_TESTING_MEMCHECK OFF CACHE BOOL "Turns on memory checking for some tests.")
 SET(EMBREE_TESTING_BENCHMARK OFF CACHE BOOL "Turns benchmarking on.")


Fix typo in error message for POLLY_XCODE_COMPILER

--- compiler/xcode.cmake
+++ compiler/xcode.cmake
@@ -11,7 +11,7 @@

 string(COMPARE EQUAL "${POLLY_XCODE_COMPILER}" "" _is_empty)
 if(_is_empty)
-  polly_fatal_error("Please set POLLY_CODE_COMPILER")
+  polly_fatal_error("Please set POLLY_XCODE_COMPILER")
 endif()

 set(_cmd xcrun --find "${POLLY_XCODE_COMPILER}")


Adding export dependencies to generate a CMakeDepends in build dir for SDLut

--- RageCommon.cmake
+++ RageCommon.cmake
@@ -81,6 +81,8 @@

 	SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE PATH "Ouput directory for libraries")
 	SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE PATH "Output directory for executables")
+
+	EXPORT_LIBRARY_DEPENDENCIES(${CMAKE_BINARY_DIR}/CMakeDepends.txt)

 ENDMACRO (RAGE_BUILD)


Changed the name.

Changed the name.

--- test/cmake/Findclibgame.cmake
+++ test/cmake/Findclibgame.cmake
@@ -13,7 +13,7 @@
 )

 # Finding the clibgame library.
-find_library(CLIBGAME_LIBRARIES libclibgame.a
+find_library(CLIBGAME_LIBRARY libclibgame.a
   PATH_SUFFIXES lib lib/static
   PATHS ${SEARCH_DIRECTORIES}
 )
@@ -22,5 +22,5 @@
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(
   CLIBGAME
-  REQUIRED_VARS CLIBGAME_INCLUDE_DIRS CLIBGAME_LIBRARIES
+  REQUIRED_VARS CLIBGAME_INCLUDE_DIRS CLIBGAME_LIBRARY
 )


Found a way to configure FindCUDA.cmake so it works on both CUDA 1.1 and CUDA 2.0 without any hacks.

git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@1066 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/CMake/cuda/FindCuda.cmake
+++ src/CMake/cuda/FindCuda.cmake
@@ -107,14 +107,14 @@
   if(WIN32)
 	SET(nvcc_flags --device-emulation -D_DEVICEEMU -g -ccbin "C:\\Program Files (x86)\\Microsoft Visual Studio 8\\VC\\bin")
   else(WIN32)
-    SET(nvcc_flags --device-emulation -D_DEVICEEMU -g)
+    SET(nvcc_flags --device-emulation -D_DEVICEEMU -g --host-compilation C++)
   endif(WIN32)
 ELSE(CUDA_BUILD_TYPE MATCHES "Emulation")
   # Device present.
   if(WIN32)
-     SET(nvcc_flags -ccbin "C:\\Program Files (x86)\\Microsoft Visual Studio 8\\VC\\bin")
+     SET(nvcc_flags --host-compilation C++ -ccbin "C:\\Program Files (x86)\\Microsoft Visual Studio 8\\VC\\bin")
   else(WIN32)
-     SET(nvcc_flags "")
+     SET(nvcc_flags --host-compilation C++)
   endif(WIN32)
 ENDIF(CUDA_BUILD_TYPE MATCHES "Emulation")

@@ -175,10 +175,6 @@

 # ENDIF(NOT FOUND_CUDA_NVCC_INCLUDE)

-# set the CUDA version by reading cuda.h
-file(READ ${CUDA_INCLUDE}/cuda.h CUDA_H_)
-string(REGEX REPLACE ".*define CUDA_VERSION ([0123456789]+).*" "\\1" CUDA_VERSION "${CUDA_H_}")
-
 # CUDA_TARGET_LINK
 IF (NOT CUDA_TARGET_LINK)


Fixed an issue where a CMake source of e:/code/hoomd would result in a non-compiling build because of the case sensitive REGEX replace used to remove the CMAKE_SRC_DIR. The removal is now done with substrings.

git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@1271 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/CMake/cuda/FindCuda.cmake
+++ src/CMake/cuda/FindCuda.cmake
@@ -297,9 +297,13 @@
     IF(${file} MATCHES ".*\\.cu$")

     # strip CMAKE_SOURCE_DIR from the head of ${file}
-	STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}/" "" stripped_file ${file})
-
-    # Add a custom target to generate a cpp file (CUDA 2.0 needs .cc files and CUDA 1.1 needs .c files)
+    string(LENGTH ${CMAKE_SOURCE_DIR} _cuda_source_dir_length)
+    string(LENGTH ${file} _cuda_file_length)
+    math(EXPR _begin "${_cuda_source_dir_length} + 1")
+    math(EXPR _stripped_file_length "${_cuda_file_length} - ${_cuda_source_dir_length} - 1")
+	STRING(SUBSTRING ${file} ${_begin} ${_stripped_file_length} stripped_file )
+
+    # Add a custom target to generate a cpp file
 	SET(generated_file  "${CMAKE_BINARY_DIR}/src/cuda/${stripped_file}_${cuda_target}_generated.cpp")

     SET(generated_target "${stripped_file}_target")


Bug fix: added source code language definition for all objc_* targets

--- Googlify.cmake
+++ Googlify.cmake
@@ -684,24 +684,17 @@
 endfunction(link_with_cmake_target_python)

 function(objc_binary TARGET)
-  foreach (SRC ${ARGN})
-    if (SRC MATCHES "\\.m$")
-      message(STATUS "${SRC} -> C")
-      set_source_files_properties(${SRC} PROPERTIES LANGUAGE C)
-    endif ()
-    if (SRC MATCHES "\\.mm$")
-      message(STATUS "${SRC} -> C++")
-      set_source_files_properties(${SRC} PROPERTIES LANGUAGE CXX)
-    endif ()
-  endforeach ()
+  prepare_sources_for_objc(${ARGN})
   cc_binary(${TARGET} ${ARGN})
 endfunction()

 function(objc_library TARGET)
+  prepare_sources_for_objc(${ARGN})
   cc_library(${TARGET} ${ARGN})
 endfunction()

 function(objc_test TARGET)
+  prepare_sources_for_objc(${ARGN})
   cc_test(${TARGET} ${ARGN})
 endfunction()

@@ -726,6 +719,17 @@
   set(${OUT} ${INIT_PY} PARENT_SCOPE)
 endfunction()

+function(prepare_sources_for_objc)
+  foreach (SRC ${ARGN})
+    if (SRC MATCHES "\\.m$")
+      set_source_files_properties(${SRC} PROPERTIES LANGUAGE C)
+    endif ()
+    if (SRC MATCHES "\\.mm$")
+      set_source_files_properties(${SRC} PROPERTIES LANGUAGE CXX)
+    endif ()
+  endforeach ()
+endfunction()
+
 function(py_binary TARGET SRC)
   get_current_prefix(PREFIX)
   get_full_target(${TARGET} FULL_TARGET)


Documenting CommonCPPCTest addition

Documenting CommonCPPCTest addition

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -9,6 +9,9 @@
 #   be set to configure target specific includes and link libraries, where
 #   NAME is the test filename without the .cpp extension. Per test include
 #   directories are only supported for for CMake 2.8.8
+# * For each test ${NAME}_TEST_PREFIX and ${NAME}_TEST_ARGS can be
+#   set to customise the actual test command, supplying a prefix command
+#   and additional arguments to follow the test executable.

 if(NOT WIN32) # tests want to be with DLLs on Windows - no rpath
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})


Tests: don't prefix executable with project name

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -40,7 +40,8 @@
     add_custom_target(${NAME})
   endif()
   add_dependencies(${NAME} ${PROJECT_NAME}_${NAME})
-  set_target_properties(${PROJECT_NAME}_${NAME} PROPERTIES FOLDER "Tests")
+  set_target_properties(${PROJECT_NAME}_${NAME} PROPERTIES
+    FOLDER "Tests" OUTPUT_NAME ${NAME})

   # Per target INCLUDE_DIRECTORIES if supported
   if(CMAKE_VERSION VERSION_GREATER 2.8.7 AND ${NAME}_INCLUDE_DIRECTORIES)
@@ -71,7 +72,8 @@
            EXECUTABLE "${EXECUTABLE}")
     add_test(${PROJECT_NAME}_${NAME} ${RUN_PREFIX} ${EXECUTABLE} ${RUN_ARGS})
   else(CMAKE_VERSION VERSION_LESS 2.8)
-    add_test(NAME ${PROJECT_NAME}_${NAME} COMMAND ${RUN_PREFIX} $<TARGET_FILE:${PROJECT_NAME}_${NAME}> ${RUN_ARGS})
+    add_test(NAME ${PROJECT_NAME}_${NAME}
+      COMMAND ${RUN_PREFIX} $<TARGET_FILE:${PROJECT_NAME}_${NAME}> ${RUN_ARGS})
   endif(CMAKE_VERSION VERSION_LESS 2.8)

   # Add test labels


Add helpful error messages to iree_get_executable_path.

--- build_tools/cmake/iree_macros.cmake
+++ build_tools/cmake/iree_macros.cmake
@@ -106,22 +106,29 @@
 #
 # Gets the path to an executable in a cross-compilation-aware way. This
 # should be used when accessing binaries that are used as part of the build,
-# such as for generating files used for later build steps. Those binaries
-# can come from third-party projects or another CMake invocation.
+# such as for generating files used for later build steps.
 #
 # Paramters:
 # - OUTPUT_PATH_VAR: variable name for receiving the path to the built target.
 # - EXECUTABLE: the executable to get its path.
 function(iree_get_executable_path OUTPUT_PATH_VAR EXECUTABLE)
-  if(CMAKE_CROSSCOMPILING)
-    # The target is defined in the CMake invocation for host. We don't have
-    # access to the target; relying on the path here.
-    set(_OUTPUT_PATH "${IREE_HOST_BINARY_ROOT}/bin/${EXECUTABLE}${IREE_HOST_EXECUTABLE_SUFFIX}")
-    set(${OUTPUT_PATH_VAR} "${_OUTPUT_PATH}" PARENT_SCOPE)
+  if (NOT CMAKE_CROSSCOMPILING OR TARGET "${EXECUTABLE}")
+    # We can either expect the target to be defined as part of this CMake
+    # invocation (if not cross compiling) or the target is defined already.
+    set(${OUTPUT_PATH_VAR} "$<TARGET_FILE:${EXECUTABLE}>" PARENT_SCOPE)
   else()
-    # The target is defined in this CMake invocation. We can query the location
-    # directly from CMake.
-    set(${OUTPUT_PATH_VAR} "$<TARGET_FILE:${EXECUTABLE}>" PARENT_SCOPE)
+    # The target won't be directly defined by this CMake invocation so check
+    # for an already built executable at IREE_HOST_BINARY_ROOT. If we find it,
+    # add it as an imported target so it gets picked up on later invocations.
+    set(_EXECUTABLE_PATH "${IREE_HOST_BINARY_ROOT}/bin/${EXECUTABLE}${IREE_HOST_EXECUTABLE_SUFFIX}")
+    if (EXISTS ${_EXECUTABLE_PATH})
+      add_executable("${EXECUTABLE}" IMPORTED GLOBAL)
+      set_property(TARGET "${EXECUTABLE}" PROPERTY IMPORTED_LOCATION "${_EXECUTABLE_PATH}")
+      set(${OUTPUT_PATH_VAR} "$<TARGET_FILE:${EXECUTABLE}>" PARENT_SCOPE)
+    else()
+      message(FATAL_ERROR "Could not find '${EXECUTABLE}' at '${_EXECUTABLE_PATH}'. "
+              "Ensure that IREE_HOST_BINARY_ROOT points to installed binaries.")
+    endif()
   endif()
 endfunction()


Take out removed file from cmake source list, omitted in revision C10084. Issue 3361.

--- core/source/cmake/api_source_files.cmake
+++ core/source/cmake/api_source_files.cmake
@@ -67,7 +67,6 @@
 	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/fontid.h
 	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/graphicsmaterialid.h
 	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/graphicsmoduleid.h
-	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/graphicsrendertype.h
 	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/interactivetoolid.h
 	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/nodeid.h
 	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/optimisationid.h


simplify use script: remove RAPIDXML_INCLUDE_DIR

issue https://github.com/smanders/externpro/issues/273

--- projects/use/usexp-rapidxml-config.cmake
+++ projects/use/usexp-rapidxml-config.cmake
@@ -1,24 +1,18 @@
 # RAPIDXML_FOUND - RapidXml was found
 # RAPIDXML_VER - RapidXml version
-# RAPIDXML_INCLUDE_DIR - the RapidXml include directory
 set(prj rapidxml)
 # this file (-config) installed to share/cmake
 get_filename_component(XP_ROOTDIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)
 get_filename_component(XP_ROOTDIR ${XP_ROOTDIR} ABSOLUTE) # remove relative parts
 string(TOUPPER ${prj} PRJ)
 set(${PRJ}_VER "@VER@ [@PROJECT_NAME@]")
-set(verDir /${prj}_@VER@)
-unset(${PRJ}_INCLUDE_DIR CACHE)
-find_path(${PRJ}_INCLUDE_DIR rapidxml/rapidxml.hpp PATHS ${XP_ROOTDIR}/include${verDir} NO_DEFAULT_PATH)
 if(NOT TARGET xpro::rapidxml)
   add_library(xpro::rapidxml INTERFACE IMPORTED)
-  if(${PRJ}_INCLUDE_DIR)
-    set_target_properties(xpro::rapidxml PROPERTIES
-      INTERFACE_INCLUDE_DIRECTORIES "${${PRJ}_INCLUDE_DIR}"
-      )
-  endif()
+  set_target_properties(xpro::rapidxml PROPERTIES
+    INTERFACE_INCLUDE_DIRECTORIES "${XP_ROOTDIR}/include/${prj}_@VER@"
+    )
 endif()
-set(reqVars ${PRJ}_VER ${PRJ}_INCLUDE_DIR)
+set(reqVars ${PRJ}_VER)
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(${prj} REQUIRED_VARS ${reqVars})
 mark_as_advanced(${reqVars})


modules: updated FindMagnum.cmake.

modules: updated FindMagnum.cmake.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -92,11 +92,12 @@
 #  MAGNUM_TARGET_GLES3          - Defined if compiled for OpenGL ES 3.0
 #  MAGNUM_TARGET_DESKTOP_GLES   - Defined if compiled with OpenGL ES
 #   emulation on desktop OpenGL
-#
-# If `MAGNUM_BUILD_DEPRECATED` is defined, the `MAGNUM_INCLUDE_DIR` variable
-# also contains path directly to Magnum directory (i.e. for includes without
-# `Magnum/` prefix) and `MAGNUM_PLUGINS_INCLUDE_DIR` contains include dir for
-# plugins (i.e. instead of `MagnumPlugins/` prefix).
+#  MAGNUM_TARGET_WEBGL          - Defined if compiled for WebGL
+#
+# If MAGNUM_BUILD_DEPRECATED is defined, the MAGNUM_INCLUDE_DIR variable also
+# contains path directly to Magnum directory (i.e. for includes without
+# Magnum/ prefix) and MAGNUM_PLUGINS_INCLUDE_DIR contains include dir for
+# plugins (i.e. for includes without MagnumPlugins/ prefix).
 #
 # Additionally these variables are defined for internal usage:
 #  MAGNUM_INCLUDE_DIR           - Root include dir (w/o dependencies)
@@ -180,6 +181,15 @@
 find_path(MAGNUM_INCLUDE_DIR
     NAMES Magnum/Magnum.h)

+# We need to open configure.h file from MAGNUM_INCLUDE_DIR before we check for
+# the components. Bail out with proper error message if it wasn't found. The
+# complete check with all components is further below.
+if(NOT MAGNUM_INCLUDE_DIR)
+    include(FindPackageHandleStandardArgs)
+    find_package_handle_standard_args(Magnum
+        REQUIRED_VARS MAGNUM_LIBRARY MAGNUM_INCLUDE_DIR)
+endif()
+
 # Configuration
 file(READ ${MAGNUM_INCLUDE_DIR}/Magnum/configure.h _magnumConfigure)

@@ -206,6 +216,10 @@
 string(FIND "${_magnumConfigure}" "#define MAGNUM_TARGET_DESKTOP_GLES" _TARGET_DESKTOP_GLES)
 if(NOT _TARGET_DESKTOP_GLES EQUAL -1)
     set(MAGNUM_TARGET_DESKTOP_GLES 1)
+endif()
+string(FIND "${_magnumConfigure}" "#define MAGNUM_TARGET_WEBGL" _TARGET_WEBGL)
+if(NOT _TARGET_WEBGL EQUAL -1)
+    set(MAGNUM_TARGET_WEBGL 1)
 endif()

 # Dependent libraries and includes
@@ -466,7 +480,7 @@
     endif()
 endforeach()

-include(FindPackageHandleStandardArgs)
+# Complete the check with also all components
 find_package_handle_standard_args(Magnum
     REQUIRED_VARS MAGNUM_LIBRARY MAGNUM_INCLUDE_DIR
     HANDLE_COMPONENTS)


Dependencies: update freetype to 2.6.5

Dependencies: update freetype to 2.6.5

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -122,24 +122,24 @@

     message(STATUS "Building freetype")
     file(DOWNLOAD
-        http://download.savannah.gnu.org/releases/freetype/freetype-2.6.2.tar.gz
-        ./freetype-2.6.2.tar.gz)
-    execute_process(COMMAND cmake -E tar xf freetype-2.6.2.tar.gz)
+        http://download.savannah.gnu.org/releases/freetype/freetype-2.6.5.tar.gz
+        ./freetype-2.6.5.tar.gz)
+    execute_process(COMMAND cmake -E tar xf freetype-2.6.5.tar.gz)
     # patch toolchain for iOS
     execute_process(COMMAND cmake -E copy
         ${CMAKE_SOURCE_DIR}/CMake/toolchain/ios.toolchain.xcode.cmake
-        freetype-2.6.2/builds/cmake/iOS.cmake)
+        freetype-2.6.5/builds/cmake/iOS.cmake)
     execute_process(COMMAND cmake
         -DCMAKE_INSTALL_PREFIX=${OGREDEPS_PATH}
         -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
         -DWITH_BZip2=OFF # tries to use it on iOS otherwise
         # workaround for broken iOS toolchain in freetype
-        -DPROJECT_SOURCE_DIR=${CMAKE_BINARY_DIR}/freetype-2.6.2
+        -DPROJECT_SOURCE_DIR=${CMAKE_BINARY_DIR}/freetype-2.6.5
         ${CROSS}
         -G ${CMAKE_GENERATOR}
         ..
-        WORKING_DIRECTORY freetype-2.6.2/objs)
-    execute_process(COMMAND cmake --build freetype-2.6.2/objs --target install)
+        WORKING_DIRECTORY freetype-2.6.5/objs)
+    execute_process(COMMAND cmake --build freetype-2.6.5/objs --target install)
 endif()

 #######################################################################


Allow embedding of Dependencies source build into the Ogre source tree

--HG--
branch : v1-7

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -199,6 +199,19 @@
   endif (OGRE_BUILD_PLATFORM_IPHONE)
 endif(APPLE)

+
+# now see if we have a buildable Dependencies package in
+# the source tree. If so, include that, and it will take care of
+# setting everything up, including overriding any of the above
+# findings.
+set(OGREDEPS_RUNTIME_OUTPUT ${OGRE_RUNTIME_OUTPUT})
+if (EXISTS "${OGRE_SOURCE_DIR}/Dependencies/CMakeLists.txt")
+  add_subdirectory(Dependencies)
+elseif (EXISTS "${OGRE_SOURCE_DIR}/ogredeps/CMakeLists.txt")
+  add_subdirectory(ogredeps)
+endif ()
+
+
 # Display results, terminate if anything required is missing
 MACRO_DISPLAY_FEATURE_LOG()


ENH: Update OSXVariables CMake module

ENH: Update OSXVariables CMake module

Backport changes originally added to TubeTK

--- CMake/OSXVariables.cmake
+++ CMake/OSXVariables.cmake
@@ -43,7 +43,8 @@
 #

 # Note: Change architecture *before* any enable_language() or project()
-#       calls so that it's set properly to detect 64-bit-ness...
+#       calls so that it's set properly to detect 64-bit-ness, and
+#       deployment target for the standard c++ library.
 #
 if(APPLE)

@@ -63,36 +64,73 @@
   #  11.x == Mac OSX 10.7 (Lion)
   #  12.x == Mac OSX 10.8 (Mountain Lion)
   #  13.x == Mac OSX 10.9 (Mavericks)
+  #  14.x == Mac OSX 10.10 (Yosemite)
   set(OSX_SDK_104_NAME "Tiger")
   set(OSX_SDK_105_NAME "Leopard")
   set(OSX_SDK_106_NAME "Snow Leopard")
   set(OSX_SDK_107_NAME "Lion")
   set(OSX_SDK_108_NAME "Mountain Lion")
   set(OSX_SDK_109_NAME "Mavericks")
+  set(OSX_SDK_1010_NAME "Yosemite")

-  set(OSX_SDK_ROOTS
+set(OSX_SDK_ROOTS
     /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
     /Developer/SDKs
     )
-  set(SDK_VERSIONS_TO_CHECK 10.9 10.8 10.7 10.6 10.5)
-  foreach(SDK_VERSION ${SDK_VERSIONS_TO_CHECK})
-    if(NOT CMAKE_OSX_DEPLOYMENT_TARGET OR "${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "")
-      foreach(SDK_ROOT ${OSX_SDK_ROOTS})
-        set(TEST_OSX_SYSROOT "${SDK_ROOT}/MacOSX${SDK_VERSION}.sdk")
-        if(EXISTS "${TEST_OSX_SYSROOT}")
-          # Retrieve OSX target name
+
+  # Explicitly set the OSX_SYSROOT to the latest one, as its required
+  #       when the SX_DEPLOYMENT_TARGET is explicitly set
+  foreach(SDK_ROOT ${OSX_SDK_ROOTS})
+    if( "x${CMAKE_OSX_SYSROOT}x" STREQUAL "xx")
+      file(GLOB SDK_SYSROOTS "${SDK_ROOT}/MacOSX*.sdk")
+
+      if(NOT "x${SDK_SYSROOTS}x" STREQUAL "xx")
+        set(SDK_SYSROOT_NEWEST "")
+        set(SDK_VERSION "0")
+        # find the latest SDK
+        foreach(SDK_ROOT_I ${SDK_SYSROOTS})
+          # extract version from SDK
+          string(REGEX MATCH "MacOSX([0-9]+\\.[0-9]+)\\.sdk" _match "${SDK_ROOT_I}")
+          if("${CMAKE_MATCH_1}" VERSION_GREATER "${SDK_VERSION}")
+            set(SDK_SYSROOT_NEWEST "${SDK_ROOT_I}")
+            set(SDK_VERSION "${CMAKE_MATCH_1}")
+          endif()
+        endforeach()
+
+        if(NOT "x${SDK_SYSROOT_NEWEST}x" STREQUAL "xx")
           string(REPLACE "." "" sdk_version_no_dot ${SDK_VERSION})
           set(OSX_NAME ${OSX_SDK_${sdk_version_no_dot}_NAME})
           set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Force build for 64-bit ${OSX_NAME}." FORCE)
-          set(CMAKE_OSX_DEPLOYMENT_TARGET "${SDK_VERSION}" CACHE STRING "Force build for 64-bit ${OSX_NAME}." FORCE)
-          set(CMAKE_OSX_SYSROOT "${TEST_OSX_SYSROOT}" CACHE PATH "Force build for 64-bit ${OSX_NAME}." FORCE)
+          set(CMAKE_OSX_SYSROOT "${SDK_SYSROOT_NEWEST}" CACHE PATH "Force build for 64-bit ${OSX_NAME}." FORCE)
           message(STATUS "Setting OSX_ARCHITECTURES to '${CMAKE_OSX_ARCHITECTURES}' as none was specified.")
-          message(STATUS "Setting OSX_DEPLOYMENT_TARGET to '${SDK_VERSION}' as none was specified.")
-          message(STATUS "Setting OSX_SYSROOT to '${TEST_OSX_SYSROOT}' as none was specified.")
+          message(STATUS "Setting OSX_SYSROOT to latest '${CMAKE_OSX_SYSROOT}' as none was specified.")
         endif()
-      endforeach()
+      endif()
     endif()
   endforeach()
+
+  if("x${CMAKE_OSX_DEPLOYMENT_TARGET}x" STREQUAL "xx")
+    string(REGEX MATCH "MacOSX([0-9]+\\.[0-9]+)\\.sdk" _match "${CMAKE_OSX_SYSROOT}")
+    set(SDK_VERSION "${CMAKE_MATCH_1}")
+    if( "${SDK_VERSION}" VERSION_GREATER "10.8" )
+      # add to cache to allow interactive editing after fatal error
+      set(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE PATH "Deployment target needs to be explicitly set." FORCE)
+      message(FATAL_ERROR
+        "The OSX_SYSROOT is set to version ${SDK_VERSION} (>10.8) and OSX_DEPLOYMENT_TARGET is not explicitly set!\n"
+        "Since:\n"
+        " (1) the default runtime associated with >=10.9 deployment target is 'libc++'.[1]\n"
+        " (2) the default runtime associated with <=10.8 deployment target is 'libstdc++'.\n"
+        " (3) Qt support for 'macx-clang-libc++' is listed as 'unsupported' mkspecs.\n"
+        " (4) Qt binaries may be build against 'libstdc++' or 'libc++'.\n"
+        " (5) Mixing the two different runtime in binaries is unstable.\n"
+        "  [1]http://stackoverflow.com/questions/19637164/c-linking-error-after-upgrading-to-mac-os-x-10-9-xcode-5-0-1/19637199#19637199\n"
+        "--------------------------------\n"
+        "Run '$otool -L $(which qmake) |grep lib.\\*c++' to check what library Qt is built against:\n"
+        " (1) if it is libstdc++ then add '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.8' (or older) to the cmake command line.\n"
+        " (2) if it is libc++ then add '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9' (or newer) to the cmake command line.\n"
+        )
+    endif()
+  endif()

   if(NOT "${CMAKE_OSX_SYSROOT}" STREQUAL "")
     if(NOT EXISTS "${CMAKE_OSX_SYSROOT}")


VTK_BUILD_ALL_MODULES is an advanced variable

Change-Id: Ifd977628794a1aaf4cadd841bd07a1a4724b7c88

--- CMake/vtkModuleTop.cmake
+++ CMake/vtkModuleTop.cmake
@@ -76,6 +76,7 @@

 # Provide an option for all modules.
 option(VTK_BUILD_ALL_MODULES "Request to build all modules" OFF)
+mark_as_advanced(VTK_BUILD_ALL_MODULES)

 # Provide an option for each module.
 foreach(vtk-module ${VTK_MODULES_ALL})


- Make APK generator aware of release and debug mode

--- cmake/Modules/AndroidApkBuild.cmake
+++ cmake/Modules/AndroidApkBuild.cmake
@@ -127,10 +127,18 @@
         PRE_BUILD
         WORKING_DIRECTORY ${BUILD_OUTDIR}
         )
-    add_custom_command ( TARGET ${Target_Name}
-        COMMAND ${ANDROID_ANT_PROGRAM} debug
-        POST_BUILD
-        WORKING_DIRECTORY ${BUILD_OUTDIR}
-        )
+    if(CMAKE_BUILD_TYPE MATCHES Debug)
+        add_custom_command ( TARGET ${Target_Name}
+            COMMAND ${ANDROID_ANT_PROGRAM} debug
+            POST_BUILD
+            WORKING_DIRECTORY ${BUILD_OUTDIR}
+            )
+    else()
+        add_custom_command ( TARGET ${Target_Name}
+            COMMAND ${ANDROID_ANT_PROGRAM} release
+            POST_BUILD
+            WORKING_DIRECTORY ${BUILD_OUTDIR}
+            )
+    endif()

 endmacro()


[Driver] Change layout of per-target runtimes to resemble multiarch

This is a follow up to r361432, changing the layout of per-target
runtimes to more closely resemble multiarch. While before, we used
the following layout:

[RESOURCE_DIR]/<target>/lib/libclang_rt.<runtime>.<ext>

Now we use the following layout:

[RESOURCE_DIR]/lib/<target>/libclang_rt.<runtime>.<ext>

This also more closely resembles the existing "non-per-target" layout:

[RESOURCE_DIR]/lib/<os>/libclang_rt.<runtime>-<arch>.<ext>

This change will enable further simplification of the driver logic
in follow up changes.

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

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

--- cmake/Modules/CompilerRTUtils.cmake
+++ cmake/Modules/CompilerRTUtils.cmake
@@ -365,7 +365,7 @@
 function(get_compiler_rt_install_dir arch install_dir)
   if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
     get_compiler_rt_target(${arch} target)
-    set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/${target}/lib PARENT_SCOPE)
+    set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/lib/${target} PARENT_SCOPE)
   else()
     set(${install_dir} ${COMPILER_RT_LIBRARY_INSTALL_DIR} PARENT_SCOPE)
   endif()
@@ -374,7 +374,7 @@
 function(get_compiler_rt_output_dir arch output_dir)
   if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
     get_compiler_rt_target(${arch} target)
-    set(${output_dir} ${COMPILER_RT_OUTPUT_DIR}/${target}/lib PARENT_SCOPE)
+    set(${output_dir} ${COMPILER_RT_OUTPUT_DIR}/lib/${target} PARENT_SCOPE)
   else()
     set(${output_dir} ${COMPILER_RT_LIBRARY_OUTPUT_DIR} PARENT_SCOPE)
   endif()


Added warning when MSVC_VERSION is not recognized

--- cmake/OpenCVDetectCXXCompiler.cmake
+++ cmake/OpenCVDetectCXXCompiler.cmake
@@ -114,6 +114,8 @@
     set(OpenCV_RUNTIME vc14)
   elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911)
     set(OpenCV_RUNTIME vc15)
+  else()
+    message(WARNING "OpenCV does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set OpenCV_RUNTIME")
   endif()
 elseif(MINGW)
   set(OpenCV_RUNTIME mingw)


Removed sysroot compiler option, as gcc in Travis does not support it

--- cmake/arm-none-eabi-toolchain.cmake
+++ cmake/arm-none-eabi-toolchain.cmake
@@ -2,7 +2,6 @@
 set(TARGET_TRIPLET "arm-none-eabi")

 set(CMAKE_C_COMPILER "/usr/bin/${TARGET_TRIPLET}-gcc")
-set(CMAKE_SYSROOT "/usr/${TARGET_TRIPLET}")

 set(CMAKE_SYSTEM_PROCESSOR "arm")


Enable TkDND on MacOS

Enable TkDND on MacOS

--- cmake/external_projects/tcltk.cmake
+++ cmake/external_projects/tcltk.cmake
@@ -30,24 +30,21 @@
     LOG_INSTALL 1
     )

-  #ExternalProject_Add(tkdnd
-    #DEPENDS tcl tk
-    #URL "http://sourceforge.net/projects/tkdnd/files/TkDND/TkDND%202.8/tkdnd2.8-src.tar.gz"
-    #URL_MD5 a6d47a996ea957416469b12965d4db91
-    #DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
-    #PATCH_COMMAND  patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/tkdnd_macosx.patch
-    #UPDATE_COMMAND "" # Disable update
-    #BUILD_IN_SOURCE 1
-    #CONFIGURE_COMMAND ./configure --with-tcl=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework --with-tk=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tk.framework --prefix=${CMAKE_INSTALL_PREFIX}/../MacOS --libdir=${CMAKE_INSTALL_PREFIX}/../MacOS
-    #BUILD_COMMAND make
-    #INSTALL_COMMAND make install
-    #LOG_DOWNLOAD 1
-    #LOG_CONFIGURE 1
-    #LOG_BUILD 1
-    #LOG_INSTALL 1
-    #)
+  ExternalProject_Add(project_tkdnd
+    URL "https://sourceforge.net/projects/tkdnd/files/OS%20X%20Binaries/TkDND%202.8/tkdnd2.8-OSX-MountainLion.tar.gz"
+    URL_MD5 2dbb471b1d66c5f391f3c3c5b71548fb
+    DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
+    BUILD_IN_SOURCE 1
+    CONFIGURE_COMMAND ""
+    BUILD_COMMAND ""
+    INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory . ${CMAKE_INSTALL_PREFIX}/../MacOS
+    LOG_DOWNLOAD 1
+    LOG_CONFIGURE 1
+    LOG_BUILD 1
+    LOG_INSTALL 1
+    )

-  list(APPEND NETGEN_DEPENDENCIES project_tcl project_tk)
+  list(APPEND NETGEN_DEPENDENCIES project_tcl project_tk project_tkdnd)
   list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}../Frameworks)
   set(TCL_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework/Headers)
   set(TCL_LIBRARY ${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework)


LXQtTranslateTs.cmake: Use/update template in remote repo

...if possible

--- cmake/modules/LXQtTranslateTs.cmake
+++ cmake/modules/LXQtTranslateTs.cmake
@@ -222,10 +222,11 @@
     #project/module can use it's own translations (not from external)
     if (EXISTS "${TR_TRANSLATION_DIR}/${TR_REPO_SUBDIR}/")
         file(GLOB tsFiles "${TR_TRANSLATION_DIR}/${TR_REPO_SUBDIR}/*_*.ts")
+        set(templateFile "${TR_TRANSLATION_DIR}/${TR_REPO_SUBDIR}/${TR_TEMPLATE}.ts")
     else ()
         file(GLOB tsFiles "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}_*.ts")
+        set(templateFile "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}.ts")
     endif ()
-    set(templateFile "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}.ts")

     if(TR_USE_QT5)
         # Qt5


enabling ISPC on Apple NEON again

enabling ISPC on Apple NEON again

--- common/cmake/platforms/darwin.cmake
+++ common/cmake/platforms/darwin.cmake
@@ -6,11 +6,5 @@
     MESSAGE(STATUS "Building for Apple silicon")
     SET(EMBREE_ARM ON)
     SET(EMBREE_NEON_AVX2_EMULATION ON)
-    SET(EMBREE_ISPC_SUPPORT         OFF     CACHE   BOOL    "" FORCE)
 ENDIF()

-SET(EMBREE_TUTORIALS            ON      CACHE   BOOL    "")
-# SET(EMBREE_TUTORIALS_GLFW       ON      CACHE   BOOL    "")
-# SET(EMBREE_TUTORIALS_LIBPNG     ON      CACHE   BOOL    "")
-# SET(EMBREE_TUTORIALS_LIBJPEG    ON      CACHE   BOOL    "")
-SET(EMBREE_RAY_PACKETS          ON      CACHE   BOOL    "")


Remove uncommented stuff.

Remove uncommented stuff.

--- clang.cmake
+++ clang.cmake
@@ -6,11 +6,3 @@

 MESSAGE (STATUS "Found CLANG toolchain")

-###set (BOOST_ROOT /opt/boost-1.52.0/)
-# adjust the default behaviour of the FIND_XXX() commands:
-# search headers and libraries in the target environment, search
-# programs in the host environment
-#set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-#set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-#set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-


Setup {DY,}LD_LIBRARY_PATH in clazy shell script

Summary:
This allows us to launch clazy from the build folder without
installing it first. It also allows us to install clazy into
some path and launch it from there directly, without first having
to setup the environment manually.

Test Plan:
- launched clazy without installation from build dir
- installed clazy into an arbitrary path and launched from there

Reviewers: smartins

Reviewed By: smartins

Differential Revision: https://phabricator.kde.org/D5298

--- clazy.cmake
+++ clazy.cmake
@@ -76,4 +76,18 @@
   exit
 fi

-${CLANGXX:-clang++} -Qunused-arguments -Xclang -load -Xclang ClangLazy@CMAKE_SHARED_LIBRARY_SUFFIX@ -Xclang -add-plugin -Xclang clang-lazy $@
+ClangLazyLib=ClangLazy@CMAKE_SHARED_LIBRARY_SUFFIX@
+
+if ( test -f "$libdir/$ClangLazyLib" )
+then
+    # find plugin libraries in install dir
+    export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH
+    export DYLD_LIBRARY_PATH=$libdir:$DYLD_LIBRARY_PATH
+elif ( test -f "$(dirname $0)/lib/$ClangLazyLib" )
+then
+    # find plugin libraries in build dir
+    export LD_LIBRARY_PATH=$(dirname $0)/lib:$LD_LIBRARY_PATH
+    export DYLD_LIBRARY_PATH=$(dirname $0)/lib:$DYLD_LIBRARY_PATH
+fi
+
+${CLANGXX:-clang++} -Qunused-arguments -Xclang -load -Xclang $ClangLazyLib -Xclang -add-plugin -Xclang clang-lazy $@


Add upload-package target.

Add upload-package target.

	* build-aux/cmake/modules/GostaiCPack.cmake: Here.

--- build-aux/cmake/modules/GostaiCPack.cmake
+++ build-aux/cmake/modules/GostaiCPack.cmake
@@ -79,11 +79,14 @@
   if(UNIX)
     if(APPLE)
       set(CPACK_GENERATOR "PackageMaker")
+      set(CPACK_PACKAGE_FILE_NAME_EXTENSION ".pkg")
     else(APPLE)
       set(CPACK_GENERATOR "STGZ")
+      set(CPACK_PACKAGE_FILE_NAME_EXTENSION ".sh")
     endif(APPLE)
   else(UNIX)
     set(CPACK_GENERATOR "NSIS")
+    set(CPACK_PACKAGE_FILE_NAME_EXTENSION ".exe")
   endif(UNIX)
 endif(NOT CPACK_GENERATOR)

@@ -124,4 +127,18 @@
   endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
 endif(WIN32 AND NOT UNIX)

+# ========================= #
+# Add upload-package target #
+# ========================= #
+
+set(UPLOAD_PACKAGE_URL "build@gate-bf:release/${CPACK_PACKAGE_NAME}"
+  CACHE STRING "The URL where to upload the generated package.")
+add_custom_target(upload-package
+  COMMAND
+  scp -q
+  "${CPACK_PACKAGE_FILE_NAME}${CPACK_PACKAGE_FILE_NAME_EXTENSION}"
+  ${UPLOAD_PACKAGE_URL}
+  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+  COMMENT "Uploading package to ${UPLOAD_PACKAGE_URL}")
+
 endif(NOT DEFINED CPACK_INFO_CMAKE)


devices.cmake: changed VPR pack debug option

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- make/devices.cmake
+++ make/devices.cmake
@@ -997,7 +997,7 @@
     OUTPUT ${ECHO_OUT_NET}
     DEPENDS ${OUT_EBLIF} ${OUT_IO} ${VPR_DEPS}
     COMMAND ${CMAKE_COMMAND} -E make_directory ${OUT_LOCAL}/echo
-    COMMAND cd ${OUT_LOCAL}/echo && ${VPR_CMD} --debug_clustering on --echo_file on --pack
+    COMMAND cd ${OUT_LOCAL}/echo && ${VPR_CMD} --pack_verbosity 3 --echo_file on --pack
     COMMAND
       ${CMAKE_COMMAND} -E copy ${OUT_LOCAL}/echo/vpr_stdout.log ${OUT_LOCAL}/echo/pack.log
     )