I think this now supports the QUIET and REQUIRED options

svn path=/trunk/KDE/kdepim/; revision=638635

--- cmake/modules/FindGpgme.cmake
+++ cmake/modules/FindGpgme.cmake
@@ -14,7 +14,7 @@
   FIND_PROGRAM(GPGMECONFIG_EXECUTABLE NAMES gpgme-config)

   # if gpgme-config has been found
-  if (GPGMECONFIG_EXECUTABLE AND GPGME_VERSION)
+  if (GPGMECONFIG_EXECUTABLE)

     EXEC_PROGRAM(${GPGMECONFIG_EXECUTABLE} ARGS --version OUTPUT_VARIABLE GPGME_VERSION)

@@ -43,19 +43,37 @@
       message(STATUS "The installed version of gpgme is too old: ${GPGME_VERSION}")
     endif (GPGME_INSTALLED_VERSION_OK)

-  endif (GPGMECONFIG_EXECUTABLE AND GPGME_VERSION)
+  endif (GPGMECONFIG_EXECUTABLE)

   if (GPGME_LIBRARIES)
       set(GPGME_FOUND TRUE)
-      #message(STATUS "Found gpgme: includes: ${GPGME_INCLUDES} libs: ${GPGME_LIBRARIES}")
-      message(STATUS "Found gpgme using ${GPGMECONFIG_EXECUTABLE}.")
   endif (GPGME_LIBRARIES)

-  #if (NOT GPGME_FOUND)
-  #    message(FATAL_ERROR "You are missing gpgme 0.4.5 or higher.
-  #  Download gpgme >= 0.4.5 from ftp://ftp.gnupg.org/gcrypt/alpha/gpgme")
-  #endif (NOT GPGME_FOUND)
 else (NOT GPGME_LIBRARIES OR NOT GPGME_INCLUDES)
   # It was found before, assume it's OK
   set(GPGME_FOUND TRUE)
 endif (NOT GPGME_LIBRARIES OR NOT GPGME_INCLUDES)
+
+macro_bool_to_01(GPGME_FOUND HAVE_GPGME)
+
+if (NOT Gpgme_FIND_QUIETLY)
+   if (GPGME_FOUND)
+      message(STATUS "Found gpgme.")
+   else (GPGME_FOUND)
+      message(STATUS "gpg not found.")
+   endif (GPGME_FOUND)
+   if (Gpgme_FIND_REQUIRED)
+      set (_req TRUE)
+   else (Gpgme_FIND_REQUIRED)
+      set (_req FALSE)
+   endif (Gpgme_FIND_REQUIRED)
+   macro_log_feature(GPGME_FOUND "gpgme" "GnuPG Made Easy Development Libraries" "http://www.gnupg.org/related_software/gpgme" ${_req} "0.4.5 or greater" "Needed to provide GNU Privacy Guard support in KDE PIM applications. Necessary to compile many PIM application, including KMail.")
+else (NOT Gpgme_FIND_QUIETLY)
+   if (NOT GPGME_FOUND)
+      if (Gpgme_FIND_REQUIRED)
+         message(FATAL_ERROR "")
+      endif (Gpgme_FIND_REQUIRED)
+   endif (NOT GPGME_FOUND)
+endif (NOT Gpgme_FIND_QUIETLY)
+
+


systemd: Add pidfile entry for gige-daemon

This ensures the lock file is cleaned up when the daemon not correctly stops.

--- data/systemd/gige-daemon.service.cmake
+++ data/systemd/gige-daemon.service.cmake
@@ -4,6 +4,7 @@
 After=network.target

 [Service]
+PIDFile=/var/lock/gige-daemon.lock
 Type=simple
 ExecStart=@CMAKE_INSTALL_PREFIX@/bin/gige-daemon start --no-fork
 ExecStop=@CMAKE_INSTALL_PREFIX@/bin/gige-daemon stop


iOS c++11 flags

iOS c++11 flags

--- ios.cmake
+++ ios.cmake
@@ -11,7 +11,7 @@

 set(
     POLLY_TOOLCHAIN_NAME
-    "iOS Universal (iphoneos + iphonesimulator)
+    "iOS Universal (iphoneos + iphonesimulator) / c++11 support"
 )
 set(POLLY_TOOLCHAIN_TAG "ios")

@@ -129,3 +129,5 @@

 # support for hunter (github.com/ruslo/hunter)
 set(HUNTER_CMAKE_GENERATOR Xcode)
+
+include("${CMAKE_CURRENT_LIST_DIR}/flags/cxx11.cmake")


Disabling CCFits-hunter

Disabling CCFits-hunter

because intel

--- tests/hunter.cmake
+++ tests/hunter.cmake
@@ -10,11 +10,11 @@
   message(FATAL_ERROR "Did not use hunter to download CFitsIO")
 endif()

-hunter_add_package(CCFits)
-find_package(CCFits REQUIRED)
-if(NOT CCFits_INCLUDE_DIR MATCHES "${HUNTER_ROOT}/.*")
-  message(FATAL_ERROR "Did not use hunter to download CCFits")
-endif()
+# hunter_add_package(CCFits)
+# find_package(CCFits REQUIRED)
+# if(NOT CCFits_INCLUDE_DIR MATCHES "${HUNTER_ROOT}/.*")
+#   message(FATAL_ERROR "Did not use hunter to download CCFits")
+# endif()

 # hunter_add_package(GBenchmark)
 # find_package(GBenchmark REQUIRED)


Remove the self-executable HTML shell-file hack. Related to commit 9fd287bde6e4f6f6a5c39393603afc56c6b030cc. Revert db908c2be5a3e7551b17a5aa7ace8cff33ebf607.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -1528,16 +1528,9 @@
     # Need to check if the destination variable is defined first because this macro could be called by downstream project that does not wish to install anything
     if (NOT ARG_PRIVATE)
         if (WEB AND DEST_BUNDLE_DIR)
-            set (EXTS data html.map js wasm)
-            if (SELF_EXECUTABLE_SHELL)
-                # Install it as program so it gets the correct file permission
-                install (PROGRAMS $<TARGET_FILE:${TARGET_NAME}> DESTINATION ${DEST_BUNDLE_DIR})
-            else ()
-                list (APPEND EXTS html)
-            endif ()
             set (LOCATION $<TARGET_FILE_DIR:${TARGET_NAME}>)
             unset (FILES)
-            foreach (EXT ${EXTS})
+            foreach (EXT data html html.map js wasm)
                 list (APPEND FILES ${LOCATION}/${TARGET_NAME}.${EXT})
             endforeach ()
             install (FILES ${FILES} DESTINATION ${DEST_BUNDLE_DIR} OPTIONAL)
@@ -1652,10 +1645,6 @@
                     get_property (EMCC_OPTION SOURCE ${FILE} PROPERTY EMCC_OPTION)
                     if (EMCC_OPTION STREQUAL shell-file)
                         list (APPEND TARGET_PROPERTIES SUFFIX .html)
-                        # Check if the shell-file is self-executable
-                        file (READ ${FILE} SHEBANG LIMIT 3)     # Workaround CMake's funny way of file I/O operation
-                        string (COMPARE EQUAL ${SHEBANG} "#!\n" SELF_EXECUTABLE_SHELL)
-                        set (HAS_SHELL_FILE 1)
                         break ()
                     endif ()
                 endforeach ()
@@ -1664,7 +1653,6 @@
                     if (URHO3D_TESTING OR EMSCRIPTEN_AUTO_SHELL)
                         add_html_shell ()
                         list (APPEND TARGET_PROPERTIES SUFFIX .html)
-                        set (SELF_EXECUTABLE_SHELL 1)
                         set (HAS_SHELL_FILE 1)
                     endif ()
                 endif ()
@@ -1847,10 +1835,6 @@
                 list (APPEND LINK_FLAGS "--${EMCC_OPTION} \"${FILE}\"${EMCC_FILE_ALIAS}${EMCC_EXCLUDE_FILE}${USE_PRELOAD_CACHE}")
             endif ()
         endforeach ()
-        # If it is a self-executable shell-file then change the file permission of the output file accordingly
-        if (SELF_EXECUTABLE_SHELL AND NOT CMAKE_HOST_WIN32)
-            add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND chmod +x $<TARGET_FILE:${TARGET_NAME}>)
-        endif ()
     endif ()
     # Set additional linker dependencies (only work for Makefile-based generator according to CMake documentation)
     if (LINK_DEPENDS)


fix gtest byproducts

fix gtest byproducts

--- CMakeModules/build_gtest.cmake
+++ CMakeModules/build_gtest.cmake
@@ -73,12 +73,12 @@
     LOG_BUILD 0)
 ENDFUNCTION(GTEST_BUILD)

-GTEST_BUILD(googletest              ${CMAKE_BUILD_TYPE} ${binary_dir} ${byproducts})
+GTEST_BUILD(googletest              ${CMAKE_BUILD_TYPE} ${binary_dir} "${byproducts}")

 # If we are on OSX and using the clang compiler go ahead and build
 # GTest using libstdc++ just in case we compile the CUDA backend
 IF("${APPLE}" AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-    GTEST_BUILD(googletest_libstdcpp    LibStdCpp           ${stdlib_binary_dir} ${byproducts_libstdcpp})
+    GTEST_BUILD(googletest_libstdcpp    LibStdCpp           ${stdlib_binary_dir} "${byproducts_libstdcpp}")
 ENDIF("${APPLE}" AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")

 foreach(lib ${GTEST_LIBRARIES})


[CMake] NFC. Missed the other uses in r280406

Doh! Obviously need to slow down.

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@280407 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/HandleOutOfTreeLLVM.cmake
+++ cmake/Modules/HandleOutOfTreeLLVM.cmake
@@ -67,10 +67,10 @@
   # The intent is that this doesn't necessarily mean the LLVM is installed (it
   # could be a build directory), but it means we need to treat the LLVM
   # directory as read-only.
-  set(LIBCXX_USING_INSTLLED_LLVM 1)
+  set(LIBCXX_USING_INSTALLED_LLVM 1)
 endif()

-if (LIBCXX_USING_INSTLLED_LLVM OR LIBCXX_STANDALONE_BUILD)
+if (LIBCXX_USING_INSTALLED_LLVM OR LIBCXX_STANDALONE_BUILD)
   set(LIBCXX_STANDALONE_BUILD 1)
   message(STATUS "Configuring for standalone build.")


haskell-debian-strech: fix copy mistake

haskell-debian-strech: fix copy mistake

--- cmake/Modules/LibAddHaskellPlugin.cmake
+++ cmake/Modules/LibAddHaskellPlugin.cmake
@@ -347,7 +347,7 @@
 		set (CABAL_OPTS "--enable-shared")
 	endif (BUILD_SHARED OR BUILD_FULL)
 	file (WRITE "${CMAKE_CURRENT_BINARY_DIR}/cabalOptionalDependencies.cmake"
-		"execute_process (COMMAND ${CABAL_EXECUTABLE} ${CABAL_OPTS} install -v0)")
+		"execute_process (COMMAND ${CABAL_EXECUTABLE} ${CABAL_OPTS} install --only-dependencies -v0)")
 	add_custom_command (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cabal.sandbox.config"
 		# ensure any further dependencies added by plugin developers get installed to the sandbox
 		COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/cabalOptionalDependencies.cmake"


Bugfix

Bugfix

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

--- deal.II/cmake/macros/macro_cond_set_to_yes.cmake
+++ deal.II/cmake/macros/macro_cond_set_to_yes.cmake
@@ -9,6 +9,8 @@
 MACRO(COND_SET_TO_YES bool variable)
   IF(${bool})
     SET(${variable} "yes")
+  ELSE()
+    SET(${variable} "no")
   ENDIF()
 ENDMACRO()


Android toolchain: fixed try_compile problem with old cmake versions

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -36,13 +36,13 @@
 #    ANDROID_NDK=/opt/android-ndk - path to the NDK root.
 #      Can be set as environment variable. Can be set only at first cmake run.
 #
-#    ANDROID_STANDALONE_TOOLCHAIN=/opt/android-toolchain - path to the
+#    ANDROID_STANDALONE_TOOLCHAIN=/opt/android-toolchain - path to the
 #      standalone toolchain. This option is not used if full NDK is found
 #      (ignored if ANDROID_NDK is set).
 #      Can be set as environment variable. Can be set only at first cmake run.
 #
 #    ANDROID_ABI=armeabi-v7a -  specifies the target Application Binary
-#      Interface (ABI). This option nearly matches to the APP_ABI variable
+#      Interface (ABI). This option nearly matches to the APP_ABI variable
 #      used by ndk-build tool from Android NDK.
 #      Possible values are:
 #        "armeabi" - matches to the NDK ABI with the same name.
@@ -94,10 +94,10 @@
 #      The flags will be prepopulated with critical flags, so don't loose them.
 #      Also be aware that toolchain also sets configuration-specific compiler
 #      flags and linker flags.
-#
-#    ANDROID and BUILD_ANDROID will be set to true, you may test any of these
+#
+#    ANDROID and BUILD_ANDROID will be set to true, you may test any of these
 #    variables to make necessary Android-specific configuration changes.
-#
+#
 #    Also ARMEABI or ARMEABI_V7A or X86 will be set true, mutually exclusive.
 #    NEON option will be set true if VFP is set to NEON.
 #
@@ -131,7 +131,7 @@
 #         cmake pass
 #     [~] toolchain exits with error if ARM_TARGET is not recognized
 #   - modified June 2011
-#     [~] default NDK path is updated for version r5c
+#     [~] default NDK path is updated for version r5c
 #     [+] variable CMAKE_SYSTEM_PROCESSOR is set based on ARM_TARGET
 #     [~] toolchain install directory is added to linker paths
 #     [-] removed SWIG-related stuff from toolchain
@@ -705,12 +705,14 @@
 set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_SOURCE_DIR} CACHE PATH "root for library output, set this to change where android libs are installed to" )
 set( CMAKE_INSTALL_PREFIX "${ANDROID_TOOLCHAIN_ROOT}/user" CACHE STRING "path for installing" )

-if( EXISTS "${CMAKE_SOURCE_DIR}/jni/CMakeLists.txt" )
- set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_ABI_NAME}" CACHE PATH "Output directory for applications" )
-else()
- set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin" CACHE PATH "Output directory for applications" )
-endif()
-set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}" CACHE PATH "path for android libs" )
+if(NOT _CMAKE_IN_TRY_COMPILE)
+ if( EXISTS "${CMAKE_SOURCE_DIR}/jni/CMakeLists.txt" )
+  set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_ABI_NAME}" CACHE PATH "Output directory for applications" )
+ else()
+  set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin" CACHE PATH "Output directory for applications" )
+ endif()
+ set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}" CACHE PATH "path for android libs" )
+endif()

 #includes
 list( APPEND ANDROID_SYSTEM_INCLUDE_DIRS "${ANDROID_SYSROOT}/usr/include" )
@@ -960,7 +962,7 @@
 set( ANDROID True )
 set( BUILD_ANDROID True )

-# where is the target environment
+# where is the target environment
 set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )

 # only search for libraries and includes in the ndk toolchain
@@ -1053,7 +1055,7 @@
 #   ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips"
 #   ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14 (depends on NDK version)
 #   ANDROID_SET_OBSOLETE_VARIABLES : ON/OFF
-#   ANDROID_USE_STLPORT : OFF/ON - EXPERIMENTAL!!!
+#   ANDROID_USE_STLPORT : OFF/ON - EXPERIMENTAL!!!
 #   ANDROID_FORBID_SYGWIN : ON/OFF
 #   ANDROID_NO_UNDEFINED : ON/OFF
 #   ANDROID_SO_UNDEFINED : OFF/ON  (default depends on NDK version)


Fix merge bug, old sse2 ISA target trick no longer needed

--- components/ospcommon/cmake/macros.cmake
+++ components/ospcommon/cmake/macros.cmake
@@ -96,7 +96,6 @@

   IF (OSPRAY_BUILD_ISA STREQUAL "ALL")

-    SET(OSPRAY_ISPC_TARGET_LIST ${OSPRAY_ISPC_TARGET_LIST} sse2)
     IF(EMBREE_ISA_SUPPORTS_SSE4)
       SET(OSPRAY_ISPC_TARGET_LIST ${OSPRAY_ISPC_TARGET_LIST} sse4)
       MESSAGE(STATUS "OSPRay SSE4 ISA target enabled.")


Add VPR echo targets and VPR_EXTRA_ARGS cache variables.

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

--- make/devices.cmake
+++ make/devices.cmake
@@ -377,6 +377,19 @@
   set_target_properties(${name} PROPERTIES ${property} ${file})
 endfunction()

+set(VPR_BASE_ARGS
+    --min_route_chan_width_hint 100
+    --route_chan_width 100
+    --verbose_sweep on
+    --allow_unrelated_clustering off
+    --max_criticality 0.0
+    --target_ext_pin_util 0.7
+    --max_router_iterations 500
+    --routing_failure_predictor off
+    --clock_modeling route
+    --constant_net_method route
+    CACHE STRING "Base VPR arguments")
+set(VPR_EXTRA_ARGS "" CACHE STRING "Extra VPR arguments")
 function(ADD_FPGA_TARGET_BOARDS)
   # ~~~
   # ADD_FPGA_TARGET_BOARDS(
@@ -574,6 +587,13 @@
       ${CMAKE_COMMAND} -E make_directory ${OUT_LOCAL}
   )

+  set(ECHO_DIRECTORY_TARGET ${NAME}-${FQDN}-make-directory-echo)
+  add_custom_target(
+    ${ECHO_DIRECTORY_TARGET} ALL
+    COMMAND
+      ${CMAKE_COMMAND} -E make_directory ${OUT_LOCAL}/echo
+  )
+
   # Create target to handle all output paths of off
   add_custom_target(${NAME})
   set(VPR_ROUTE_CHAN_WIDTH 100)
@@ -640,23 +660,21 @@
   endforeach()

   get_target_property_required(VPR env VPR)
+  separate_arguments(
+    VPR_BASE_ARGS_LIST UNIX_COMMAND "${VPR_BASE_ARGS}"
+    )
+  separate_arguments(
+    VPR_EXTRA_ARGS_LIST UNIX_COMMAND "${VPR_EXTRA_ARGS}"
+    )
   set(
     VPR_CMD
     ${VPR}
     ${DEVICE_MERGED_FILE_LOCATION}
     ${OUT_EBLIF}
     --device ${DEVICE_FULL}
-    --min_route_chan_width_hint ${VPR_ROUTE_CHAN_MINWIDTH_HINT}
-    --route_chan_width ${VPR_ROUTE_CHAN_WIDTH}
     --read_rr_graph ${OUT_RRXML_REAL_LOCATION}
-    --verbose_sweep on
-    --allow_unrelated_clustering off
-    --max_criticality 0.0
-    --target_ext_pin_util 0.7
-    --max_router_iterations 500
-    --routing_failure_predictor off
-    --clock_modeling route
-    --constant_net_method route
+    ${VPR_BASE_ARGS_LIST}
+    ${VPR_EXTRA_ARGS_LIST}
   )

   # Generate IO constraints file.
@@ -706,6 +724,16 @@
     WORKING_DIRECTORY ${OUT_LOCAL}
   )

+  set(ECHO_OUT_NET ${OUT_LOCAL}/echo/${TOP}.net)
+  add_custom_command(
+    OUTPUT ${ECHO_OUT_NET}
+    DEPENDS ${OUT_EBLIF} ${OUT_IO} ${VPR_DEPS}
+    COMMAND ${VPR_CMD} --echo_file on --pack
+    COMMAND
+      ${CMAKE_COMMAND} -E copy ${OUT_LOCAL}/echo/vpr_stdout.log ${OUT_LOCAL}/echo/pack.log
+    WORKING_DIRECTORY ${OUT_LOCAL}/echo
+  )
+
   # Generate placement.
   # -------------------------------------------------------------------------
   set(OUT_PLACE ${OUT_LOCAL}/${TOP}.place)
@@ -719,6 +747,17 @@
     WORKING_DIRECTORY ${OUT_LOCAL}
   )

+  set(ECHO_OUT_PLACE ${OUT_LOCAL}/echo/${TOP}.place)
+  add_custom_command(
+    OUTPUT ${ECHO_OUT_PLACE}
+    DEPENDS ${ECHO_OUT_NET} ${OUT_IO} ${VPR_DEPS}
+    COMMAND ${VPR_CMD} ${FIX_PINS_ARG} --place
+    COMMAND
+      ${CMAKE_COMMAND} -E copy ${OUT_LOCAL}/echo/vpr_stdout.log
+        ${OUT_LOCAL}/echo/place.log
+    WORKING_DIRECTORY ${OUT_LOCAL}/echo
+  )
+
   # Generate routing.
   # -------------------------------------------------------------------------
   add_custom_command(
@@ -727,8 +766,18 @@
     COMMAND ${VPR_CMD} --route
     WORKING_DIRECTORY ${OUT_LOCAL}
   )
-
   add_custom_target(${NAME}_route DEPENDS ${OUT_ROUTE})
+
+  set(ECHO_ATOM_NETLIST_ORIG ${OUT_LOCAL}/echo/atom_netlist.orig.echo.blif)
+  set(ECHO_ATOM_NETLIST_CLEANED ${OUT_LOCAL}/echo/atom_netlist.cleaned.echo.blif)
+  add_custom_command(
+    OUTPUT ${ECHO_ATOM_NETLIST_ORIG} ${ECHO_ATOM_NETLIST_CLEANED}
+      ${OUT_LOCAL}/echo/atom_netlist.cleaned.echo.blif
+    DEPENDS ${ECHO_OUT_PLACE} ${ECHO_OUT_IO} ${VPR_DEPS} ${ECHO_DIRECTORY_TARGET}
+    COMMAND ${VPR_CMD} --echo_file on --route
+    WORKING_DIRECTORY ${OUT_LOCAL}/echo
+  )
+  add_custom_target(${NAME}_route_echo DEPENDS ${OUT_ROUTE})

   # Generate bitstream
   # -------------------------------------------------------------------------
@@ -829,6 +878,7 @@
       EQUIV_CHECK_SCRIPT ${ADD_FPGA_TARGET_EQUIV_CHECK_SCRIPT}
       DEPENDS ${SOURCE_FILES} ${SOURCE_FILES_DEPS} ${OUT_BIT_VERILOG}
       )
+
     add_check_test(
       NAME ${NAME}_check_eblif
       ARCH ${ARCH}
@@ -836,6 +886,27 @@
       READ_GATE "read_blif -wideports ${OUT_EBLIF} $<SEMICOLON> rename ${TOP} gate"
       EQUIV_CHECK_SCRIPT ${ADD_FPGA_TARGET_EQUIV_CHECK_SCRIPT}
       DEPENDS ${SOURCE_FILES} ${SOURCE_FILES_DEPS} ${OUT_EBLIF}
+      )
+
+    # Add post-route and post-synthesis check tests to all_check_tests.
+    add_dependencies(all_check_tests ${NAME}_check ${NAME}_check_eblif)
+
+    add_check_test(
+      NAME ${NAME}_check_orig_blif
+      ARCH ${ARCH}
+      READ_GOLD "read_verilog ${SOURCE_FILES} $<SEMICOLON> rename ${TOP} gold"
+      READ_GATE "read_blif -wideports ${ECHO_ATOM_NETLIST_ORIG} $<SEMICOLON> rename ${TOP} gate"
+      EQUIV_CHECK_SCRIPT ${ADD_FPGA_TARGET_EQUIV_CHECK_SCRIPT}
+      DEPENDS ${SOURCE_FILES} ${SOURCE_FILES_DEPS} ${ECHO_ATOM_NETLIST_ORIG}
+      )
+
+    add_check_test(
+      NAME ${NAME}_check_cleaned_blif
+      ARCH ${ARCH}
+      READ_GOLD "read_verilog ${SOURCE_FILES} $<SEMICOLON> rename ${TOP} gold"
+      READ_GATE "read_blif -wideports ${ECHO_ATOM_NETLIST_CLEANED} $<SEMICOLON> rename ${TOP} gate"
+      EQUIV_CHECK_SCRIPT ${ADD_FPGA_TARGET_EQUIV_CHECK_SCRIPT}
+      DEPENDS ${SOURCE_FILES} ${SOURCE_FILES_DEPS} ${ECHO_ATOM_NETLIST_CLEANED}
       )
   endif()
 endfunction()
@@ -911,9 +982,6 @@
     DEPENDS ${ADD_CHECK_TEST_DEPENDS} ${PATH_TO_CELLS_SIM} ${EQUIV_CHECK_SCRIPT_TARGET} ${EQUIV_CHECK_SCRIPT_LOCATION}
     VERBATIM
     )
-
-  # Add this check list to the catch all target "all_check_tests".
-  add_dependencies(all_check_tests ${ADD_CHECK_TEST_NAME})
 endfunction()

 function(add_testbench)


test targets naming unification + removing of misleading target with ctest run

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -8,7 +8,7 @@
   target_link_libraries(${app} but)
   target_link_libraries(${app} gmock_main gmock gtest)
   target_link_libraries(${app} boost_serialization boost_filesystem boost_system)
-  add_test(NAME run-${app} COMMAND ${CMAKE_BINARY_DIR}/${app})
+  add_test(NAME run_${app} COMMAND ${CMAKE_BINARY_DIR}/${app})
   list(APPEND TEST_TARGETS ${app})
 endforeach()

@@ -22,13 +22,8 @@
   list(APPEND TEST_TARGETS        ${app})
 endforeach()

-add_custom_target(but_manual    DEPENDS ${TEST_TARGETS_MANUAL})
-add_custom_target(but_tests_all DEPENDS ${TEST_TARGETS})
+add_custom_target(but_tests_manual DEPENDS ${TEST_TARGETS_MANUAL})
+add_custom_target(but_tests_auto   DEPENDS ${TEST_TARGETS})

 # enables ctest (otherwise tests would be discarded)
 enable_testing()
-
-add_custom_target(run-but_tests
-  COMMAND ctest
-  DEPENDS ${TEST_TARGETS}
-)


add new case for CMAKE_CXX_COMPILER_ID on macOS

--- cmake/tsimd.cmake
+++ cmake/tsimd.cmake
@@ -59,6 +59,8 @@
     include(cmake/gcc.cmake)
   elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
     include(cmake/clang.cmake)
+  elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang")
+    include(cmake/clang.cmake)
   elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
     include(cmake/msvc.cmake)
   else()


Workaround for cmake having its own C_COMPILER variable

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -74,6 +74,9 @@
           string(REGEX MATCH "ifneq \\(\\$\\(([_A-Z]+)\\),[ \t]*([0-9_A-Z]+)\\)" line_match "${makefile_line}")
           if (NOT "${line_match}" STREQUAL "")
 #            message(STATUS "IFNEQ: ${line_match} first: ${CMAKE_MATCH_1} second: ${CMAKE_MATCH_2}")
+            if ( ${CMAKE_MATCH_1} STREQUAL C_COMPILER)
+                 set (CMAKE_MATCH_1 CMAKE_C_COMPILER)
+            endif ()
             if (NOT ( ${${CMAKE_MATCH_1}} STREQUAL ${CMAKE_MATCH_2}))
 #              message (STATUS "condition is true")
               set (IfElse 1)


Enable very basic support for finding OpenCL header file and library
under windows. We hardcode a path for the AMD APP SDK just for convenience
but these needs to fixed by doing proper system introspection.

In general a user will need to specify the paths manually when using
cmake-gui.

This fixes configuration under Windows but unfortunately compilation
is still broken.

--- cmake/findopencl/FindOpenCL.cmake
+++ cmake/findopencl/FindOpenCL.cmake
@@ -51,7 +51,35 @@
     ###########################################################################
     # Windows
     ###########################################################################
-    message(FATAL_ERROR "Windows support not implemented")
+
+    # There's no standard place for the header files and libraries to live
+    # so we hard code a few guesses. If the header files or libraries aren't
+    # found then the user will need to specify their location manually by doing
+    # something like
+    #
+    # cmake -DOPENCL_INCLUDE_DIRS="/some/path/include" -DOPENCL_LIBRARIES="/some/path/OpenCL.a"
+    #
+    # or use cmake-gui to pick the file/directory.
+    find_path(OPENCL_INCLUDE_DIRS
+              NAMES CL/cl.h CL/cl.hpp
+              # FIXME: Use system introspection to provide HINTS instead
+              PATHS "C:\\Program Files (x86)\\AMD APP SDK\\2.9-1\\include"
+             )
+
+    if (NOT OPENCL_INCLUDE_DIRS)
+        message(WARNING "Could not find OpenCL header file. You will need to specify the location manually")
+    endif()
+    find_library(OPENCL_LIBRARIES
+                 NAMES OpenCL
+                 # FIXME: Use system introspection to provide HINTS instead
+                 PATHS "C:\\Program Files (x86)\\AMD APP SDK\\2.9-1\\lib\\x86_64"
+                 PATHS "C:\\Program Files (x86)\\AMD APP SDK\\2.9-1\\lib\\x86"
+                 DOC "Path to OpenCL library"
+                )
+
+    if (NOT OPENCL_LIBRARIES)
+        message(WARNING "Could not find OpenCL library. You will need to specify the location manually")
+    endif()
 else ()
     message(FATAL_ERROR "Unsupported platform")
 endif()


Try using the threads package

Try using the threads package

--- cmake/modules/FindLibCrypto.cmake
+++ cmake/modules/FindLibCrypto.cmake
@@ -78,12 +78,14 @@
     if (NOT TARGET LibCrypto::Crypto AND
         (EXISTS "${LibCrypto_LIBRARY}")
         )
+        set(THREADS_PREFER_PTHREAD_FLAG ON)
+        find_package(Threads REQUIRED)
         add_library(LibCrypto::Crypto UNKNOWN IMPORTED)
         set_target_properties(LibCrypto::Crypto PROPERTIES
             INTERFACE_INCLUDE_DIRECTORIES "${LibCrypto_INCLUDE_DIR}")
         set_target_properties(LibCrypto::Crypto PROPERTIES
             IMPORTED_LINK_INTERFACE_LANGUAGES "C"
             IMPORTED_LOCATION "${LibCrypto_LIBRARY}")
-        add_dependencies(LibCrypto::Crypto pthread)
+        add_dependencies(LibCrypto::Crypto Threads::Threads)
     endif()
 endif()


If no module name present, deduce one from the dictname

and use it to construct a name for the rootmap.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -240,14 +240,23 @@
   #---Get the library and module dependencies-----------------
   if(ARG_MODULE)
     set(target_lib_common ${libprefix}${ARG_MODULE})
-    set(rootmap_name ${target_lib_common}.rootmap)
-    set(library_name ${target_lib_common}${libsuffix})
-    set(newargs -s ${library_name})
-    set(rootmapargs -rml ${library_name} -rmf ${rootmap_name})
-    set(pcm_name ${libprefix}${ARG_MODULE}_rdict.pcm)
+  else()
+    get_filename_component(dict_base_name ${dictionary} NAME_WE)
+    string(SUBSTRING ${dictionary} 3 -1 deduced_arg_module)
+    set(target_lib_common ${libprefix}${deduced_arg_module})
+  endif()
+
+  set(rootmap_name ${target_lib_common}.rootmap)
+  set(library_name ${target_lib_common}${libsuffix})
+  set(rootmapargs -rml ${library_name} -rmf ${rootmap_name})
+
+  if(ARG_MODULE)
+    set(newargs -s ${libprefix}${ARG_MODULE}${libsuffix})
+    set(pcm_name ${libprefix}${ARG_MODULE}_rdict.pcm)
   else()
     set(pcm_name ${dictionary}_rdict.pcm)
   endif()
+
   if(ARG_DEPENDENCIES)
     foreach(dep ${ARG_DEPENDENCIES})
       set(newargs ${newargs} -m  ${libprefix}${dep}_rdict.pcm)
@@ -259,7 +268,7 @@
                      COMMAND ${rootcint_cmd} -f  ${dictionary}.cxx ${newargs} ${rootmapargs}
                                              -c ${ARG_OPTIONS} ${definitions} ${includedirs} ${rheaderfiles} ${_linkdef}
                      DEPENDS ${headerfiles} ${_linkdef} ${ROOTCINTDEP})
-  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pcm_name} DESTINATION lib COMPONENT libraries)
+  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pcm_name} ${CMAKE_CURRENT_BINARY_DIR}/${rootmap_name} DESTINATION lib COMPONENT libraries)
 endfunction()


Fix cmake debian dependencies. (#978)

Fix cmake debian dependencies. (#978)

--- cmake_modules/PHD2Packaging.cmake
+++ cmake_modules/PHD2Packaging.cmake
@@ -103,7 +103,7 @@
   # set version and arch compatible file name
   set(CPACK_PACKAGE_FILE_NAME "phd2_${CPACK_DEBIAN_PACKAGE_VERSION}_${debarch}")
   # Ubuntu 14.04 compatible minimal dependency
-  set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), libnova-0.14-0 | libnova-0.16-0, libstdc++6 (>= 4.2.1), libusb-1.0-0 (>= 2:1.0.8), libwxbase3.0-0 | libwxbase3.0-0v5 (>= 3.0.0), libwxgtk3.0-0 | libwxgtk3.0-0v5 (>=3.0.0), libx11-6, zlib1g (>= 1:1.1.4)")
+  set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), libnova-0.14-0 | libnova-0.16-0, libstdc++6 (>= 4.2.1), libusb-1.0-0 (>= 2:1.0.8), libwxbase3.0-0 | libwxbase3.0-0v5 (>= 3.0.0), libwxgtk3.0-0 | libwxgtk3.0-0v5 | libwxgtk3.0-gtk3-0v5 (>=3.0.0), libx11-6, zlib1g (>= 1:1.1.4)")
   set(CPACK_DEBIAN_PACKAGE_SUGGESTS "indi-bin (>= 0.9.7)")
   set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "PHD2 auto-guiding software")
   # same section as many astronomy packages


CMake: Android - fix installation of core resources

--- CMake/Utils/AndroidMacros.cmake
+++ CMake/Utils/AndroidMacros.cmake
@@ -27,7 +27,7 @@
     configure_file("${OGRE_TEMPLATES_DIR}/Android_resources.cfg.in" "${NDKOUT}/assets/resources.cfg" @ONLY)
     configure_file("${OGRE_TEMPLATES_DIR}/samples.cfg.in" "${NDKOUT}/assets/samples.cfg" @ONLY)

-    file(COPY "${PROJECT_SOURCE_DIR}/Media" DESTINATION "${NDKOUT}/assets")
+    file(COPY "${PROJECT_SOURCE_DIR}/Media/" DESTINATION "${NDKOUT}/assets")

     file(COPY "${PROJECT_SOURCE_DIR}/Samples/Media/models" DESTINATION "${NDKOUT}/assets")
     file(COPY "${PROJECT_SOURCE_DIR}/Samples/Media/particle" DESTINATION "${NDKOUT}/assets")


removed SOURCE_DOWNLOAD_CACHE

removed SOURCE_DOWNLOAD_CACHE

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -29,8 +29,9 @@
  endif()
 endif()

-set( SOURCE_DOWNLOAD_CACHE ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
+set( SUPERBUILD_WORK_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
     "The path for downloading external source directories" )
+set(SOURCE_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/sources/"  CACHE PATH "blabla")

 mark_as_advanced( SOURCE_DOWNLOAD_CACHE )


removed creation of default Gadgetron config

This step cannot be performed at this stage because Gadgetron tree is i
most likely not installed yet (presumably not even on the filesystem).

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -94,12 +94,6 @@
 configure_file(env_ccppetmr.sh.in ${CCPPETMR_INSTALL}/bin/env_ccppetmr.sh)
 configure_file(env_ccppetmr.csh.in ${CCPPETMR_INSTALL}/bin/env_ccppetmr.csh)

-# create a default gadgetron config file if it doens't exist yet
-if(NOT EXISTS "${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml")
-    configure_file(${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml.example ${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml)
-endif()
-
-

 # add tests
 enable_testing()


BUG: In SuperBuild.cmake, remove extra variable (WITH_COVERAGE) from CTK-Configure step.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -325,7 +325,6 @@
     -DCTK_SUPERBUILD:BOOL=OFF
     -DCTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
     -DCTK_SUPERBUILD_BINARY_DIR:PATH=${CTK_BINARY_DIR}
-    -DWITH_COVERAGE:BOOL=${WITH_COVERAGE}
     -DCMAKE_INSTALL_PREFIX:PATH=${ep_install_dir}
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
     -DCTK_CXX_FLAGS:STRING=${CTK_CXX_FLAGS}


Fix a typo

Fix a typo

--- standard/StandardProject.cmake
+++ standard/StandardProject.cmake
@@ -53,7 +53,7 @@
   if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm")
     set(standard_BUILD_ARM ON PARENT_SCOPE)
     set(standard_BUILD_ARCHITECTURES "arm" PARENT_SCOPE)
-    set(standard_BUILD_64 OFFPARENT_SCOPE)
+    set(standard_BUILD_64 OFF PARENT_SCOPE)
   elseif(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64;i386")
     set(standard_BUILD_ARCHITECTURES x64 x86 PARENT_SCOPE)
     set(standard_BUILD_64 ON PARENT_SCOPE)


pch changes

pch changes

--- build/build.cmake
+++ build/build.cmake
@@ -54,13 +54,7 @@
 )

 settingsCR(graphics)
-
-target_precompile_headers(graphics PRIVATE
-	<3rdParty/robinmap.h>
-	<3rdParty/glm.h>
-	<3rdParty/function2.h>
-	<3rdParty/fmt.h>
-)
+createPCH(graphics)

 target_include_directories(graphics PUBLIC
 	"${root}/inc"
@@ -99,7 +93,8 @@
 					${SRCS}
 )

-settingsCR(graphics_tests)
+settingsCR(graphics_tests)
+createPCH(graphics_tests)

 target_include_directories(graphics_tests PRIVATE
 	"${root}/src"


boards: qemu_cortex_m0: enable icount mode

Enable icount mode for qemu_cortex_m0 platform, The icount shift value
is selectd based on cpu clock frequency of this platform. The virtual
cpu will execute one instruction every 2^shift ns of virtual time.

Signed-off-by: Wentong Wu <a92ffab6ab5ff780cf36418e13a69a97399df0f5@intel.com>

--- boards/arm/qemu_cortex_m0/board.cmake
+++ boards/arm/qemu_cortex_m0/board.cmake
@@ -13,4 +13,7 @@
   -vga none
   )

+if(CONFIG_QEMU_ICOUNT)
+  list(APPEND QEMU_EXTRA_FLAGS -icount shift=6,align=off,sleep=off -rtc clock=vm)
+endif()
 board_set_debugger_ifnset(qemu)


Fixed build error in GCC.

Fixed build error in GCC.

--- external/External.cmake
+++ external/External.cmake
@@ -647,7 +647,7 @@
                        "-DCIVETWEB_ARCH=OFF"
                        "-DCIVETWEB_ENABLE_LUA=OFF"
                        "-DCIVETWEB_INSTALL_EXECUTABLE=OFF"
-                       "-DCIVETWEB_ALLOW_WARNINGS=OFF"
+                       "-DCIVETWEB_ALLOW_WARNINGS=ON"
             #--Output lcivetwebing-------------
             LOG_DOWNLOAD  1
             LOG_UPDATE    1


Make rosidl_get_typesupport_target return -NOTFOUND instead of FATAL_ERROR (#672)

Signed-off-by: Shane Loretz <7fde345e8e2e22c78a1570a4807e4629866dc7de@osrfoundation.org>

--- rosidl_cmake/cmake/rosidl_get_typesupport_target.cmake
+++ rosidl_cmake/cmake/rosidl_get_typesupport_target.cmake
@@ -33,7 +33,8 @@
   set(output_target "${generate_interfaces_target}__${typesupport_name}")

   if(NOT TARGET ${output_target})
-    message(FATAL_ERROR "${output_target} is not a CMake target - maybe the typesupport '${typesupport_name}' doesn't exist?")
+    # CMake if() evaluates strings ending in `-NOTFOUND` as false
+    set(output_target "${output_target}-NOTFOUND")
   endif()

   set("${var}" "${output_target}" PARENT_SCOPE)


Add additional error string and name the boost libraries with absolute pathes

--- cmake/configure/configure_boost.cmake
+++ cmake/configure/configure_boost.cmake
@@ -86,8 +86,7 @@
       #
       RESET_CMAKE_REQUIRED()
       PUSH_CMAKE_REQUIRED("${DEAL_II_CXX_VERSION_FLAG}")
-      PUSH_CMAKE_REQUIRED("-L${Boost_LIBRARY_DIRS}")
-      SET(CMAKE_REQUIRED_LIBRARIES "-lboost_iostreams")
+      SET(CMAKE_REQUIRED_LIBRARIES "${BOOST_LIBRARIES}")
       CHECK_CXX_SOURCE_COMPILES(
         "
         #include <string>
@@ -116,6 +115,10 @@
                 "with zlib support but a simple test failed! "
                 "Therefore, the bundled boost package is used."
                )
+        SET(BOOST_ADDITIONAL_ERROR_STRING
+            "DEAL_II_WITH_ZLIB=ON requires Boost.Iostreams to be compiled "
+            "with zlib support but a simple test failed! "
+           )
         SET(${var} FALSE)
       ENDIF()
       RESET_CMAKE_REQUIRED()


Revert "[CMake] Don't pass in MSVC warning flags as definitions"

reverting while I investigate why it broke the sanitizer-windows build.
This reverts commit r231924.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -243,7 +243,7 @@
   if( MSVC11 )
     add_llvm_definitions(-D_VARIADIC_MAX=10)
   endif()
-
+
   # Add definitions that make MSVC much less annoying.
   add_llvm_definitions(
     # For some reason MS wants to deprecate a bunch of standard functions...
@@ -253,9 +253,7 @@
     -D_CRT_NONSTDC_NO_WARNINGS
     -D_SCL_SECURE_NO_DEPRECATE
     -D_SCL_SECURE_NO_WARNINGS
-    )
-
-  set(msvc_warning_flags
+
     # Disabled warnings.
     -wd4146 # Suppress 'unary minus operator applied to unsigned type, result still unsigned'
     -wd4180 # Suppress 'qualifier applied to function type has no meaning; ignored'
@@ -274,7 +272,7 @@
     -wd4624 # Suppress ''derived class' : destructor could not be generated because a base class destructor is inaccessible'
     -wd4722 # Suppress 'function' : destructor never returns, potential memory leak
     -wd4800 # Suppress ''type' : forcing value to bool 'true' or 'false' (performance warning)'
-
+
     # Promoted warnings.
     -w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning.

@@ -284,19 +282,14 @@

   # Enable warnings
   if (LLVM_ENABLE_WARNINGS)
-    append("/W4" msvc_warning_flags)
+    add_llvm_definitions( /W4 )
     if (LLVM_ENABLE_PEDANTIC)
       # No MSVC equivalent available
     endif (LLVM_ENABLE_PEDANTIC)
   endif (LLVM_ENABLE_WARNINGS)
   if (LLVM_ENABLE_WERROR)
-    append("/WX" msvc_warning_flags)
+    add_llvm_definitions( /WX )
   endif (LLVM_ENABLE_WERROR)
-
-  foreach(flag ${msvc_warning_flags})
-    append("${flag}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-  endforeach(flag)
-
 elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
   if (LLVM_ENABLE_WARNINGS)
     append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)


cmake: Added DATA_INSTALL_DIR define.

cmake: Added DATA_INSTALL_DIR define.

--- cmake/modules/TelepathyDefaults.cmake
+++ cmake/modules/TelepathyDefaults.cmake
@@ -94,7 +94,8 @@
 endif(MSVC)

 set(LIB_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
-set(LIB_INSTALL_DIR     "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}"  CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})" FORCE)
-set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include"           CACHE PATH "The subdirectory to the header prefix" FORCE)
+set(LIB_INSTALL_DIR     "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}"  CACHE PATH "The subdirectory where libraries will be installed (default is ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})" FORCE)
+set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include"           CACHE PATH "The subdirectory where header files will be installed (default is ${CMAKE_INSTALL_PREFIX}/include)" FORCE)
+set(DATA_INSTALL_DIR    "${CMAKE_INSTALL_PREFIX}/share/telepathy"   CACHE PATH "The subdirectory where data files will be installed (default is ${CMAKE_INSTALL_PREFIX}/share/telepathy)" FORCE)

 include(TelepathyDist)


hunter_setup_msvc: Visual Studio 15 2017

Fix for https://github.com/ruslo/hunter/issues/696

--- cmake/modules/hunter_setup_msvc.cmake
+++ cmake/modules/hunter_setup_msvc.cmake
@@ -41,6 +41,7 @@
     string(COMPARE EQUAL "${MSVC_VERSION}" "1700" _vs_11_2012)
     string(COMPARE EQUAL "${MSVC_VERSION}" "1800" _vs_12_2013)
     string(COMPARE EQUAL "${MSVC_VERSION}" "1900" _vs_14_2015)
+    string(COMPARE EQUAL "${MSVC_VERSION}" "1910" _vs_15_2017)

     if(_vs_8_2005)
       set(HUNTER_MSVC_VERSION "8")
@@ -60,6 +61,9 @@
     elseif(_vs_14_2015)
       set(HUNTER_MSVC_VERSION "14")
       set(HUNTER_MSVC_YEAR "2015")
+    elseif(_vs_15_2017)
+      set(HUNTER_MSVC_VERSION "15")
+      set(HUNTER_MSVC_YEAR "2017")
     else()
       hunter_internal_error("Unexpected MSVC_VERSION: '${MSVC_VERSION}'")
     endif()


ENH: Create symlinks and copies atomically

Store a relative path in the symlink.

SVN-Revision: 3296

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -104,6 +104,11 @@
       file(READ "${MIDAS_KEY_DIR}/${keyFile}" checksum)

       # Write the test script file for downloading
+      if(UNIX)
+        set(cmake_symlink create_symlink)
+      else()
+        set(cmake_symlink copy) # Windows has no symlinks; copy instead.
+      endif()
       file(WRITE "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/fetch_${checksum}_${base_filename}.cmake"
   "message(STATUS \"Data is here: ${MIDAS_REST_URL}/midas.bitstream.by.hash?hash=${checksum}&algorithm=${hash_alg}\")
 if(NOT EXISTS \"${MIDAS_DATA_DIR}/MIDAS_Hashes/${checksum}\")
@@ -127,17 +132,11 @@
   endif(NOT computedChecksum STREQUAL ${checksum})
 endif(NOT EXISTS \"${MIDAS_DATA_DIR}/MIDAS_Hashes/${checksum}\")

-# Add a symbolic link so we can use the human-readable filename in the command line
+# Create a human-readable file name for the data.
 file(MAKE_DIRECTORY \"${MIDAS_DATA_DIR}/${base_filepath}\")
-file(REMOVE \"${MIDAS_DATA_DIR}/${base_file}\")
-
-if(WIN32)
-  # windows does not support symlinks, so we must duplicate the file for now
-  configure_file(\"${MIDAS_DATA_DIR}/MIDAS_Hashes/${checksum}\" \"${MIDAS_DATA_DIR}/${testName}_${base_file}\" COPYONLY)
-  file(RENAME \"${MIDAS_DATA_DIR}/${testName}_${base_file}\" \"${MIDAS_DATA_DIR}/${base_file}\")
-else(WIN32)
-  execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"${MIDAS_DATA_DIR}/MIDAS_Hashes/${checksum}\" \"${MIDAS_DATA_DIR}/${base_file}\")
-endif(WIN32)
+file(REMOVE \"${MIDAS_DATA_DIR}/${testName}_${base_file}\")
+execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${cmake_symlink} \"MIDAS_Hashes/${checksum}\" \"${MIDAS_DATA_DIR}/${testName}_${base_file}\" WORKING_DIRECTORY \"${MIDAS_DATA_DIR}\")
+file(RENAME \"${MIDAS_DATA_DIR}/${testName}_${base_file}\" \"${MIDAS_DATA_DIR}/${base_file}\")
 ")

       list(APPEND downloadScripts "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/fetch_${checksum}_${base_filename}.cmake")


missed file

missed file

--- build/build.cmake
+++ build/build.cmake
@@ -15,15 +15,12 @@
     ${CMAKE_CURRENT_LIST_DIR}/../inc/core/Locked.h
     ${CMAKE_CURRENT_LIST_DIR}/../inc/core/ScopeExit.h
     ${CMAKE_CURRENT_LIST_DIR}/../inc/core/Singleton.h
-    ${CMAKE_CURRENT_LIST_DIR}/../inc/core/ScopeExit.h
     ${CMAKE_CURRENT_LIST_DIR}/../inc/core/StringUtil.h
     ${CMAKE_CURRENT_LIST_DIR}/../inc/core/Timer.h
-    ${CMAKE_CURRENT_LIST_DIR}/../inc/core/Tuple.h
     ${CMAKE_CURRENT_LIST_DIR}/../inc/core/TypeTraits.h
 )

 set(CORE_SRCS
-    ${CMAKE_CURRENT_LIST_DIR}/../src/Misc.cpp
     ${CMAKE_CURRENT_LIST_DIR}/../src/StringUtil.cpp
     ${CMAKE_CURRENT_LIST_DIR}/../src/Timer.cpp
 )
@@ -52,6 +49,7 @@
     ${CMAKE_CURRENT_LIST_DIR}/../tests/Locked.cpp
     ${CMAKE_CURRENT_LIST_DIR}/../tests/main.cpp
     ${CMAKE_CURRENT_LIST_DIR}/../tests/Singleton.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/../tests/Misc.cpp
 )

 	add_executable(core_tests $<TARGET_OBJECTS:core> ${CORE_TEST_SRCS})


Update sugar_expected_number_of_arguments.cmake

--- cmake/utility/sugar_expected_number_of_arguments.cmake
+++ cmake/utility/sugar_expected_number_of_arguments.cmake
@@ -17,7 +17,6 @@

   if(NOT ${given} EQUAL ${expected})
     sugar_fatal_error(
-        FATAL_ERROR
         "Incorrect number of arguments '${given}', expected '${expected}'."
     )
   endif()


Add optional list of required packages for ament_auto_find_build_dependencies (#93)

* Add optional list of required packages

* Prefix ARG variables + fixup

* REQUIRED_PACKAGES -> REQUIRED

* Output all ignored packages at once

* Pass REQUIRED in addition to QUIET, not instead of

* _ignored_pacakges -> _additional_packages

* De-duplicate the find_package call

* rename var and small changes

--- ament_cmake_auto/cmake/ament_auto_find_build_dependencies.cmake
+++ ament_cmake_auto/cmake/ament_auto_find_build_dependencies.cmake
@@ -15,6 +15,11 @@
 #
 # Invoke find_package() for all build and buildtool dependencies.
 #
+# :param REQUIRED: an optional list of package names that are known
+# required CMake dependencies. For these dependencies, find_package() will be
+# invoked with REQUIRED.
+# :type REQUIRED: list of strings
+#
 # All found package names are appended to the
 # ``${PROJECT_NAME}_FOUND_BUILD_DEPENDS`` /
 # ``${PROJECT_NAME}_FOUND_BUILDTOOL_DEPENDS`` variables.
@@ -27,18 +32,39 @@
 # @public
 #
 macro(ament_auto_find_build_dependencies)
-  if(ARGN)
+  cmake_parse_arguments(_ARG "" "" "REQUIRED" ${ARGN})
+  if(_ARG_UNPARSED_ARGUMENTS)
     message(FATAL_ERROR "ament_auto_find_build_dependencies() called with "
-      "unused arguments: ${ARGN}")
+      "unused arguments: ${_ARG_UNPARSED_ARGUMENTS}")
   endif()

   if(NOT _AMENT_PACKAGE_NAME)
     ament_package_xml()
   endif()

+  # ensure that the caller isn't expecting packages not listed in the manifest
+  set(_unknown_packages "")
+  foreach(_package_name ${_ARG_REQUIRED})
+    if(NOT _package_name IN_LIST ${PROJECT_NAME}_BUILD_DEPENDS AND
+      NOT _package_name IN_LIST ${PROJECT_NAME}_BUILDTOOL_DEPENDS
+    )
+      list(APPEND _unknown_packages ${_package_name})
+    endif()
+  endforeach()
+  if(_unknown_packages)
+    string(REPLACE ";" ", " _unknown_packages_str "${_unknown_packages}")
+    message(FATAL_ERROR "ament_auto_find_build_dependencies() called with "
+      "required packages that are not listed as a build/buildtool dependency in "
+      "the package.xml: ${_unknown_packages_str}")
+  endif()
+
   # try to find_package() all build dependencies
   foreach(_dep ${${PROJECT_NAME}_BUILD_DEPENDS})
-    find_package(${_dep} QUIET)
+    set(_REQUIRED_KEYWORD "")
+    if(_dep IN_LIST _ARG_REQUIRED)
+      set(_REQUIRED_KEYWORD "REQUIRED")
+    endif()
+    find_package(${_dep} QUIET ${_REQUIRED_KEYWORD})
     if(${_dep}_FOUND)
       list(APPEND ${PROJECT_NAME}_FOUND_BUILD_DEPENDS ${_dep})

@@ -50,7 +76,11 @@

   # try to find_package() all buildtool dependencies
   foreach(_dep ${${PROJECT_NAME}_BUILDTOOL_DEPENDS})
-    find_package(${_dep} QUIET)
+    set(_REQUIRED_KEYWORD "")
+    if(_dep IN_LIST _ARG_REQUIRED)
+      set(_REQUIRED_KEYWORD "REQUIRED")
+    endif()
+    find_package(${_dep} QUIET ${_REQUIRED_KEYWORD})
     if(${_dep}_FOUND)
       list(APPEND ${PROJECT_NAME}_FOUND_BUILDTOOL_DEPENDS ${_dep})
     endif()


Updating superbuild ITK to ITK 4.3.0 release tag

Change-Id: Ibacce278f31239ee6322e9745ca9bc64e40cbe6c

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -15,8 +15,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the
-# after v4.3rc04 and including modulus functor fix
-set(ITK_TAG_COMMAND GIT_TAG ff9d8e279a13a12bf6617f13c31b9122e88ef1fe
+set(ITK_TAG_COMMAND GIT_TAG v4.3.0
  )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )


ENH:  Update ITK superbuild git tag.

ENH:  Update ITK superbuild git tag.

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -161,7 +161,7 @@

   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
-  set(${proj}_GIT_TAG fc03bcc92b11326b87c232c14eb234fc1f791f9f) ##
+  set(${proj}_GIT_TAG fe002fcf5c5a47ebd3b52a80d5ec1bff7c9bdc8e) ##
   set(ITK_VERSION_ID ITK-4.9) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID

   ExternalProject_Add(${proj}


Remove "time" from build commands.

Remove "time" from build commands.

The time commands isn't available in the CI environment.

--- build/cmake/core-admin-ui.cmake
+++ build/cmake/core-admin-ui.cmake
@@ -51,7 +51,7 @@
     ${STAMP_DIR}/core-admin-ui-build-dir
     ${STAMP_DIR}/core-admin-ui-npm-install
     ${STAMP_DIR}/core-admin-ui-bower-install
-  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && time env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} ./node_modules/.bin/ember build --environment=development --output-path=./dist-dev
-  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && time env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} ./node_modules/.bin/ember build --environment=production --output-path=./dist-prod
+  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} ./node_modules/.bin/ember build --environment=development --output-path=./dist-dev
+  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} ./node_modules/.bin/ember build --environment=production --output-path=./dist-prod
   COMMAND touch ${STAMP_DIR}/core-admin-ui-build
 )


Remove useless definition.

Remove useless definition.

--- ortp-config.h.cmake
+++ ortp-config.h.cmake
@@ -59,5 +59,3 @@
 #cmakedefine ORTP_DEFAULT_THREAD_STACK_SIZE ${ORTP_DEFAULT_THREAD_STACK_SIZE}
 #cmakedefine POSIXTIMER_INTERVAL ${POSIXTIMER_INTERVAL}
 #cmakedefine __APPLE_USE_RFC_2292
-
-#cmakedefine HAVE_SRTP


ARROW-8246: [C++] Add -Wa,-mbig-obj to CXXFLAGS on MinGW if it is supported

Hopefully this will resolve issues with debug builds on MinGW

Closes #6743 from wesm/ARROW-8246

Authored-by: Wes McKinney <3be70eed0275ec2606f002bff3514252e145d204@apache.org>
Signed-off-by: Wes McKinney <3be70eed0275ec2606f002bff3514252e145d204@apache.org>

--- cpp/cmake_modules/SetupCxxFlags.cmake
+++ cpp/cmake_modules/SetupCxxFlags.cmake
@@ -97,6 +97,12 @@

     # Support large object code
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /bigobj")
+  else()
+    # MinGW
+    check_cxx_compiler_flag(-Wa,-mbig-obj CXX_SUPPORTS_BIG_OBJ)
+    if(CXX_SUPPORTS_BIG_OBJ)
+      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wa,-mbig-obj")
+    endif()
   endif(MSVC)
 else()
   # Common flags set below with warning level


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

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


when using unrecognized compiled, show warning instead of fatal_error

--- cmake/EthCompilerSettings.cmake
+++ cmake/EthCompilerSettings.cmake
@@ -34,6 +34,6 @@
 	set(ETH_STATIC 1)

 else ()
-	message(FATAL_ERROR "Your C++ compiler does not support C++11. You have ${CMAKE_CXX_COMPILER_ID}")
+	message(WARNING "Your compiler is not tested, if you run into any issues, we'd welcome any patches.")
 endif ()


fix include

fix include

--- cmake/LibraryProjectSetup.cmake
+++ cmake/LibraryProjectSetup.cmake
@@ -53,6 +53,11 @@

   # --- Append local includes to ${PROJECT_NAME}_LOCAL_INCLUDE_DIRECTORIES ---
   remember_local_include_directories("${${COMPONENT}_DIRS}")
+
+  set(${PROJECT_NAME}_LOCAL_INCLUDE_DIRECTORIES
+    ${${PROJECT_NAME}_LOCAL_INCLUDE_DIRECTORIES}
+    ${CMAKE_CURRENT_BINARY_DIR}
+    CACHE INTERNAL "Include directories for external dependencies.")

   include(doxygen_tools)
   # --- doxygen warnings ---


cmake: Added missing OpenSSL directories on Windows.

--- cmake/Modules/FindOpenSSL.cmake
+++ cmake/Modules/FindOpenSSL.cmake
@@ -34,6 +34,7 @@
       /opt/local/include
       /sw/include
       /usr/lib/sfw/include
+      C:/OpenSSL/include
       $ENV{PROGRAMFILES}/OpenSSL/include
       $ENV{PROGRAMFILES}/OpenSSL-Win32/include
   )
@@ -52,6 +53,7 @@
       /sw/lib
       /usr/sfw/lib/64
       /usr/sfw/lib
+      C:/OpenSSL/lib
       $ENV{PROGRAMFILES}/OpenSSL/lib
       $ENV{PROGRAMFILES}/OpenSSL-Win32/lib
   )
@@ -68,6 +70,9 @@
       /sw/lib
       /usr/sfw/lib/64
       /usr/sfw/lib
+      C:/OpenSSL/lib
+      $ENV{PROGRAMFILES}/OpenSSL/lib
+      $ENV{PROGRAMFILES}/OpenSSL-Win32/lib
   )

   find_library(SSLEAY32MD_LIBRARY
@@ -82,6 +87,9 @@
       /sw/lib
       /usr/sfw/lib/64
       /usr/sfw/lib
+      C:/OpenSSL/lib
+      $ENV{PROGRAMFILES}/OpenSSL/lib
+      $ENV{PROGRAMFILES}/OpenSSL-Win32/lib
   )

   find_library(CRYPTO_LIBRARY
@@ -102,6 +110,9 @@
       /sw/lib
       /usr/sfw/lib/64
       /usr/sfw/lib
+      C:/OpenSSL/lib
+      $ENV{PROGRAMFILES}/OpenSSL/lib
+      $ENV{PROGRAMFILES}/OpenSSL-Win32/lib
   )

   set(OPENSSL_INCLUDE_DIRS


add cppfs as runtime dep for msvc self contained installer

--- cmake/RuntimeDependencies.cmake
+++ cmake/RuntimeDependencies.cmake
@@ -20,10 +20,12 @@

         find_file(DLLS_CPPASSIST cppassist.dll)
         find_file(DLLS_CPPLCOATE cpplocate.dll)
+        find_file(DLLS_CPPFS cppfs.dll)

         set(DLLS
             ${DLLS_CPPASSIST}
             ${DLLS_CPPLCOATE}
+            ${DLLS_CPPFS}
         )
         set(PLATFORMS
             ${DLLS_WIN}


build: RPM package deps

build: RPM package deps

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

--- cmake/modules/CPackConfig.cmake
+++ cmake/modules/CPackConfig.cmake
@@ -21,10 +21,11 @@

 set(CPACK_RPM_PACKAGE_LICENSE "Apache v2.0")
 set(CPACK_RPM_PACKAGE_URL "https://www.falco.org")
-set(CPACK_RPM_PACKAGE_REQUIRES "dkms, gcc, make, kernel-devel, perl")
+set(CPACK_RPM_PACKAGE_REQUIRES "dkms, kernel-devel, libyaml, ncurses")
 set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/scripts/rpm/postinstall")
 set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/scripts/rpm/preuninstall")
 set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/scripts/rpm/postuninstall")
+set(CPACK_RPM_PACKAGE_VERSION "${FALCO_VERSION}")
 set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
     /usr/src
     /usr/share/man


Updated cmake library dependencies.

Updated cmake library dependencies.

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

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -34,7 +34,7 @@
 set(MSVC_LIB_DEPS_LLVMMSIL LLVMAnalysis LLVMCodeGen LLVMCore LLVMMSILInfo LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
 set(MSVC_LIB_DEPS_LLVMMSILInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)


No information timeout

No information timeout

--- cmake/modules/hunter_lock.cmake
+++ cmake/modules/hunter_lock.cmake
@@ -25,6 +25,7 @@
   set(HUNTER_LOCK_INFO "${HUNTER_LOCK_PATH}/info")
   set(HUNTER_LOCK_FULL_INFO "${HUNTER_LOCK_PATH}/fullinfo")

+  set(counter "")
   while(TRUE)
     hunter_try_lock(lock_successful)
     if(lock_successful)
@@ -32,9 +33,17 @@
       return()
     endif()
     if(EXISTS "${HUNTER_LOCK_FULL_INFO}")
+      set(counter "")
       file(READ "${HUNTER_LOCK_FULL_INFO}" fullinfo)
     else()
+      set(counter "${counter}x")
       set(fullinfo "????")
+      string(COMPARE EQUAL "${counter}" "xxxxx" timeout_reached)
+      if(timeout_reached)
+        hunter_fatal_error(
+            "Timeout: no full info about locked directory for 25 seconds"
+        )
+      endif()
     endif()
     hunter_status_print(
         "\n"


don't pollute toplevel build directory with this

--- cmake/boost.cmake
+++ cmake/boost.cmake
@@ -23,7 +23,7 @@
 macro(boost_feature_check checkname)
   if(NOT ${checkname}_CACHE)
     try_compile(${checkname}
-      ${CMAKE_BINARY_DIR}/${checkname}
+      ${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${checkname}
       ${CMAKE_CURRENT_SOURCE_DIR}/cmake/boost_checks.cpp
       COMPILE_DEFINITIONS -I${Boost_INCLUDE_DIRS} -D${checkname}=1
       OUTPUT_VARIABLE ${checkname}_OUTPUT


another occurence of that little cmake fix

--- bench/btl/cmake/FindMTL4.cmake
+++ bench/btl/cmake/FindMTL4.cmake
@@ -17,14 +17,14 @@

 else (MTL4_INCLUDE_DIR)

-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(MTL4 DEFAULT_MSG MTL4_INCLUDE_DIR)
-
 find_path(MTL4_INCLUDE_DIR NAMES boost/numeric/mtl/mtl.hpp
      PATHS
      ${INCLUDE_INSTALL_DIR}
    )

+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(MTL4 DEFAULT_MSG MTL4_INCLUDE_DIR)
+
 mark_as_advanced(MTL4_INCLUDE_DIR)

 endif(MTL4_INCLUDE_DIR)


CMake: Add LLVM 3.6 stuff to config.h.in.cmake

--- config.h.in.cmake
+++ config.h.in.cmake
@@ -45,17 +45,13 @@

-#cmakedefine HAVE_OCL_ICD
-
 #cmakedefine HAVE_CLOCK_GETTIME

-
-
+#cmakedefine HAVE_OCL_ICD

 /* Defined if posix_memalign is available. */
 #cmakedefine HAVE_POSIX_MEMALIGN

-#cmakedefine HAVE_CLOCK_GETTIME

@@ -85,9 +81,11 @@
 /* "Using LLVM 3.4" */
 #cmakedefine LLVM_3_4

-/* "Using upcoming LLVM 3.5" */
+/* "Using LLVM 3.5" */
 #cmakedefine LLVM_3_5

+/* "Using LLVM 3.6" */
+#cmakedefine LLVM_3_6

 /* Defined to greatest expected alignment for extended types, in bytes. */


STYLE: Using dashes to separate words in a buildname, instead of periods, since cdash breaks long strings at dashes, and doesn't break them at periods.

--- DashboardScripts/tubetk_cmakecache.cmake
+++ DashboardScripts/tubetk_cmakecache.cmake
@@ -23,7 +23,7 @@

 set( CTEST_SITE "${SITE_NAME}" )
 set( CTEST_BUILD_NAME
-  "${SITE_BUILD_NAME}.${SCRIPT_NAME}.${RUN_MODEL}" )
+  "${SITE_BUILD_NAME}-${SCRIPT_NAME}-${RUN_MODEL}" )
 set( CTEST_BUILD_CONFIGURATION "${SITE_BUILD_TYPE}" )

 set( CTEST_TEST_TIMEOUT 1500 )


Added debugging output to CMake module

Added debugging output to CMake module

--- source/raptor/FindRAPTOR.cmake
+++ source/raptor/FindRAPTOR.cmake
@@ -74,6 +74,7 @@
     if (NOT RAPTOR_LIBRARY)
     find_library(RAPTOR_LIBRARY NAMES raptor2 libraptor2)
     endif ()
+    message("Found Raptor at ${RAPTOR_LIBRARY}")

     if (NOT WIN32)
         find_package(PkgConfig)


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

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


Synchronize adm files

Synchronize adm files

--- adm_local_without_kernel/cmake_files/SalomeMacros.cmake
+++ adm_local_without_kernel/cmake_files/SalomeMacros.cmake
@@ -673,3 +673,53 @@
   ENDFOREACH()
 ENDMACRO(SALOME_ACCUMULATE_ENVIRONMENT)

+
+#########################################################################
+# SALOME_APPEND_LIST_OF_LIST()
+#
+# USAGE: SALOME_APPEND_LIST_OF_LIST(result element_list)
+#
+# Build a list of lists. The element_list is first parsed to convert it
+# from
+#     a;b;c;d;e
+# to
+#     a,b,c,d,e
+#
+# It is then added to the big list 'result'. Hence 'result' looks like:
+#     a,b,c,d,e;f,g,h; ...
+#
+MACRO(SALOME_APPEND_LIST_OF_LIST result element_list)
+  SET(_tmp_res)
+  STRING(REPLACE ";" "," _tmp_res "${${element_list}}")
+  LIST(APPEND ${result} ${_tmp_res})
+ENDMACRO(SALOME_APPEND_LIST_OF_LIST)
+
+#########################################################################
+# SALOME_CONFIGURE_PREPARE()
+#
+# USAGE: SALOME_CONFIGURE_PREPARE(pkg1 pkg2 ...)
+#
+# Prepare the variable that will be used to configure the file Salome<MODULE>Config.cmake,
+# namely:
+#    - _PREREQ_LIST      : the list of level 1 external prerequisites
+#    - _PREREQ_DIR_LIST  : their corresponding CMake directories (i.e. where the CMake configuration
+#    file for this package can be found, if there is any!)
+#    - _PREREQ_COMPO_LIST: the list of components requested when this package was invoked
+#
+# All this information is built from the package_list, the list of level 1 packages for this module.
+# Only the packages found in CONFIG mode are retained.
+#
+MACRO(SALOME_CONFIGURE_PREPARE)
+  SET(_tmp_prereq "${ARGV}")
+  SET(_PREREQ_LIST)
+  SET(_PREREQ_DIR_LIST)
+  SET(_PREREQ_COMPO_LIST)
+  FOREACH(_prereq IN LISTS _tmp_prereq)
+    IF(${_prereq}_DIR)
+      SET(_PREREQ_LIST "${_PREREQ_LIST} ${_prereq}")
+      SET(_PREREQ_DIR_LIST "${_PREREQ_DIR_LIST} \"${${_prereq}_DIR}\"")
+      SALOME_APPEND_LIST_OF_LIST(_PREREQ_COMPO_LIST Salome${_prereq}_COMPONENTS)
+    ENDIF()
+  ENDFOREACH()
+ENDMACRO(SALOME_CONFIGURE_PREPARE)
+


CI: lower required NDK API level to 16

CI: lower required NDK API level to 16

--- ci-build.cmake
+++ ci-build.cmake
@@ -54,7 +54,7 @@

 if(DEFINED ENV{ANDROID})
     set(CROSS
-        -DANDROID_NATIVE_API_LEVEL=21
+        -DANDROID_NATIVE_API_LEVEL=16
         -DANDROID_NDK=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r15b
         -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/CMake/toolchain/android.toolchain.cmake
         "-DANDROID_ABI=armeabi-v7a with NEON")


cmake: find full path of libraries in os.cmake for LDSCRIPT

--- cmake/os.cmake
+++ cmake/os.cmake
@@ -52,10 +52,6 @@
 set(CRTI ${CONAN_LIB_DIRS_MUSL}/crti.o)

 set(TRIPLE "${ARCH}-pc-linux-elf")
-set(LIBRARIES ${CONAN_LIBS})
-set(CONAN_LIBS "")
-
-#set(ELF_SYMS elf_syms)

 find_program(ELF_SYMS elf_syms)
 if (ELF_SYMS-NOTFOUND)
@@ -150,6 +146,7 @@
   set_property(SOURCE ${NAME_STUB} PROPERTY COMPILE_DEFINITIONS SERVICE="${TARGET}" SERVICE_NAME="${NAME}")

   set_target_properties(${ELF_TARGET} PROPERTIES LINK_FLAGS ${LDFLAGS})
+  conan_find_libraries_abs_path("${CONAN_LIBS}" "${CONAN_LIB_DIRS}" LIBRARIES)
   target_link_libraries(${ELF_TARGET} ${LIBRARIES})


Updated call signature for compilation tests

Former-commit-id: c0f52ed88db0aa3ed89dcca5cf33f6520aac4d20

--- cmake-modules/Fetch_glog.cmake
+++ cmake-modules/Fetch_glog.cmake
@@ -31,7 +31,7 @@
         find_library(GLOG_LIBRARIES     glog           )
         find_path   (GLOG_INCLUDE_DIR   glog/logging.h )
         if(GLOG_LIBRARIES AND GLOG_INCLUDE_DIR)
-            check_glog_compiles("lib_header" "" "" "${GLOG_LIBRARIES};unwind::full;gflags::gflags;pthread" "${GLOG_INCLUDE_DIR}" "")
+            check_glog_compiles("${GLOG_LIBRARIES};unwind::full;gflags::gflags;pthread" "" "${GLOG_INCLUDE_DIR}")
         endif()
         if (GLOG_COMPILES_lib_header)
             add_library(glog::glog ${LINK_TYPE} IMPORTED)
@@ -81,8 +81,8 @@
         set_target_properties(glog::glog PROPERTIES IMPORTED_LOCATION ${imp_loc})
     endif()

-    check_glog_compiles("target" "${GLOG_FLAGS}" "" "" "" "glog::glog")
-    if(NOT GLOG_COMPILES_target)
+    check_glog_compiles("glog::glog" "" "" "${GLOG_FLAGS}" "")
+    if(NOT GLOG_COMPILES)
         include(cmake-modules/PrintTargetProperties.cmake)
         print_target_properties(glog::glog)
         message(FATAL_ERROR "Could not compile a simple glog program")


cmake: clang warning flags: reformat

cmake: clang warning flags: reformat

--- cmake/HextEnableWarnings.cmake
+++ cmake/HextEnableWarnings.cmake
@@ -2,10 +2,17 @@

 # Clang
 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-  add_definitions("-Weverything" "-Wno-c++98-compat" "-Wno-padded"
-    "-Wno-documentation-unknown-command" "-Wno-documentation-html"
-    "-Wno-documentation" "-Wno-weak-vtables" "-Wno-switch-enum"
-    "-Wno-exit-time-destructors" "-Wno-global-constructors")
+  add_definitions(
+    "-Weverything"
+    "-Wno-c++98-compat"
+    "-Wno-documentation"
+    "-Wno-documentation-html"
+    "-Wno-documentation-unknown-command"
+    "-Wno-exit-time-destructors"
+    "-Wno-global-constructors"
+    "-Wno-padded"
+    "-Wno-switch-enum"
+    "-Wno-weak-vtables")
 endif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")

 # G++


cmake: not setting MAJOR, MINOR, and PATCH version correctly. Fixed

--- cmake/Modules/GetVersion.cmake
+++ cmake/Modules/GetVersion.cmake
@@ -9,30 +9,36 @@
     execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --match v[0-9]* --abbrev=0 --always
             WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
             OUTPUT_VARIABLE _VERSION_STRING
+            ERROR_QUIET
             OUTPUT_STRIP_TRAILING_WHITESPACE)
-    string(REPLACE "v" "" BH_VERSION_STRING ${_VERSION_STRING}) # removing the "v"
-endif()
-
-# If the extraction failed, read the VERSION file
-if (BH_VERSION_STRING STREQUAL "")
-    file(READ ${CMAKE_SOURCE_DIR}/VERSION BH_VERSION_STRING)
-else()
-    # Else, write to the version to file for later use
-    file(WRITE ${CMAKE_SOURCE_DIR}/VERSION ${BH_VERSION_STRING})
-endif()
-message(STATUS "BH_VERSION_STRING: \"${BH_VERSION_STRING}\"")
-
-
-# Then we extract the MAJOR, MINOR, and PATCH version
-message("BH_VERSION_STRING: ${BH_VERSION_STRING}")
-if("${BH_VERSION_STRING}" MATCHES "v([0-9]+)\\.([0-9]+)")
-    set(${BH_VERSION_MAJOR} ${CMAKE_MATCH_1})
-    set(${BH_VERSION_MINOR} ${CMAKE_MATCH_2})
-    # The PATCH version might not exist
-    if("${BH_VERSION_STRING}" MATCHES "v[0-9]+\\.[0-9]+\\.([0-9]+)")
-        set(${BH_VERSION_PATCH} ${CMAKE_MATCH_1})
-    else()
-        set(${BH_VERSION_PATCH} 0)
+    if("${_VERSION_STRING}" MATCHES "v[0-9]+")
+        string(REPLACE "v" "" BH_VERSION_STRING ${_VERSION_STRING}) # removing the "v"
     endif()
 endif()

+if (DEFINED BH_VERSION_STRING)
+    # On success, write to the version to file for later use
+    file(WRITE ${CMAKE_SOURCE_DIR}/VERSION ${BH_VERSION_STRING})
+else()
+    # The extraction failed, read the VERSION file
+    file(READ ${CMAKE_SOURCE_DIR}/VERSION BH_VERSION_STRING)
+endif()
+
+# Then we extract the MAJOR, MINOR, and PATCH version
+if("${BH_VERSION_STRING}" MATCHES "([0-9]+)\\.([0-9]+)")
+    set(BH_VERSION_MAJOR ${CMAKE_MATCH_1})
+    set(BH_VERSION_MINOR ${CMAKE_MATCH_2})
+    # The PATCH version might not exist
+    if("${BH_VERSION_STRING}" MATCHES "[0-9]+\\.[0-9]+\\.([0-9]+)")
+        set(BH_VERSION_PATCH ${CMAKE_MATCH_1})
+    else()
+        set(BH_VERSION_PATCH 0)
+    endif()
+else()
+    message(FATAL_ERROR "Extracting MAJOR, MINOR, and PATCH version failed." )
+endif()
+
+message(STATUS "BH_VERSION_STRING: ${BH_VERSION_STRING}")
+message(STATUS "BH_VERSION_MAJOR: ${BH_VERSION_MAJOR}")
+message(STATUS "BH_VERSION_MINOR: ${BH_VERSION_MINOR}")
+message(STATUS "BH_VERSION_PATCH: ${BH_VERSION_PATCH}")


redirect code coverage to /dev/null

redirect code coverage to /dev/null

--- cmake/coverallsGcovJsons.cmake
+++ cmake/coverallsGcovJsons.cmake
@@ -110,14 +110,15 @@

 # Get the coverage data.
 file(GLOB_RECURSE GCDA_FILES "${COV_PATH}" "*.gcda")
-message("GCDA files:")
+message("Process GCDA files:")
+message("===============================")

 # Get a list of all the object directories needed by gcov
 # (The directories the .gcda files and .o files are found in)
 # and run gcov on those.
 foreach(GCDA ${GCDA_FILES})
-	message("Process: ${GCDA}")
-	message("------------------------------------------------------------------------------")
+	# message("Process: ${GCDA}")
+	# message("------------------------------------------------------------------------------")
 	get_filename_component(GCDA_DIR ${GCDA} PATH)

 	#
@@ -135,7 +136,7 @@
 	# If -p is not specified then the file is named only "the_file.c.gcov"
 	#
 	execute_process(
-		COMMAND ${GCOV_EXECUTABLE} -p -o ${GCDA_DIR} ${GCDA}
+		COMMAND "${GCOV_EXECUTABLE} -p -o ${GCDA_DIR} ${GCDA} >/dev/null"
 		WORKING_DIRECTORY ${GCDA_DIR}
 	)
 endforeach()
@@ -383,7 +384,7 @@
 	set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}]")

 	# Generate the final JSON for this file.
-	message("Generate JSON for non-gcov file: ${NOT_COVERED_SRC}...")
+	# message("Generate JSON for non-gcov file: ${NOT_COVERED_SRC}...")
 	string(CONFIGURE ${SRC_FILE_TEMPLATE} FILE_JSON)
 	set(JSON_GCOV_FILES "${JSON_GCOV_FILES}${FILE_JSON}, ")
 endforeach()


Cope with the change of CMAKE_COMPILER_ID from  Clang to AppleClang (Xcode 7?)

--- cmake/modules/SetUpMacOS.cmake
+++ cmake/modules/SetUpMacOS.cmake
@@ -95,7 +95,7 @@
      set(EXEEXT "")
      set(SOEXT "so")

-  elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
+  elseif(${CMAKE_CXX_COMPILER_ID} MATCHES Clang)

      message(STATUS "Found LLVM compiler collection")

@@ -131,7 +131,7 @@
      set(EXEEXT "")
      set(SOEXT "so")
   else()
-    MESSAGE(FATAL_ERROR "There is no setup for this compiler up to now. Don't know waht to do. Stop cmake at this point.")
+    MESSAGE(FATAL_ERROR "There is no setup for this compiler with ID=${CMAKE_CXX_COMPILER_ID} up to now. Don't know what to do. Stop cmake at this point.")
   endif()

   #---Set Linker flags----------------------------------------------------------------------


always link to gfortran for gotoblas, it seems to be harmless for 1.x but needed for 2.x

--- bench/btl/cmake/FindGOTO.cmake
+++ bench/btl/cmake/FindGOTO.cmake
@@ -16,8 +16,8 @@
 find_library(GOTO_LIBRARIES gotoblas PATHS $ENV{GOTODIR} ${LIB_INSTALL_DIR})

 if(GOTO_LIBRARIES AND CMAKE_COMPILER_IS_GNUCXX)
-  set(GOTO_LIBRARIES ${GOTO_LIBRARIES} "-lpthread")
-endif(GOTO_LIBRARIES AND CMAKE_COMPILER_IS_GNUCXX)
+  set(GOTO_LIBRARIES ${GOTO_LIBRARIES} "-lpthread -lgfortran")
+endif()

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(GOTO DEFAULT_MSG


cmake: SampPlugin: Define either WIN32 or LINUX

--- cmake/Modules/SampPlugin.cmake
+++ cmake/Modules/SampPlugin.cmake
@@ -54,6 +54,13 @@
 	endif()
 endif()

+if(UNIX)
+	add_definitions(-DLINUX)
+endif()
+if(WIN32)
+	add_definitions(-DWIN32)
+endif()
+
 if(CMAKE_COMPILER_IS_GNUCXX)
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
 endif()


Fix win32 search for same bitness executable

find_package(PythonInterp) calls find_program(PYTHON_EXECUTABLE), i.e. without version number. For the Win32-search before to be effective, the same variable has to be used.

--- cmake/OpenCVDetectPython.cmake
+++ cmake/OpenCVDetectPython.cmake
@@ -37,7 +37,7 @@
     # standard FindPythonInterp always prefers executable from system path
     # this is really important because we are using the interpreter for numpy search and for choosing the install location
     foreach(_CURRENT_VERSION ${Python_ADDITIONAL_VERSIONS} "${preferred_version}" "${min_version}")
-      find_host_program(executable
+      find_host_program(PYTHON_EXECUTABLE
         NAMES python${_CURRENT_VERSION} python
         PATHS
           [HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\${_CURRENT_VERSION}\\\\InstallPath]


Fix version comparison

Fix version comparison

--- cmake/modules/FindLibOTR.cmake
+++ cmake/modules/FindLibOTR.cmake
@@ -22,7 +22,7 @@
   STRING(REGEX MATCH "OTRL_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+" LIBOTR_VERSION "${output}")
   STRING(REGEX REPLACE "^OTRL_VERSION \"" "" LIBOTR_VERSION "${LIBOTR_VERSION}")
   # Check if version is at least 4.0.0
-  if(PACKAGE_FIND_VERSION VERSION_LESS ${LIBOTR_VERSION})
+  if(${LIBOTR_VERSION} VERSION_LESS ${LibOTR_FIND_VERSION})
     set(LIBOTR_FOUND FALSE)
   else()
     set(LIBOTR_FOUND TRUE)


Only run the additonal pulsesupport.h check if needed.

There's no point in checking for the presence of enable() if PulseAudio
support is not found before, so we can run this conditionally.

--- cmake/modules/FindPhonon.cmake
+++ cmake/modules/FindPhonon.cmake
@@ -45,10 +45,12 @@
       _phonon_find_version()
       find_path(PHONON_PULSESUPPORT NAMES phonon/pulsesupport.h PATHS ${PHONON_INCLUDES})

-      # Check if the method enable() is available in pulsesupport.h
-      file(READ ${_phonon_namespace_header_file} _pulsesupport_header)
-      string(REGEX MATCH "void enable" _phonon_pulse_match "${_pulsesupport_header}")
-      set(PHONON_PULSESUPPORT "${CMAKE_MATCH_1}")
+      if(PHONON_PULSESUPPORT)
+         # Check if the method enable() is available in pulsesupport.h
+         file(READ ${_phonon_namespace_header_file} _pulsesupport_header)
+         string(REGEX MATCH "void enable" _phonon_pulse_match "${_pulsesupport_header}")
+         set(PHONON_PULSESUPPORT "${CMAKE_MATCH_1}")
+      endif(PHONON_PULSESUPPORT)

    else(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
       set(PHONON_FOUND FALSE)


[CMake] Add configure check for sys/event.h

This enables the kqueue path in MainLoop for Darwin and BSD.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@300654 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -436,6 +436,7 @@
 check_symbol_exists(sigaction signal.h HAVE_SIGACTION)

 check_include_file(termios.h HAVE_TERMIOS_H)
+check_include_file(sys/event.h HAVE_SYS_EVENT_H)

 # These checks exist in LLVM's configuration, so I want to match the LLVM names
 # so that the check isn't duplicated, but we translate them into the LLDB names


[cxxmodules] The newly built pcm files depend on their modulemap.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -399,6 +399,7 @@

   #---Set the library output directory-----------------------
   ROOT_GET_LIBRARY_OUTPUT_DIR(library_output_dir)
+  set (runtime_cxxmodule_dependencies )
   if(ARG_MODULE)
     set(cpp_module)
     set(library_name ${libprefix}${ARG_MODULE}${libsuffix})
@@ -423,6 +424,10 @@
             set(cpp_module_file)
           endif()
         endif(APPLE)
+        # The module depends on its modulemap file.
+        if (cpp_module_file)
+          set (runtime_cxxmodule_dependencies copymodulemap "${CMAKE_BINARY_DIR}/include/module.modulemap")
+        endif()
       endif(cpp_module)
     endif()
   else()
@@ -497,6 +502,7 @@
                      IMPLICIT_DEPENDS ${_implicitdeps}
                      DEPENDS ${_list_of_header_dependencies} ${_linkdef} ${ROOTCINTDEP}
                              ${MODULE_LIB_DEPENDENCY} ${ARG_EXTRA_DEPENDENCIES}
+                             ${runtime_cxxmodule_dependencies}
                      COMMAND_EXPAND_LISTS)
   get_filename_component(dictname ${dictionary} NAME)


[cmake][utils] Add a NEGATE flag to precondition.

Now one can do:

  precondition(VAR NEGATE)

to avoid typing:

  if (VAR)
    message(FATAL_ERROR ...)
  endif()

Normal precondition functionality is preserved.

--- cmake/modules/SwiftUtils.cmake
+++ cmake/modules/SwiftUtils.cmake
@@ -1,6 +1,21 @@
+include(CMakeParseArguments)
+
 function(precondition var)
-  if (NOT ${var})
-    message(FATAL_ERROR "Error! Variable ${var} is false or not set!")
+  cmake_parse_arguments(
+    PRECONDITION # prefix
+    "NEGATE" # options
+    "" # single-value args
+    "" # multi-value args
+    ${ARGN})
+
+  if (PRECONDITION_NEGATE)
+    if (${var})
+      message(FATAL_ERROR "Error! Variable ${var} is true.")
+    endif()
+  else()
+    if (NOT ${var})
+      message(FATAL_ERROR "Error! Variable ${var} is false or not set.")
+    endif()
   endif()
 endfunction()


cmake: Don't translate from relative to absolute include paths

Don't translate from relative to absolute include paths.

It is lost to history why this was necessary and it is causing
problems with generator expressions so we remove the logic.

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

--- cmake/modules/extensions.cmake
+++ cmake/modules/extensions.cmake
@@ -87,26 +87,12 @@

 # https://cmake.org/cmake/help/latest/command/target_include_directories.html
 function(zephyr_include_directories)
-  foreach(arg ${ARGV})
-    if(IS_ABSOLUTE ${arg})
-      set(path ${arg})
-    else()
-      set(path ${CMAKE_CURRENT_SOURCE_DIR}/${arg})
-    endif()
-    target_include_directories(zephyr_interface INTERFACE ${path})
-  endforeach()
+  target_include_directories(zephyr_interface INTERFACE ${ARGV})
 endfunction()

 # https://cmake.org/cmake/help/latest/command/target_include_directories.html
 function(zephyr_system_include_directories)
-  foreach(arg ${ARGV})
-    if(IS_ABSOLUTE ${arg})
-      set(path ${arg})
-    else()
-      set(path ${CMAKE_CURRENT_SOURCE_DIR}/${arg})
-    endif()
-    target_include_directories(zephyr_interface SYSTEM INTERFACE ${path})
-  endforeach()
+  target_include_directories(zephyr_interface SYSTEM INTERFACE ${ARGV})
 endfunction()

 # https://cmake.org/cmake/help/latest/command/target_compile_definitions.html


Pass CTEST_USE_LAUNCHERS variable to slicer

See Issue #13851

--- CMake/Superbuild/External_Slicer.cmake
+++ CMake/Superbuild/External_Slicer.cmake
@@ -93,6 +93,7 @@
       -DADDITIONAL_C_FLAGS:STRING=${ADDITIONAL_C_FLAGS}
       -DADDITIONAL_CXX_FLAGS:STRING=${ADDITIONAL_CXX_FLAGS}
       -DBUILD_TESTING:BOOL=OFF
+      -DCTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
       -D${proj}_INSTALL_BIN_DIR:STRING=${Bender_INSTALL_BIN_DIR}
       -D${proj}_INSTALL_LIB_DIR:STRING=${Bender_INSTALL_BIN_DIR}
       -DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}


Bump TubeTK to get SegmentTubes scale fix

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "054b4b3de6be006b1526f71ffcdbf23ca37663ca"
+    GIT_TAG "e102c5134a4efbd7cf41069b454b103084f49089"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


ENH: Project.xml is now generated using the complete tree of dependencies.

All dashboard are now likely to submit the same Project.xml file.

--- CMake/ctkMacroGenerateProjectXml.cmake
+++ CMake/ctkMacroGenerateProjectXml.cmake
@@ -29,7 +29,9 @@
       MESSAGE(FATAL_ERROR "Target directory ${target_dir}/CMakeLists.txt doesn't exists !")
     ENDIF()

-    IF(${${option_name}})
+    # Remarks: Project.xml should contains all sub-project. That way
+    # all dashboards should submit a similar file.
+    #IF(${${option_name}})

       # extract project name from CMakeLists.txt
       FILE(STRINGS "${target_dir}/CMakeLists.txt" project_string
@@ -66,7 +68,7 @@
       ENDFOREACH()

       SET(xml_subprojects ${xml_subprojects} "  </SubProject>\n")
-    ENDIF()
+    #ENDIF()
   ENDFOREACH()

   SET(xml_content "<Project name=\"${name}\">\n${xml_subprojects}</Project>")


COMP: Removing USVideoSource Test until OpenCV Version is upgraded

--- Modules/US/Testing/files.cmake
+++ Modules/US/Testing/files.cmake
@@ -13,7 +13,7 @@
 )

 SET(MODULE_CUSTOM_TESTS
-mitkUSImageVideoSourceTest.cpp
+#mitkUSImageVideoSourceTest.cpp //deactivated until updated to current openCV
 )


Force openthreads superbuild on MSVC

Force openthreads superbuild on MSVC

--- CMake/External_openthread.cmake
+++ CMake/External_openthread.cmake
@@ -6,6 +6,10 @@

 option(USE_SYSTEM_OPENTHREAD "  Use a system build of OpenThread." ${DEFAULT_USE_SYSTEM_OPENTHREAD})
 mark_as_advanced(USE_SYSTEM_OPENTHREAD)
+
+if(MSVC)
+set(USE_SYSTEM_OPENTHREAD OFF)
+endif()

 if(USE_SYSTEM_OPENTHREAD)
   message(STATUS "  Using OpenThread system version")
@@ -18,6 +22,7 @@
     PREFIX ${proj}
     SVN_REPOSITORY "http://svn.openscenegraph.org/osg/OpenThreads/tags/OpenThreads-2.3.0/"
     SVN_REVISION -r 14667
+    SOURCE_DIR ${OPENTHREAD_SB_SRC}
     BINARY_DIR ${OPENTHREAD_SB_BUILD_DIR}
     INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
     CMAKE_CACHE_ARGS


Remove a couple patterns from the Boost header exclude list.  Some headers in these directories are needed indirectly.

--HG--
branch : v1-7

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -141,14 +141,12 @@
 	  # headers (try to exclude things we don't need)
 	  install(DIRECTORY "${Boost_INCLUDE_DIR}/boost" DESTINATION "boost_${Boost_LIB_VERSION}"
 		PATTERN "accumulators" EXCLUDE
-		PATTERN "algorithm" EXCLUDE
 		PATTERN "archive" EXCLUDE
 		PATTERN "asio" EXCLUDE
 		PATTERN "assign" EXCLUDE
 		PATTERN "bimap" EXCLUDE
 		PATTERN "circular_buffer" EXCLUDE
 		PATTERN "compatibility" EXCLUDE
-		PATTERN "concept" EXCLUDE
 		PATTERN "concept_check" EXCLUDE
 		PATTERN "dynamic_bitset" EXCLUDE
 		PATTERN "filesystem" EXCLUDE


we dont need it anymore, auto generated with wkcmake

--- SDLut/CMakeOld/FindSDLut.cmake
+++ SDLut/CMakeOld/FindSDLut.cmake
@@ -1,20 +0,0 @@
-# Locate Rage::SDLut library
-# This module defines
-# SDLut_LIBRARY, the name of the library to link against
-# SDLut_FOUND, if false, do not try to link to SDL
-# SDLut_INCLUDE_DIR, where to find SDL.hh
-
-FIND_PATH(SDLut_INCLUDE_DIR SDL.hh
-  $ENV{SDLutDIR}/include
-  )
-
-FIND_LIBRARY(SDLut_LIBRARY
-    NAMES SDLut
-    PATHS
-    $ENV{SDLutDIR}/lib
-    )
-
-SET(SDLut_FOUND "NO")
-IF(SDLut_LIBRARY)
-	SET(SDLut_FOUND "YES")
-ENDIF(SDLut_LIBRARY)


Updated the core/command_definitions.

Updated the core/command_definitions.

--- core/command_definitions.cmake
+++ core/command_definitions.cmake
@@ -1,4 +1,5 @@
 #!/usr/bin/env cmake -P
+cmake_minimum_required(VERSION 3.0)

 ## ARGC, ARGV<i>, ARGV and ARGN ##
 # ARGC: Arguments size
@@ -66,3 +67,32 @@
     f3 ARGV element: c
     f4 value: 2
 ]]
+
+message("")
+message("# function version")
+
+function(f5 value)
+  set(value 2)
+  message("f5 value: ${value}")
+  foreach(v IN LISTS ARGV)
+    message("f5 ARGV element: ${v}")
+  endforeach()
+endfunction()
+
+function(f6)
+  set(value 1)
+  message("f6 ARGV: ${ARGV}")
+  message("f6 value: ${value}")
+  f5(x y z)
+  message("f6 value: ${value}")
+endfunction()
+
+f6(a b c) #[[
+  f6 ARGV: a;b;c
+  f6 value: 1
+  f5 value: 2
+  f5 ARGV element: 2
+  f5 ARGV element: y
+  f5 ARGV element: z
+  f6 value: 1
+]]


Fix cmake syntax in build/cmake/macros/TarGz.cmake.

Apparently, case matters for some cmake keywords.

--- build/cmake/macros/TarGz.cmake
+++ build/cmake/macros/TarGz.cmake
@@ -1,6 +1,6 @@
 if (NOT WINDOWS)
     # BSD has both BSD tar, named "tar", and GNU tar, named "gtar" in ports...
-    if (not BSD_UNIX)
+    if (NOT BSD_UNIX)
 		set( TAR_COMMAND tar)
     else()
 		# Macos is _like_ bsd, but calls it "gnutuar"


Use clang compilation instead of lli-interpreting bitcode in cmake tests

- this fixes ARM builds for the time being, will have to be fixed
  for cross-compilation

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -323,7 +323,7 @@
   setup_cache_var_name(SIZEOF "${TYPE}-${TRIPLE}-${CLANG}")

   if(NOT DEFINED ${CACHE_VAR_NAME})
-    custom_try_run_lli("#include <stddef.h>\n #include <stdio.h>" "printf(\"%i\",(int)sizeof(${TYPE})); return 0;" ${RES_VAR} "${CLANG_TARGET_OPTION}${TRIPLE}")
+    custom_try_run_exe("#include <stddef.h>\n #include <stdio.h>" "printf(\"%i\",(int)sizeof(${TYPE})); return 0;" ${RES_VAR} "${CLANG_TARGET_OPTION}${TRIPLE}")
     if(NOT ${RES_VAR})
       message(SEND_ERROR "Could not determine sizeof(${TYPE})")
     endif()
@@ -337,7 +337,7 @@

   if(NOT DEFINED ${CACHE_VAR_NAME})

-    custom_try_run_lli("
+    custom_try_run_exe("
 #include <stddef.h>
 #include <stdio.h>


remove gtest_main_library

remove gtest_main_library

--- cmake/util.cmake
+++ cmake/util.cmake
@@ -154,8 +154,9 @@
 # Rest Arguemnts: not used.
 function(link_paddle_test TARGET_NAME)
     link_paddle_exe(${TARGET_NAME})
-    target_link_libraries(${TARGET_NAME} ${GTEST_MAIN_LIBRARIES}
-        ${GTEST_LIBRARIES} paddle_test_main)
+    target_link_libraries(${TARGET_NAME}
+                          ${GTEST_LIBRARIES}
+                          paddle_test_main)
 endfunction()

 # add_unittest_without_exec


Fix #54 by correcting reference to CXX flags for variants.

--- cmake/AddCXXCompilerFlag.cmake
+++ cmake/AddCXXCompilerFlag.cmake
@@ -32,7 +32,7 @@
   if(${SANITIZED_FLAG})
     string(REGEX REPLACE "[^A-Za-z_0-9]" "_" VARIANT "${VARIANT}")
     string(TOUPPER "${VARIANT}" VARIANT)
-    set(CMAKE_CXX_FLAGS${VARIANT} "${CMAKE_CXX_FLAGS}${VARIANT} ${FLAG}" PARENT_SCOPE)
+    set(CMAKE_CXX_FLAGS${VARIANT} "${CMAKE_CXX_FLAGS${VARIANT}} ${FLAG}" PARENT_SCOPE)
   endif()
 endfunction()


clBLAS isnt part of Accelerate on macOS

clBLAS isnt part of Accelerate on macOS

--- cmake/Modules/FindCLBLAS.cmake
+++ cmake/Modules/FindCLBLAS.cmake
@@ -7,13 +7,8 @@

 include (FindPackageHandleStandardArgs)

-if (APPLE)
-  find_path (CLBLAS_INCLUDES_PRE Accelerate.h)
-  find_library (CLBLAS_LIBRARIES_PRE NAMES Accelerate)
-else ()
-  find_path (CLBLAS_INCLUDES_PRE clBLAS.h)
-  find_library (CLBLAS_LIBRARIES_PRE NAMES clBLAS)
-endif ()
+find_path (CLBLAS_INCLUDES_PRE clBLAS.h)
+find_library (CLBLAS_LIBRARIES_PRE NAMES clBLAS)

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


Fix find_package

Fix find_package

--- cmake/SequoiaFindPackage.cmake
+++ cmake/SequoiaFindPackage.cmake
@@ -94,7 +94,7 @@
       message(STATUS "Package ${ARG_PACKAGE} not found due to missing: ${missing_required_vars}")
     endif()

-    if(required_vars_ok AND (${${ARG_PACKAGE}_FOUND} OR ${${package_upper}_FOUND}))
+    if(required_vars_ok AND (${ARG_PACKAGE}_FOUND OR ${package_upper}_FOUND))
       set(use_system TRUE)

       # Forward arguments


cmake: Modified FindWeston.cmake to use libweston-layout.so

libweston-layout.so is common layout library from ivi-shell of weston.
It supports common interface to control surfaces/layers.

Signed-off-by: Nobuhiko Tanibata <92313f26b3566e64b50391ce0051fc0e1f775402@denso.co.jp>

--- cmake/modules/FindWeston.cmake
+++ cmake/modules/FindWeston.cmake
@@ -22,12 +22,19 @@
 /include/weston
 )

+FIND_LIBRARY(WESTON_LIBRARIES
+NAMES weston-layout
+PATHS /lib/weston
+)
+
 SET( WESTON_FOUND "NO" )
-IF(WESTON_INCLUDE_DIR)
+IF(WESTON_INCLUDE_DIR AND WESTON_LIBRARIES)
     SET( WESTON_FOUND "YES" )
     message(STATUS "Found weston includes: ${WESTON_INCLUDE_DIR}")
-ENDIF(WESTON_INCLUDE_DIR)
+    message(STATUS "Found weston libs: ${WESTON_LIBRARIES}")
+ENDIF(WESTON_INCLUDE_DIR AND WESTON_LIBRARIES)

 MARK_AS_ADVANCED(
   WESTON_INCLUDE_DIR
+  WESTON_LIBRARIES
 )


[CMake] Print Python version on Windows

[CMake] Print Python version on Windows

Trying to figure out what's causing the Windows bot to fail.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@367125 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -197,8 +197,8 @@
   set(PYTHON_VERSION_MINOR ${PYTHON_VERSION_MINOR} PARENT_SCOPE)
   set(PYTHON_VERSION_PATCH ${PYTHON_VERSION_PATCH} PARENT_SCOPE)

-  message(STATUS "LLDB Found PythonExecutable: ${PYTHON_EXECUTABLE}")
-  message(STATUS "LLDB Found PythonLibs: ${PYTHON_LIBRARY}")
+  message(STATUS "LLDB Found PythonExecutable: ${PYTHON_EXECUTABLE} (${PYTHON_VERSION_STRING})")
+  message(STATUS "LLDB Found PythonLibs: ${PYTHON_LIB} (${PYTHONLIBS_VERSION_STRING})")
   message(STATUS "LLDB Found PythonDLL: ${PYTHON_DLL}")
   message(STATUS "LLDB Found PythonIncludeDirs: ${PYTHON_INCLUDE_DIR}")
 endfunction(find_python_libs_windows)


small adjustments in documentation

small adjustments in documentation

--- src/docbook/index.xml.cmake
+++ src/docbook/index.xml.cmake
@@ -397,7 +397,7 @@
     <sect5 id="building_install_package_rpm">
       <title>Building an rpm</title>
 <para>
-On a CentOS or Fedora machine. First as root install the dependencies
+On a CentOS or Fedora machine, first log in as root and install the dependencies
 <programlisting><![CDATA[
 # yum install xmlto libxml2-devel cmake gcc-c++ binutils gengetopt
 ]]></programlisting>
@@ -421,7 +421,7 @@
     <sect5 id="building_install_package_deb">
       <title>Building a deb package</title>
 <para>
-On a Debian or Ubuntu machine  do as root
+On a Debian or Ubuntu machine, first log in as root and install the dependencies
 <programlisting><![CDATA[
 # apt-get install libxml2-dev cmake g++ binutils gengetopt
 ]]></programlisting>


ENH: Allow RAW itk-module as shared library

Change-Id: Ia4f2a093ec63ec2d7ad6749b0426118b3344351c

--- Modules/IO/RAW/itk-module.cmake
+++ Modules/IO/RAW/itk-module.cmake
@@ -4,6 +4,7 @@
 reading RAW files.")

 itk_module(ITKIORAW
+  ENABLE_SHARED
   PRIVATE_DEPENDS
     ITKIOImageBase
   TEST_DEPENDS


FindEqualizer: look for GLEW_MX if need be

--- FindEqualizer.cmake
+++ FindEqualizer.cmake
@@ -69,7 +69,8 @@
 #  Output variables of the form EQUALIZER_FOO
 #

-# Find Collage
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/FindEqualizer)
+
 set(_eq_required)
 if(Equalizer_FIND_REQUIRED)
   set(_eq_required REQUIRED)
@@ -217,6 +218,28 @@
   if(NOT COLLAGE_FOUND)
     set(_eq_EPIC_FAIL 1)
   endif()
+
+  # GLEW_MX
+  set(TEST_SRC ${CMAKE_BINARY_DIR}/glewmx_test.cpp)
+  file(WRITE ${TEST_SRC}
+    "#include <eq/client/defines.h>\n"
+    "#ifndef EQ_GLEW_INTERNAL\n"
+    "#  error Need external GLEW_MX\n"
+    "#endif\n"
+    "int main(int argc, char* argv[]){}\n"
+  )
+
+  try_compile(_glew_mx_internal ${CMAKE_BINARY_DIR}/glewmx_test ${TEST_SRC}
+    CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${_eq_INCLUDE_DIR}"
+                "-DLINK_LIBRARIES:STRING=${_eq_LIBRARY}"
+    OUTPUT_VARIABLE out
+  )
+  if(_glew_mx_internal)
+    set(GLEW_MX_INCLUDE_DIRS)
+    set(GLEW_MX_LIBRARIES)
+  else()
+    find_package(GLEW_MX ${_eq_required} ${_eq_quiet})
+  endif()
 endif()

 if(_eq_EPIC_FAIL OR NOT COLLAGE_FOUND)
@@ -233,8 +256,8 @@
   endif()
 endif()

-set(EQUALIZER_INCLUDE_DIRS ${_eq_INCLUDE_DIR})
-set(EQUALIZER_LIBRARIES ${_eq_LIBRARY} ${COLLAGE_LIBRARIES})
+set(EQUALIZER_INCLUDE_DIRS ${_eq_INCLUDE_DIR} ${GLEW_MX_INCLUDE_DIRS})
+set(EQUALIZER_LIBRARIES ${_eq_LIBRARY} ${COLLAGE_LIBRARIES} ${GLEW_MX_LIBRARIES})
 if(EQUALIZER_VERSION VERSION_GREATER 1.0)
   set(EQUALIZER_LIBRARIES ${EQUALIZER_LIBRARIES} ${_eq_fabric_LIBRARY})
 endif()


Split off 7.6.46

Split off 7.6.46

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 6 )
-set ( HPCC_POINT 45 )
+set ( HPCC_POINT 47 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.8.62

Split off 7.8.62

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 61 )
+set ( HPCC_POINT 63 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


fix typo in FindLLVM.cmake

fix typo in FindLLVM.cmake

Signed-off-by: Lu Guanqun <2dad72ae5fe48bf7bd43ddccece96ab3f4a6c25d@intel.com>
Reviewed-by: Zhigang Gong <e04a7b9b70b1e4c6318cf117dcd1a9056e14b97a@linux.intel.com>

--- CMake/FindLLVM.cmake
+++ CMake/FindLLVM.cmake
@@ -31,7 +31,7 @@
     if (LLVM_VERSION_NODOT VERSION_EQUAL LLVM_FIND_VERSION_NODOT)
       message(STATUS "find stable LLVM version ${LLVM_VERSION}")
     else (LLVM_VERSION_NODOT VERSION_EQUAL LLVM_FIND_VERSION_NODOT)
-      message(STATUS "find untable LLVM version ${LLVM_VERSION}")
+      message(STATUS "find unstable LLVM version ${LLVM_VERSION}")
     endif (LLVM_VERSION_NODOT VERSION_EQUAL LLVM_FIND_VERSION_NODOT)
     add_definitions("-DLLVM_${LLVM_VERSION_NODOT}")
   endif (LLVM_VERSION_NODOT VERSION_LESS LLVM_FIND_VERSION_NODOT)


[fixed] optional fortran

[fixed] optional fortran

--- cmake/BOTG.cmake
+++ cmake/BOTG.cmake
@@ -165,52 +165,70 @@
 MACRO( botgLibrary name )
     # parse arguments
     SET(options)
-    SET(one_value_args)
+    SET(one_value_args LANGUAGE )
     SET(multi_value_args LINK_TO SOURCES HEADERS )
     CMAKE_PARSE_ARGUMENTS(library "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN} )

-    #create list of sources
-    SET( sources )
-    FOREACH( source ${library_SOURCES} )
-        STRING( REGEX REPLACE ".in$" "" replaced "${source}" )
-        IF( NOT "${source}" STREQUAL "${replaced}" )
-            CONFIGURE_FILE( "${source}" "${CMAKE_CURRENT_BINARY_DIR}/${replaced}" )
-            SET( source "${CMAKE_CURRENT_BINARY_DIR}/${replaced}" )
-        ENDIF()
-        LIST(APPEND sources "${source}" )
-    ENDFOREACH()
-
-    #create list of headers and install directives
-    SET( headers )
-    FOREACH( header ${library_HEADERS} )
-        STRING( REGEX REPLACE ".in$" "" replaced "${header}" )
-        IF( NOT "${header}" STREQUAL "${replaced}" )
-            CONFIGURE_FILE( "${header}" "${CMAKE_CURRENT_BINARY_DIR}/${replaced}" )
-            SET( header "${CMAKE_CURRENT_BINARY_DIR}/${replaced}" )
-        ENDIF()
-        GET_FILENAME_COMPONENT( dir "${header}" DIRECTORY )
-        INSTALL(FILES "${header}" DESTINATION "include/${dir}")
-        LIST(APPEND headers "${header}" )
-    ENDFOREACH()
-
-    #call TriBITS to add a library
-    TRIBITS_ADD_LIBRARY( ${name}
-        SOURCES
-            "${sources}"
-        NOINSTALLHEADERS
-            "${headers}"
-    )
-
-    #do linking
-    FOREACH( link_to ${library_LINK_TO} )
-        TARGET_LINK_LIBRARIES( ${name} ${link_to} )
-    ENDFOREACH()
-
-    #set include directories
-    INCLUDE_DIRECTORIES(
-        ${CMAKE_CURRENT_SOURCE_DIR}  #For C++
-        ${CMAKE_CURRENT_BINARY_DIR}  #For fortran modules/configured files
-    )
+    #determine if language is enabled
+    SET(enabled ON)
+    IF( NOT "${library_LANGUAGE}" STREQUAL "" )
+        IF( "${library_LANGUAGE}" STREQUAL Fortran )
+            SET(enabled "${${PROJECT_NAME}_ENABLE_Fortran}" )
+        ELSEIF(  "${library_LANGUAGE}" STREQUAL CXX )
+            SET(enabled "${${PROJECT_NAME}_ENABLE_CXX}" )
+        ELSEIF(  "${library_LANGUAGE}" STREQUAL C )
+            SET(enabled "${${PROJECT_NAME}_ENABLE_C}" )
+        ELSE()
+            MESSAGE( FATAL_ERROR "[BootsOnTheGround] botgLibrary LANGUAGE ${libraryLanguage} is unknown (Fortran|C|CXX)")
+        ENDIF()
+    ENDIF()
+
+    IF( enabled )
+
+        #create list of sources
+        SET( sources )
+        FOREACH( source ${library_SOURCES} )
+            STRING( REGEX REPLACE ".in$" "" replaced "${source}" )
+            IF( NOT "${source}" STREQUAL "${replaced}" )
+                CONFIGURE_FILE( "${source}" "${CMAKE_CURRENT_BINARY_DIR}/${replaced}" )
+                SET( source "${CMAKE_CURRENT_BINARY_DIR}/${replaced}" )
+            ENDIF()
+            LIST(APPEND sources "${source}" )
+        ENDFOREACH()
+
+        #create list of headers and install directives
+        SET( headers )
+        FOREACH( header ${library_HEADERS} )
+            STRING( REGEX REPLACE ".in$" "" replaced "${header}" )
+            IF( NOT "${header}" STREQUAL "${replaced}" )
+                CONFIGURE_FILE( "${header}" "${CMAKE_CURRENT_BINARY_DIR}/${replaced}" )
+                SET( header "${CMAKE_CURRENT_BINARY_DIR}/${replaced}" )
+            ENDIF()
+            GET_FILENAME_COMPONENT( dir "${header}" DIRECTORY )
+            INSTALL(FILES "${header}" DESTINATION "include/${dir}")
+            LIST(APPEND headers "${header}" )
+        ENDFOREACH()
+
+        #call TriBITS to add a library
+        TRIBITS_ADD_LIBRARY( ${name}
+            SOURCES
+                "${sources}"
+            NOINSTALLHEADERS
+                "${headers}"
+        )
+
+        #do linking
+        FOREACH( link_to ${library_LINK_TO} )
+            TARGET_LINK_LIBRARIES( ${name} ${link_to} )
+        ENDFOREACH()
+
+        #set include directories
+        INCLUDE_DIRECTORIES(
+            ${CMAKE_CURRENT_SOURCE_DIR}  #For C++
+            ${CMAKE_CURRENT_BINARY_DIR}  #For fortran modules/configured files
+        )
+
+    ENDIF()

 ENDMACRO()
 #-------------------------------------------------------------------------------
@@ -607,7 +625,7 @@
     ELSE()
         GLOBAL_SET( BOTG_${lang}_COMPILER "" )
     ENDIF()
-    GLOBAL_SET( ${PROJECT_NAME}_ENABLE_${lang} ${result} CACHE BOOL "Language=${lang} enabled?")
+    GLOBAL_SET( ${PROJECT_NAME}_ENABLE_${lang} ${result} )
 ENDMACRO()
 #-------------------------------------------------------------------------------
 # PRIVATE
@@ -720,7 +738,7 @@
     IF( ("${compiler}" STREQUAL "ANY_COMPILER") OR ("${compiler}" STREQUAL "") )
         SET(${found} ON PARENT_SCOPE )
     ELSE()
-        STRING(REGEX MATCH "${compiler}" found_ ${BOTG_${lang}_COMPILER})
+        STRING(REGEX MATCH "${compiler}" found_ "${BOTG_${lang}_COMPILER}")
         IF( NOT "${found_}" STREQUAL "" )
             SET(${found} ON PARENT_SCOPE)
         ENDIF()
@@ -735,7 +753,7 @@
     IF( ("${system}" STREQUAL "ANY_SYSTEM") OR ("${system}" STREQUAL "") )
         SET(${found} ON PARENT_SCOPE )
     ELSE()
-        STRING(REGEX MATCH "${system}" found_ ${BOTG_SYSTEM})
+        STRING(REGEX MATCH "${system}" found_ "${BOTG_SYSTEM}")
         IF( NOT "${found_}" STREQUAL "" )
             SET(${found} ON PARENT_SCOPE)
         ENDIF()


remove support for older cuda since we don't compile

--- cmake/Cuda.cmake
+++ cmake/Cuda.cmake
@@ -4,7 +4,7 @@

 # Known NVIDIA GPU achitectures Caffe can be compiled for.
 # This list will be used for CUDA_ARCH_NAME = All option
-set(Caffe_known_gpu_archs "20 21(20) 30 35 50 60 61")
+set(Caffe_known_gpu_archs "30 35 50 60 61")

 ################################################################################################
 # A function for automatic detection of GPUs installed  (if autodetection is enabled)


Added new services for 11/30 launch.

Added new services for 11/30 launch.

--- cmake/sdks.cmake
+++ cmake/sdks.cmake
@@ -62,6 +62,7 @@
 list(APPEND C2J_LIST "kinesisanalytics:2015-08-14")
 list(APPEND C2J_LIST "kms:2014-11-01")
 list(APPEND C2J_LIST "lambda:2015-03-31")
+list(APPEND C2J_LIST "lightsail:2016-11-28")
 list(APPEND C2J_LIST "logs:2014-03-28")
 list(APPEND C2J_LIST "machinelearning:2014-12-12")
 list(APPEND C2J_LIST "marketplacecommerceanalytics:2015-07-01")
@@ -69,7 +70,9 @@
 list(APPEND C2J_LIST "mobileanalytics:2014-06-05")
 list(APPEND C2J_LIST "monitoring:2010-08-01")
 list(APPEND C2J_LIST "opsworks:2013-02-18")
+list(APPEND C2J_LIST "polly:2016-06-10")
 list(APPEND C2J_LIST "rds:2014-10-31")
+list(APPEND C2J_LIST "rekognition:2016-06-27")
 list(APPEND C2J_LIST "redshift:2012-12-01")
 list(APPEND C2J_LIST "route53:2013-04-01")
 list(APPEND C2J_LIST "route53domains:2014-05-15")


Properly resolve transient library finding

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -154,14 +154,25 @@
   "endif()\n\n"
 )
 foreach(_transient ${${UPPER_PROJECT_NAME}_TRANSIENT_LIBRARIES})
+  if(${_transient}_FOUND)
+    set(${_transient}_name ${_transient})
+  endif()
+  string(TOUPPER ${_transient} _TRANSIENT)
+  if(${_TRANSIENT}_FOUND)
+    set(${_transient}_name ${_TRANSIENT})
+  endif()
+  if(NOT ${_transient}_name)
+    message(FATAL_ERROR "Transient library ${_transient} was not properly resolved")
+  endif()
+  if(${${_transient}_name}_VERSION)
+    set(${${_transient}_name}_findmode EXACT)
+  else()
+    set(${${_transient}_name}_findmode REQUIRED)
+  endif()
   list(APPEND TRANSIENTS
-    "string(TOUPPER ${_transient} _TRANSIENT)\n"
-    "if(\${\${_TRANSIENT}_VERSION})\n"
-    "  set(${_transient}_exact EXACT)\n"
-    "endif()\n"
-    "find_package(${_transient} \${\${_TRANSIENT}_VERSION} REQUIRED \${${_transient}_exact} \${_req} \${_quiet})\n"
-    "if(\${_TRANSIENT}_FOUND)\n"
-    "  list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_TRANSIENT}_LIBRARIES})\n"
+    "find_package(${_transient} ${${${_transient}_name}_VERSION} ${${${_transient}_name}_findmode} \${_req} \${_quiet})\n"
+    "if(${${_transient}_name}_FOUND)\n"
+    "  list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${${${_transient}_name}_LIBRARIES})\n"
     "else()\n"
     "  set(_fail TRUE)\n"
     "endif()\n\n")


Fix comment of Tracy build option.

Fix comment of Tracy build option.

--- cmake/Modules/UrhoCommon.cmake
+++ cmake/Modules/UrhoCommon.cmake
@@ -254,7 +254,7 @@
 cmake_dependent_option (URHO3D_PACKAGING "Enable resources packaging support" FALSE "NOT WEB" TRUE)
 # Enable profiling by default. If disabled, autoprofileblocks become no-ops and the Profiler subsystem is not instantiated.
 option (URHO3D_PROFILING "Enable profiling support" TRUE)
-# Enable Tracy profiling by default. Tracy profiling only works if URHO3D_PROFILING is set to be true.
+# Extended "Tracy Profiler" based profiling. Disabled by default. This feature only works if URHO3D_PROFILING is also set to be true.
 option (URHO3D_TRACY_PROFILING "Enable Tracy support for extended profiling. Tracy profiling only works if URHO3D_PROFILING is on" FALSE)
 # Enable logging by default. If disabled, LOGXXXX macros become no-ops and the Log subsystem is not instantiated.
 option (URHO3D_LOGGING "Enable logging support" TRUE)