Streamlined boost searching and auto enable build.

--- cmake/ThirdPartyBoost.cmake
+++ cmake/ThirdPartyBoost.cmake
@@ -6,10 +6,50 @@
 #
 ########################################################################

-OPTION(THIRDPARTY_BUILD_BOOST "Build Boost libraries" OFF)
+#If the user has not set BOOST_ROOT, look in a couple common places first.
+MESSAGE(STATUS "Searching for Boost")
+SET(NEEDED_BOOST_LIBS thread iostreams date_time filesystem system
+    program_options regex)
+IF( BOOST_ROOT )
+    FIND_PACKAGE( Boost COMPONENTS ${NEEDED_BOOST_LIBS})
+ELSE ()
+    SET(TEST_ENV1 $ENV{BOOST_HOME})
+    SET(TEST_ENV2 $ENV{BOOST_DIR})
+    IF (DEFINED TEST_ENV1)
+        SET(BOOST_ROOT $ENV{BOOST_HOME})
+        FIND_PACKAGE( Boost QUIET COMPONENTS ${NEEDED_BOOST_LIBS} )
+    ELSEIF (DEFINED TEST_ENV2)
+        SET(BOOST_ROOT $ENV{BOOST_DIR})
+        FIND_PACKAGE( Boost QUIET COMPONENTS ${NEEDED_BOOST_LIBS} )
+    ELSE ()
+        SET(BOOST_ROOT ${TPDIST})
+        FIND_PACKAGE( Boost QUIET COMPONENTS ${NEEDED_BOOST_LIBS} )
+    ENDIF()
+ENDIF()
+
+# Check what we found and determine if we need to build boost
+FOREACH(FOUND_VAR ${NEEDED_BOOST_LIBS})
+    STRING(TOUPPER ${FOUND_VAR} FOUND_VAR_UPPER)
+    IF (Boost_${FOUND_VAR_UPPER}_FOUND )
+        MESSAGE(STATUS "-- Found Boost ${FOUND_VAR} library: "
+                "${Boost_${FOUND_VAR_UPPER}_LIBRARY}")
+    ELSE ()
+        MESSAGE(STATUS "-- Pre-installed Boost ${FOUND_VAR} library not found")
+    ENDIF()
+ENDFOREACH()
+
+IF (NOT Boost_FOUND)
+    SET(BUILD_BOOST ON)
+ELSE()
+    SET(BUILD_BOOST OFF)
+ENDIF ()
+
+
+OPTION(THIRDPARTY_BUILD_BOOST "Build Boost libraries" ${BUILD_BOOST})
 SET(Boost_USE_MULTITHREADED ON CACHE BOOL
     "Search for multithreaded boost libraries")
 MARK_AS_ADVANCED(Boost_USE_MULTITHREADED)
+

 IF (WIN32)
     ADD_DEFINITIONS("-DBOOST_ALL_NO_LIB")
@@ -141,105 +181,18 @@
     SET(Boost_CONFIG_LIBRARY_DIR ${TPLIB})
     SET(Boost_LIBRARIES boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_system boost_thread)
     LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+    STRING(REPLACE ";" ", " NEEDED_BOOST_LIBS_STRING "${NEEDED_BOOST_LIBS}")
+    MESSAGE(STATUS "Build boost libs: ${NEEDED_BOOST_LIBS_STRING}")
 ELSE (THIRDPARTY_BUILD_BOOST)
     ADD_CUSTOM_TARGET(boost ALL)
     SET(Boost_DEBUG 0)
     SET(Boost_NO_BOOST_CMAKE ON)
-    #If the user has not set BOOST_ROOT, look in a couple common places first.
-    IF( NOT BOOST_ROOT )
-        SET(TEST_ENV1 $ENV{BOOST_HOME})
-        SET(TEST_ENV2 $ENV{BOOST_DIR})
-        IF (DEFINED TEST_ENV1)
-            SET(BOOST_ROOT $ENV{BOOST_HOME})
-            FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time
-                filesystem system program_options regex )
-        ELSEIF (DEFINED TEST_ENV2)
-            SET(BOOST_ROOT $ENV{BOOST_DIR})
-            FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time
-                filesystem system program_options regex )
-        ELSE ()
-            SET(BOOST_ROOT ${TPDIST})
-            FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time filesystem system program_options regex)
-        ENDIF()
-    ELSE()
-        FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time filesystem system program_options regex)
-    ENDIF()
-
-    IF (Boost_IOSTREAMS_FOUND)
-        MESSAGE(STATUS "Found Boost iostreams library: "
-                       "${Boost_IOSTREAMS_LIBRARY}")
-    ELSE ()
-        MESSAGE(WARNING "Boost IOSTREAM library not found. "
-                        "Please ensure it is installed, or Boost was "
-                        "compiled with the --with-iostreams option.")
-    ENDIF ()
-
-    IF (Boost_THREAD_FOUND)
-        MESSAGE(STATUS "Found Boost thread library: "
-                       "${Boost_THREAD_LIBRARY}")
-    ELSE ()
-        MESSAGE(WARNING "Boost THREAD library not found. "
-                        "Please ensure it is installed, or Boost was "
-                        "compiled with the --with-thread option.")
-    ENDIF ()
-
-    IF (Boost_DATE_TIME_FOUND)
-        MESSAGE(STATUS "Found Boost date_time library: "
-                       "${Boost_DATE_TIME_LIBRARY}")
-    ELSE ()
-        MESSAGE(WARNING "Boost DATE_TIME library not found. "
-                        "Please ensure it is installed, or Boost was "
-                        "compiled with the --with-date_time option.")
-    ENDIF ()
-
-    IF (Boost_FILESYSTEM_FOUND)
-        MESSAGE(STATUS "Found Boost filesystem library: "
-                       "${Boost_FILESYSTEM_LIBRARY}")
-    ELSE ()
-        MESSAGE(WARNING "Boost FILESYSTEM library not found. "
-                        "Please ensure it is installed, or Boost was "
-                        "compiled with the --with-filesystem option.")
-    ENDIF ()
-
-    IF (Boost_SYSTEM_FOUND)
-        MESSAGE(STATUS "Found Boost system library: "
-                       "${Boost_SYSTEM_LIBRARY}")
-    ELSE ()
-        MESSAGE(WARNING "Boost SYSTEM library not found. "
-                        "Please ensure it is installed, or Boost was "
-                        "compiled with the --with-filesystem option.")
-    ENDIF ()
-
-    IF (Boost_PROGRAM_OPTIONS_FOUND)
-        MESSAGE(STATUS "Found Boost program_options library: "
-                       "${Boost_PROGRAM_OPTIONS_LIBRARY}")
-    ELSE ()
-        MESSAGE(WARNING "Boost PROGRAM_OPTIONS library not found. "
-                        "Please ensure it is installed, or Boost was "
-                        "compiled with the --with-program_options option.")
-    ENDIF ()
-
-    IF (Boost_REGEX_FOUND)
-        MESSAGE(STATUS "Found Boost regex library: "
-                       "${Boost_REGEX_LIBRARY}")
-    ELSE ()
-        MESSAGE(WARNING "Boost REGEX library not found. "
-                        "Please ensure it is installed, or Boost was "
-                        "compiled with the --with-regex option.")
-    ENDIF ()
-
     IF (BOOST_THREAD_LIBRARY)
         MARK_AS_ADVANCED(BOOST_THREAD_LIBRARY)
     ENDIF (BOOST_THREAD_LIBRARY)
     SET(Boost_CONFIG_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
     SET(Boost_CONFIG_LIBRARY_DIR ${Boost_LIBRARY_DIRS})
-
-    IF (NOT Boost_FOUND)
-        MESSAGE(FATAL_ERROR "One of more Boost libraries could not be found. "
-                            "See above warnings. To have CMake automatically "
-                            "build and install the necessary Boost libraries "
-                            "select the THIRDPARTY_BUILD_BOOST option.")
-    ENDIF ()
 ENDIF (THIRDPARTY_BUILD_BOOST)

 INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS})


Fix typo

Fix typo

--- cmake/compiler_option.cmake
+++ cmake/compiler_option.cmake
@@ -67,12 +67,12 @@
       ENDIF(  )
     ELSEIF( _CPP_STD_VERSION STREQUAL 14 )
       IF( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9.0 )
-        MESSAGE( SEND_ERROR "GCC version is too low to use C++14 standard features : Clang(${CMAKE_CXX_COMPILER_VERSION})" )
+        MESSAGE( SEND_ERROR "GCC version is too low to use C++14 standard features : GCC(${CMAKE_CXX_COMPILER_VERSION})" )
       ENDIF(  )
       SET( STD_CODE "c++14" )
     ELSEIF( _CPP_STD_VERSION STREQUAL 17 )
       IF( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1.0 )
-        MESSAGE( SEND_ERROR "GCC version is too low to use C++17 standard features : Clang(${CMAKE_CXX_COMPILER_VERSION})" )
+        MESSAGE( SEND_ERROR "GCC version is too low to use C++17 standard features : GCC(${CMAKE_CXX_COMPILER_VERSION})" )
       ENDIF(  )
       SET( STD_CODE "c++1z" )
     ENDIF()


[CMake] Make it possible to set the RPATH in add_lldb_exectable.

Make it possible to pass a build and install RPATH to
add_lldb_executable instead of having to call lldb_setup_rpaths after
the fact.

This fixes a real issue where setting an install RPATH with
lldb_setup_rpaths would only affect the symroot installation component.
Given that lldb_setup_rpaths sets a target property I would expect this
to be orthogonal to installation components. Regardless, it makes sense
to integrate this functionality in add_lldb_exectable.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@375068 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 0f53352cb22da3e0bd5e4d4272e9849e9883f11e)

--- cmake/modules/AddLLDB.cmake
+++ cmake/modules/AddLLDB.cmake
@@ -142,7 +142,7 @@
   cmake_parse_arguments(ARG
     "GENERATE_INSTALL"
     "INSTALL_PREFIX;ENTITLEMENTS"
-    "LINK_LIBS;LINK_COMPONENTS"
+    "LINK_LIBS;LINK_COMPONENTS;BUILD_RPATH;INSTALL_RPATH"
     ${ARGN}
     )

@@ -164,13 +164,26 @@
   target_link_libraries(${name} PRIVATE ${ARG_LINK_LIBS})
   set_target_properties(${name} PROPERTIES FOLDER "lldb executables")

+  if (ARG_BUILD_RPATH)
+    set_target_properties(${name} PROPERTIES BUILD_RPATH "${ARG_BUILD_RPATH}")
+  endif()
+
+  if (ARG_INSTALL_RPATH)
+    set_target_properties(${name} PROPERTIES
+      BUILD_WITH_INSTALL_RPATH OFF
+      INSTALL_RPATH "${ARG_INSTALL_RPATH}")
+  endif()
+
   if(ARG_GENERATE_INSTALL)
     set(install_dest bin)
     if(ARG_INSTALL_PREFIX)
       set(install_dest ${ARG_INSTALL_PREFIX})
     endif()
     install(TARGETS ${name} COMPONENT ${name}
-            RUNTIME DESTINATION ${install_dest})
+            RUNTIME DESTINATION ${install_dest}
+            LIBRARY DESTINATION ${install_dest}
+            BUNDLE DESTINATION ${install_dest}
+            FRAMEWORK DESTINATION ${install_dest})
     if (NOT CMAKE_CONFIGURATION_TYPES)
       add_llvm_install_targets(install-${name}
                                DEPENDS ${name}


Move clang feature flags settings out of LLVM core and into cfe

clang r212997 incorporated these settings into its own build system.  They no
longer need to be set from LLVM.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -632,22 +632,6 @@
   set(HOST_OS ${CMAKE_SYSTEM_NAME})
   set(HOST_ARCH ${CMAKE_SYSTEM_PROCESSOR})

-  if (CLANG_ENABLE_ARCMT)
-    set(ENABLE_CLANG_ARCMT "1")
-  else()
-    set(ENABLE_CLANG_ARCMT "0")
-  endif()
-  if (CLANG_ENABLE_REWRITER)
-    set(ENABLE_CLANG_REWRITER "1")
-  else()
-    set(ENABLE_CLANG_REWRITER "0")
-  endif()
-  if (CLANG_ENABLE_STATIC_ANALYZER)
-    set(ENABLE_CLANG_STATIC_ANALYZER "1")
-  else()
-    set(ENABLE_CLANG_STATIC_ANALYZER "0")
-  endif()
-
   configure_file(${input} ${output} @ONLY)
 endfunction()


Swap order of drivers' and devices' lists in summary in order to have the
general (drivers list) first followed by the specific (devices list) next.

svn path=/trunk/; revision=7899

--- cmake/modules/summary.cmake
+++ cmake/modules/summary.cmake
@@ -95,8 +95,8 @@
 LIB_TAG:		${LIB_TAG}

 ENABLE_DYNDRIVERS:	${ENABLE_DYNDRIVERS}
+DRIVERS_LIST: ${DRIVERS_LIST}
 DEVICES_LIST: ${DEVICES_LIST}
-DRIVERS_LIST: ${DRIVERS_LIST}

 Library options:
 BUILD_SHARED_LIBS:	${BUILD_SHARED_LIBS}		PL_DOUBLE:	${PL_DOUBLE}


cpack: proper package creating with git revision

--- cmake/tarantool_cpack.cmake
+++ cmake/tarantool_cpack.cmake
@@ -19,8 +19,10 @@
 #
 STRING(TOLOWER "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}" platform)

-set (CPACK_PACKAGE_FILE_NAME
-"tarantool-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${platform}")
+set (CPACK_PACKAGE_FILE_NAME "tarantool-${TARANTOOL_VERSION}-${platform}")
+if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+    set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-debug")
+endif()

 #
 #


Fix static build on macOS

Fix static build on macOS

Summary:
On macOS, we can never link to a static runtime since it is not provided, we have to link dynamically to the C standard library.
When building redex statically with `-BUILD_TYPE=Static`, our cmake script sets `Boost_USE_STATIC_RUNTIME=ON` and fails to find a boost variant.
This diff fixes the issue by keeping `Boost_USE_STATIC_RUNTIME` undefined.

Reviewed By: dkgi

Differential Revision: D28732611

fbshipit-source-id: 43137544e9036e6dac14519d5846d839a95dc15b

--- cmake_modules/Commons.cmake
+++ cmake_modules/Commons.cmake
@@ -41,7 +41,9 @@

     if(ENABLE_STATIC)
         set(Boost_USE_STATIC_LIBS ON)
-        set(Boost_USE_STATIC_RUNTIME ON)
+        if(NOT APPLE)
+            set(Boost_USE_STATIC_RUNTIME ON)
+        endif()
         set(Boost_USE_MULTITHREADED ON)
     endif()


Add path to ejson that's needed by mb_map when vbmap is used.

Change-Id: I8def18a5008908d91eb4eb88085f88633ad5aaa1
Reviewed-on: http://review.couchbase.org/50574
Reviewed-by: Artem Stemkovski <15a0730a27c69f62ab86f2b6c639fca202166c02@couchbase.com>
Tested-by: Aliaksey Artamonau <3c875bcfb3adf2a65b2ae7686ca921e6c9433147@gmail.com>

--- cmake_modules/do-test.cmake
+++ cmake_modules/do-test.cmake
@@ -19,6 +19,7 @@
   "${ERL_EXECUTABLE}"
   -pa ./ebin ${ebindirs} "${COUCHDB_BIN_DIR}/src/couchdb"
   -pa "${COUCHDB_BIN_DIR}/src/mochiweb"
+  -pa "${COUCHDB_BIN_DIR}/src/ejson"
   -noshell -kernel error_logger silent -shutdown_time 10000
   -eval "\"application:start(sasl).\""
   -eval "\"case t:${TEST_TARGET}() of ok -> init:stop(); _ -> init:stop(1) end.\"")
@@ -27,6 +28,7 @@
   COMMAND "${ERL_EXECUTABLE}"
   -pa ./ebin ${ebindirs} "${COUCHDB_BIN_DIR}/src/couchdb"
   -pa "${COUCHDB_BIN_DIR}/src/mochiweb"
+  -pa "${COUCHDB_BIN_DIR}/src/ejson"
   -noshell -kernel error_logger silent -shutdown_time 10000
   -eval "application:start(sasl)."
   -eval "case t:${TEST_TARGET}() of ok -> init:stop(); _ -> init:stop(1) end.")


Squashed '3rdparty/github/cmake-utils-remote/' changes from ab35df0..c43493b

c43493b Use target_file in test

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

--- cmake/MyPackageCheck.cmake
+++ cmake/MyPackageCheck.cmake
@@ -35,7 +35,7 @@

   FOREACH (_name ${name} ${name}_static)
     ADD_TEST (NAME ${_name}
-      COMMAND ${CMAKE_COMMAND} -E env "PATH=${_test_path}" ${_name}
+      COMMAND ${CMAKE_COMMAND} -E env "PATH=${_test_path}" $<TARGET_FILE:${_name}>
       WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH})
     ADD_DEPENDENCIES(check ${_name})
   ENDFOREACH ()


CMAKE_VS_PLATFORM_TOOLSET might be empty (#1009)

According to https://gitlab.kitware.com/cmake/cmake/-/issues/17976,
CMAKE_VS_PLATFORM_TOOLSET is set only when using a Visual Studio generator.

When we use Ninja as the generator, CMAKE_VS_PLATFORM_TOOLSET will be empty.
As a result:
if(${CMAKE_VS_PLATFORM_TOOLSET} STREQUAL "v140")
will be treated as:
if( STREQUAL "v140")

We may also quote it like this:
if("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v140")
but that won't make the warnings disappeared in VS2015.

--- cmake/simdjson-flags.cmake
+++ cmake/simdjson-flags.cmake
@@ -77,7 +77,7 @@

 if(MSVC)
-if(${CMAKE_VS_PLATFORM_TOOLSET} STREQUAL "v140")
+if("${MSVC_TOOLSET_VERSION}" STREQUAL "140")
   # Visual Studio 2015 issues warnings and we tolerate it,  cmake -G"Visual Studio 14" ..
   target_compile_options(simdjson-internal-flags INTERFACE /W0 /sdl)
 else()


adding tbb.lib and tbbmalloc.lib to release package under Windows

--- common/cmake/FindTBB.cmake
+++ common/cmake/FindTBB.cmake
@@ -101,6 +101,7 @@
 IF (WIN32)
   INSTALL(PROGRAMS ${TBB_BINDIR}/tbb.dll ${TBB_BINDIR}/tbbmalloc.dll DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
   INSTALL(PROGRAMS ${TBB_BINDIR}/tbb.dll ${TBB_BINDIR}/tbbmalloc.dll DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
+  INSTALL(PROGRAMS ${TBB_LIBDIR}/tbb.lib ${TBB_LIBDIR}/tbbmalloc.lib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
 ELSEIF (EMBREE_ZIP_MODE)
   IF (APPLE)
     INSTALL(PROGRAMS ${EMBREE_TBB_ROOT}/lib/libtbb.dylib ${EMBREE_TBB_ROOT}/lib/libtbbmalloc.dylib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)


Update CetCopy

Update CetCopy

Import new string replacement logic from upstream.

--- Modules/CetCopy.cmake
+++ Modules/CetCopy.cmake
@@ -41,30 +41,45 @@
 # program changes if one lists the script in the DEPENDS list of the
 # custom command.
 ########################################################################
-include (CMakeParseArguments)
-function (cet_copy)
-  cmake_parse_arguments(CETC "PROGRAMS;NAME_AS_TARGET"
+include(CMakeParseArguments)
+
+function(cet_copy)
+  cmake_parse_arguments(CETC
+    "PROGRAMS;NAME_AS_TARGET"
     "DESTINATION;NAME;WORKING_DIRECTORY"
     "DEPENDENCIES"
     ${ARGN})
-  if (NOT CETC_DESTINATION)
+
+  if(NOT CETC_DESTINATION)
     message(FATAL_ERROR "Missing required option argument DESTINATION")
   endif()
-  if (NOT CETC_WORKING_DIRECTORY)
+
+  if(NOT CETC_WORKING_DIRECTORY)
     set(CETC_WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
   endif()
-  foreach (source ${CETC_UNPARSED_ARGUMENTS})
-    if (CETC_NAME)
+
+  foreach(source ${CETC_UNPARSED_ARGUMENTS})
+    if(CETC_NAME)
       set(dest_path "${CETC_DESTINATION}/${CETC_NAME}")
     else()
       get_filename_component(source_base "${source}" NAME)
       set(dest_path "${CETC_DESTINATION}/${source_base}")
     endif()
-    if (CETC_NAME_AS_TARGET)
+
+    if(CETC_NAME_AS_TARGET)
       get_filename_component(target ${dest_path} NAME)
     else()
-      string(REPLACE "/" "+" target "${dest_path}")
+      string(FIND "${dest_path}" "${PROJECT_BINARY_DIR}" abs_build_found)
+      if(abs_build_found EQUAL 0)
+        string(LENGTH "${PROJECT_BINARY_DIR}" abs_build_len)
+        string(SUBSTRING "${dest_path}" ${abs_build_len} -1 dest_path_target)
+        string(REPLACE "/" "+" target "${dest_path_target}")
+      else()
+        string(REPLACE "/" "+" target "${dest_path}")
     endif()
+
+    string(REGEX REPLACE "[: ]" "+" target "${target}")
+
     add_custom_command(OUTPUT "${dest_path}"
       WORKING_DIRECTORY "${CETC_WORKING_DIRECTORY}"
       COMMAND ${CMAKE_COMMAND} -E make_directory "${CETC_DESTINATION}"
@@ -72,7 +87,9 @@
       COMMENT "Copying ${source} to ${dest_path}"
       DEPENDS "${source}" ${CETC_DEPENDENCIES}
       )
-    if (CETC_PROGRAMS)
+
+    # If it's pure copy, then file should probably be executable already.
+    if(CETC_PROGRAMS)
       add_custom_command(OUTPUT "${dest_path}"
         COMMAND chmod +x "${dest_path}"
         APPEND


[ament_uncrustify] Account for zero value in line length cmake arg

A zero value will cause uncrustify to ignore line length.

--- ament_cmake_uncrustify/cmake/ament_uncrustify.cmake
+++ ament_cmake_uncrustify/cmake/ament_uncrustify.cmake
@@ -38,7 +38,7 @@

   set(result_file "${AMENT_TEST_RESULTS_DIR}/${PROJECT_NAME}/${ARG_TESTNAME}.xunit.xml")
   set(cmd "${ament_uncrustify_BIN}" "--xunit-file" "${result_file}")
-  if(ARG_MAX_LINE_LENGTH)
+  if(DEFINED ARG_MAX_LINE_LENGTH)
     list(APPEND cmd "--linelength" "${ARG_MAX_LINE_LENGTH}")
   endif()
   list(APPEND cmd ${ARG_UNPARSED_ARGUMENTS})


Explicitly set OSX flags, to match current release.

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -141,8 +141,8 @@

   # OSX flags
   IF(APPLE)
-   SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
-   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+   SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -Os -fno-common")
+   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -Os -felide-constructors -fno-common")
   ENDIF()

   # Solaris flags


STYLE: extraneous spaces removed

STYLE: extraneous spaces removed

--- CMake/ImportBoost.cmake
+++ CMake/ImportBoost.cmake
@@ -18,21 +18,22 @@
     MESSAGE(FATAL_ERROR
                   "Cannot build OTB project without boost library.  Please set Boost directories or set OTB_USE_EXTERNAL_BOOST to OFF to use the INTERNAL Boost version")
   ENDIF(Boost_FOUND)
-
+
   # Test package completeness
   TRY_COMPILE(BOOST_IS_COMPLETE
               ${CMAKE_CURRENT_BINARY_DIR}/CMake
               ${CMAKE_CURRENT_SOURCE_DIR}/CMake/otbTestCompileBoost.cxx
-              CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${Boost_INCLUDE_DIR}" "-DLINK_DIRECTORIES:PATH=${Boost_LIBRARY_DIRS}"
-			  COMPILE_DEFINITIONS "-DBOOST_SERIALIZATION_DYN_LINK"
+              CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${Boost_INCLUDE_DIR}"
+                          "-DLINK_DIRECTORIES:PATH=${Boost_LIBRARY_DIRS}"
+              COMPILE_DEFINITIONS "-DBOOST_SERIALIZATION_DYN_LINK"
               OUTPUT_VARIABLE OUTPUT)

   IF(BOOST_IS_COMPLETE)
     MESSAGE(STATUS "  Testing external Boost library    -- yes")
-
+
     # needed for automatic linking on msvc platform
     LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS} )
-
+
   ELSE(BOOST_IS_COMPLETE)
     MESSAGE(STATUS "  Testing external Boost library    -- no")
     MESSAGE(STATUS "  Forcing the OTB_USE_EXTERNAL_BOOST value to OFF")


mingw: Fixed the toolchain file when cross compiling on windows

--- .cmake/Toolchains/Toolchain-mingw-w64.cmake
+++ .cmake/Toolchains/Toolchain-mingw-w64.cmake
@@ -1,5 +1,5 @@
 # the name of the target operating system
-SET(CMAKE_SYSTEM_NAME Windows)
+set(CMAKE_SYSTEM_NAME Windows)

 if (CMAKE_SYSTEM_PROCESSOR MATCHES "^x86")
     set (CMAKE_SYSTEM_PROCESSOR i686)
@@ -10,23 +10,22 @@
 endif ()

 if (WIN32)
-    SET(CMAKE_C_COMPILER "C:/msys64/mingw${BITS}/bin/gcc.exe")
-    SET(CMAKE_CXX_COMPILER "C:/msys64/mingw${BITS}/bin/g++.exe")
-    SET(CMAKE_RC_COMPILER "C:/msys64/mingw${BITS}/bin/windres.exe")
-    SET(CMAKE_FIND_ROOT_PATH "C:/msys64/mingw${BITS}" "C:/msys64/mingw${BITS}/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32")
+    set(CMAKE_FIND_ROOT_PATH "C:/msys64/mingw${BITS}" "C:/msys64/mingw${BITS}/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32")
+    set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
+    set(ENV{PATH} "C:\\msys64\\mingw${BITS}\\bin;C:\\msys64\\mingw${BITS}\\${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32\\bin;$ENV{PATH}")
 else ()
-    # which compilers to use for C and C++
-    SET(CMAKE_C_COMPILER ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-gcc)
-    SET(CMAKE_CXX_COMPILER ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-g++)
-    SET(CMAKE_RC_COMPILER ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-windres)
+    set(CMAKE_FIND_ROOT_PATH /usr/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32)
+    set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+endif ()

-    # here is the target environment located
-    SET(CMAKE_FIND_ROOT_PATH /usr/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32)
-endif ()
+# which compilers to use for C and C++
+set(CMAKE_AR ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-gcc-ar CACHE FILEPATH "Archiver")
+set(CMAKE_C_COMPILER ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-gcc)
+set(CMAKE_CXX_COMPILER ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-g++)
+set(CMAKE_RC_COMPILER ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-windres)

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


cmake summary: show separate GUI libs section

--- cmakemodules/script_show_final_summary.cmake
+++ cmakemodules/script_show_final_summary.cmake
@@ -123,9 +123,12 @@
 SHOW_CONFIG_LINE_SYSTEM("PCL (Pointscloud library)           " CMAKE_MRPT_HAS_PCL  "[Version: ${PCL_VERSION}]")
 SHOW_CONFIG_LINE       ("SuiteSparse                         " CMAKE_MRPT_HAS_SUITESPARSE)
 SHOW_CONFIG_LINE       ("VTK                                 " CMAKE_MRPT_HAS_VTK)
-SHOW_CONFIG_LINE_SYSTEM("wxWidgets                           " CMAKE_MRPT_HAS_WXWIDGETS)
+SHOW_CONFIG_LINE_SYSTEM("yamlcpp (YAML file format)          " CMAKE_MRPT_HAS_YAMLCPP "[Version: ${LIBYAMLCPP_VERSION}]")
+MESSAGE(STATUS  "")
+
+MESSAGE(STATUS " ______________________ GUI LIBRARIES ______________________")
+SHOW_CONFIG_LINE       ("wxWidgets                           " CMAKE_MRPT_HAS_WXWIDGETS)
 SHOW_CONFIG_LINE       ("Qt5                                 " CMAKE_MRPT_HAS_Qt5)
-SHOW_CONFIG_LINE_SYSTEM("yamlcpp (YAML file format)          " CMAKE_MRPT_HAS_YAMLCPP "[Version: ${LIBYAMLCPP_VERSION}]")
 MESSAGE(STATUS  "")

 MESSAGE(STATUS " _______________________ WRAPPERS/BINDINGS ______________________")


Remove Haiku.cmake. Not sure why it was there.

--- dev-util/cmake/Haiku.cmake
+++ dev-util/cmake/Haiku.cmake
@@ -1,14 +0,0 @@
-SET(BEOS 1)
-
-# GCC is the default compiler on Haiku.
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
-
-SET(CMAKE_DL_LIBS root be)
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
-SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
-SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,")
-
-INCLUDE(Platform/UnixPaths)


Enable python3 builds

Enable python3 builds

Summary: Closes https://github.com/caffe2/caffe2/pull/1240

Differential Revision: D5879947

Pulled By: Yangqing

fbshipit-source-id: c452362b2ab54397723b5be3f1258c57213f6fc4

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -208,7 +208,7 @@

 # ---[ Python + Numpy
 if(BUILD_PYTHON)
-  set(Python_ADDITIONAL_VERSIONS 2.8 2.7 2.6)
+  set(Python_ADDITIONAL_VERSIONS 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.8 2.7 2.6)
   find_package(PythonInterp 2.7)
   find_package(PythonLibs 2.7)
   find_package(NumPy REQUIRED)


add VSX identifier

add VSX identifier

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -424,6 +424,8 @@
   ei_is_64bit_env(IS_64BIT_ENV)
   if(EIGEN_TEST_NEON)
     set(${VAR} NEON)
+  elseif(EIGEN_TEST_VSX)
+    set(${VAR} VSX)
   elseif(EIGEN_TEST_ALTIVEC)
     set(${VAR} ALVEC)
   elseif(EIGEN_TEST_FMA)


Fixed FindCasaCore.cmake to work with static libraries again.

--- cmake/FindCasaCore.cmake
+++ cmake/FindCasaCore.cmake
@@ -34,20 +34,20 @@

 set(casacore_modules
-    casa_casa
+    casa_images
+    casa_mirlib
     casa_components
     casa_coordinates
-    casa_fits
-    casa_images
     casa_lattices
-#    casa_measures_f ??!
-    casa_measures
-    casa_mirlib
     casa_msfits
     casa_ms
+    casa_fits
+    casa_measures
+    casa_tables
+    casa_scimath
     casa_scimath_f
-    casa_scimath
-    casa_tables
+    casa_casa
+    #casa_images
 )

 # Already in cache, be silent


fix(co_test): using co_test errors at configure time

--- cmake/consort/test.cmake
+++ cmake/consort/test.cmake
@@ -43,14 +43,15 @@

 	if(THIS_WORKING_DIRECTORY)
 		set( THIS_WORKING_DIRECTORY "WORKING_DIRECTORY" ${THIS_CONFIGURATIONS} )
+	endif()

 	if( CONSORT_MULTICONFIG_BUILD )
 		if(NOT THIS_CONFIGURATIONS)
 			set(THIS_CONFIGURATIONS Debug Release RelWithDebInfo MinSizeRel)
 		endif()
 		foreach( config ${THIS_CONFIGURATIONS} )
-			string( TOUPPER ${config} uconfig )
-			string( TOLOWER ${config} lconfig )
+			string( TOUPPER "${config}" uconfig )
+			string( TOLOWER "${config}" lconfig )
 			if( CONSORT_VALGRIND_TESTS AND VALGRIND AND NOT THIS_NO_VALGRIND )
 				add_test(
 					NAME run-${name}-${lconfig}
@@ -77,7 +78,6 @@
 		if( THIS_CONFIGURATIONS )
 			set( THIS_CONFIGURATIONS "CONFIGURATIONS" ${THIS_CONFIGURATIONS} )
 		endif()
-		string( TOUPPER ${CMAKE_BUILD_TYPE} uconfig )

 		if( CONSORT_VALGRIND_TESTS AND VALGRIND AND NOT THIS_NO_VALGRIND )
 			add_test(


Force reinstalling dependencies when install dir is empty

--- cmake/externalFunc.cmake
+++ cmake/externalFunc.cmake
@@ -26,9 +26,15 @@
     # Check if install prefix has changed. If yes, force installing the externals again
     if( DEFINED CACHED_INSTALL_PREFIX )
         if( NOT "${CACHED_INSTALL_PREFIX}" STREQUAL "${CMAKE_INSTALL_PREFIX}" )
-            message(STATUS "[addExternalFolder] CMAKE_INSTALL_PREFIX has changed (from ${CACHED_INSTALL_PREFIX} to ${CMAKE_INSTALL_PREFIX}), reinstalling dependency")
+            message(STATUS "[addExternalFolder] CMAKE_INSTALL_PREFIX has changed (from ${CACHED_INSTALL_PREFIX} to ${CMAKE_INSTALL_PREFIX}), reinstalling dependencies")
             set( UPDATE_EXTERNAL ON)
         endif()
+    endif()
+
+    # Check if the external ${NAME} is installed. If not, force installing the externals again
+    if( NOT EXISTS "${CMAKE_INSTALL_PREFIX}/share/Radium-${NAME}.touch" )
+        message(STATUS "[addExternalFolder] CMAKE_INSTALL_PREFIX is empty (${CMAKE_INSTALL_PREFIX}), reinstalling dependencies")
+        set( UPDATE_EXTERNAL ON)
     endif()

     if ( UPDATE_EXTERNAL )
@@ -89,4 +95,13 @@
     add_custom_target(External${NAME} ALL SOURCES ${external_sources})
     include("${CMAKE_CURRENT_BINARY_DIR}/external/cmake/package-${NAME}.cmake")

+    # Create touch file
+    file( TOUCH "${CMAKE_CURRENT_BINARY_DIR}/Radium-${NAME}.touch" )
+    install(
+      FILES
+        "${CMAKE_CURRENT_BINARY_DIR}/Radium-${NAME}.touch"
+      DESTINATION
+        share/
+    )
+
 endmacro()


SSE/SSE2 instruction sets are enabled by default when compiling in 64bit with MSVC

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

--- cmake/pcl_find_sse.cmake
+++ cmake/pcl_find_sse.cmake
@@ -127,7 +127,7 @@
           else (HAVE_SSE4_1_EXTENSIONS)
               message(STATUS "No SSE extensions found")
           endif(HAVE_SSE4_1_EXTENSIONS)
-      elseif (MSVC)
+      elseif (MSVC AND NOT CMAKE_CL_64)
           if(HAVE_SSE2_EXTENSIONS)
               SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE2")
               message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")


cmake: Tweak library link ordering

cmake: Tweak library link ordering

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -380,21 +380,19 @@
   libos
   libbotan
   libosdeps
+
+  libplatform
+  libarch
+  libos
+
+  libplatform
+  libarch
+  libos
+  libplatform
+
   cxxabi
   libc
-  libcxx
-  libm
-  libg
-  libgcc
-
   libos
-  libplatform
-  libarch
-  libplatform
-  libos
-  libosdeps
-  cxxabi
-  libc
   libcxx
   libm
   libg


ctkBlockSetCMakeOSXVariables - MacOSX 10.7, 10.6 and 10.5 are now considered

* Instead of hardcoding only one version of macosx, the macro
test if 10.7, 10.6 and then 10.5 exists.

* Waiting universal binaries are supported. It will complain
if multiple architectures are specified

* Thanks to Dr Hans J. Johnson from UCLA for its contribution

--- CMake/ctkBlockSetCMakeOSXVariables.cmake
+++ CMake/ctkBlockSetCMakeOSXVariables.cmake
@@ -28,14 +28,44 @@

 # Note: Change architecture *before* any enable_language() or project()
 #       calls so that it's set properly to detect 64-bit-ness...
-#       Currently, we default to 10.5. Obviously this may need to be re-evaluated when Lion comes out.
 #
 if(APPLE)
-  if(NOT CMAKE_OSX_DEPLOYMENT_TARGET OR "${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "")
-    set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "force build for 64-bit Leopard" FORCE)
-    set(CMAKE_OSX_DEPLOYMENT_TARGET "10.5" CACHE STRING "force build for 64-bit Leopard" FORCE)
-    set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.5.sdk" CACHE PATH "force build for 64-bit Leopard" FORCE)
+
+  # Waiting universal binaries are supported and tested, complain if
+  # multiple architectures are specified.
+  if(NOT "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
+    list(LENGTH CMAKE_OSX_ARCHITECTURES arch_count)
+    if(arch_count GREATER 1)
+      message(FATAL_ERROR "error: Only one value (i386 or x86_64) should be associated with CMAKE_OSX_ARCHITECTURES.")
+    endif()
   endif()
+
+  # See CMake/Modules/Platform/Darwin.cmake)
+  #   8.x == Mac OSX 10.4 (Tiger)
+  #   9.x == Mac OSX 10.5 (Leopard)
+  #  10.x == Mac OSX 10.6 (Snow Leopard)
+  #  10.x == Mac OSX 10.7 (Lion)
+  set(OSX_SDK_104_NAME "Tiger")
+  set(OSX_SDK_105_NAME "Leopard")
+  set(OSX_SDK_106_NAME "Snow Leopard")
+
+  set(SDK_VERSIONS_TO_CHECK 10.7 10.6 10.5)
+  foreach(SDK_VERSION ${SDK_VERSIONS_TO_CHECK})
+    if(NOT CMAKE_OSX_DEPLOYMENT_TARGET OR "${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "")
+      set(TEST_OSX_SYSROOT "/Developer/SDKs/MacOSX${SDK_VERSION}.sdk")
+      if(EXISTS "${TEST_OSX_SYSROOT}")
+        # Retrieve OSX target name
+        string(REPLACE "." "" sdk_version_no_dot ${SDK_VERSION})
+        set(OSX_NAME ${OSX_SDK_${sdk_version_no_dot}_NAME})
+        set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Force build for 64-bit ${OSX_NAME}." FORCE)
+        set(CMAKE_OSX_DEPLOYMENT_TARGET "${SDK_VERSION}" CACHE STRING "Force build for 64-bit ${OSX_NAME}." FORCE)
+        set(CMAKE_OSX_SYSROOT "${TEST_OSX_SYSROOT}" CACHE PATH "Force build for 64-bit ${OSX_NAME}." FORCE)
+        message(STATUS "Setting OSX_ARCHITECTURES to '${CMAKE_OSX_ARCHITECTURES}' as none was specified.")
+        message(STATUS "Setting OSX_DEPLOYMENT_TARGET to '${SDK_VERSION}' as none was specified.")
+        message(STATUS "Setting OSX_SYSROOT to '${TEST_OSX_SYSROOT}' as none was specified.")
+      endif()
+    endif()
+  endforeach()

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


Update Custom-vs.cmake

Update Custom-vs.cmake

fix typoes

--- msvc/Custom-vs.cmake
+++ msvc/Custom-vs.cmake
@@ -2,8 +2,8 @@
 # GLOBAL

 # Csound build options for MSVC
-set(BUILD_BUCHLA_OPCODES ON
-set(BUILD_CSBEATS ON
+set(BUILD_BUCHLA_OPCODES ON)
+set(BUILD_CSBEATS ON)
 set(BUILD_CUDA_OPCODES OFF)
 set(BUILD_CXX_INTERFACE ON)
 set(BUILD_DSSI_OPCODES OFF)


add shared library support to add_fbthrift_cpp_library

Summary:
`add_fbthrift_cpp_library` should honor `BUILD_SHARED_LIBS`, and call
`add_library` with the right setting (`SHARED` if enabled, `STATIC` otherwise)

Reviewed By: yns88

Differential Revision: D24911124

fbshipit-source-id: 79df7640a758a592a3df3e9e79bb129dd57f2d47

--- build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
@@ -127,8 +127,14 @@
   )

   # Now emit the library rule to compile the sources
+  if (BUILD_SHARED_LIBS)
+    set(LIB_TYPE SHARED)
+  else ()
+    set(LIB_TYPE STATIC)
+  endif ()
+
   add_library(
-    "${LIB_NAME}" STATIC
+    "${LIB_NAME}" ${LIB_TYPE}
     ${generated_sources}
   )


DOC: fix contact information and mention known issues

--- Modules/Remote/SertitObject.remote.cmake
+++ Modules/Remote/SertitObject.remote.cmake
@@ -1,7 +1,10 @@
-#Contact: Rémi Cresson <remi.cresson@teledetection.fr>
+#Contact: arnaud.durand@sertit.u-strasbg.fr
+
+#SERTIT - University of Strasbourg http://sertit.u-strasbg.fr
+#Known issue with MSVC - https://github.com/sertit/SertitObject/issues/2
 otb_fetch_module(SertitObject
   "This module provides 2 applications dedicated to object-oriented image analysis.
-
+
    Aggregate application:

 The aim of this application is to merge the result of a segmentation with a
@@ -11,7 +14,7 @@
 containing objects and the corresponding class in the attribute table. Connected
 regions belonging to the same class are merged. This application could be used
 at the last step of the LSMS pipeline in replacement of the application
-LSMSVectorization.
+LSMSVectorization.

    ObjectsRadiometricStatistics application:


cmake: strip -D prefix from COMPILE_DEFINITIONS property values

--- tools/cmake/build.cmake
+++ tools/cmake/build.cmake
@@ -29,6 +29,9 @@
 #                     property instead of replacing it
 function(idf_build_set_property property value)
     cmake_parse_arguments(_ "APPEND" "" "" ${ARGN})
+
+    # Fixup property value, e.g. for compatibility. (Overwrites variable 'value'.)
+    __build_fixup_property("${property}" "${value}" value)

     if(__APPEND)
         set_property(TARGET __idf_build_target APPEND PROPERTY ${property} ${value})
@@ -162,6 +165,21 @@

     idf_build_set_property(C_COMPILE_OPTIONS "-std=${c_std}" APPEND)
     idf_build_set_property(CXX_COMPILE_OPTIONS "-std=${cxx_std}" APPEND)
+endfunction()
+
+#
+# Perform any fixes or adjustments to the values stored in IDF build properties.
+# This function only gets called from 'idf_build_set_property' and doesn't affect
+# the properties set directly via 'set_property'.
+#
+function(__build_fixup_property property value out_var)
+
+    # Fixup COMPILE_DEFINITIONS property to support -D prefix, which had to be used in IDF v4.x projects.
+    if(property STREQUAL "COMPILE_DEFINITIONS" AND NOT "${value}" STREQUAL "")
+        string(REGEX REPLACE "^-D" "" stripped_value "${value}")
+        set("${out_var}" "${stripped_value}" PARENT_SCOPE)
+    endif()
+
 endfunction()

 #


ENH: Use GenerateCLP with hidden variable warnings fixed.

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -91,7 +91,7 @@
 # Slicer Execution Model
 set( SlicerExecutionModel_URL
   ${github_protocol}://github.com/Slicer/SlicerExecutionModel.git )
-set( SlicerExecutionModel_HASH_OR_TAG 983d2112ec431af20cafa49ca6cf7bd1a777869a )
+set( SlicerExecutionModel_HASH_OR_TAG 62d0121dbb0fb057ebbd7c9ab84520accacec8bc )

 # Visualization Toolkit (3D Slicer fork)
 set( VTK_URL ${github_protocol}://github.com/Slicer/VTK.git )


ENH: Update external project verions used by Superbuild to match Slicer

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -25,14 +25,14 @@
 set( FLTK_URL_MD5_TAG f8b2e249701cf77520546e3c37130f0b )

 # Insight Segmentation and Registration Toolkit
-set( ITK_URL ${github_protocol}://github.com/Kitware/ITK.git )
-set( ITK_URL_OR_TAG 9fb84edbf9f6a5bb0846acbf6ecd767ca5cab2e1 )
+set( ITK_URL ${github_protocol}://github.com/Slicer/ITK.git )
+set( ITK_URL_OR_TAG 3307a27de52d921ab40573e77097bfc72d70f5d6 )

 set( CTK_URL https://github.com/commontk/CTK.git )
-set( CTK_URL_MD5_TAG 0e21d85e7b9187c36c66d5934041323eff0685c2 )
+set( CTK_URL_MD5_TAG 282abc745a7db700a822822375d0b8c170ec1a56 )

 set( VTK_URL https://github.com/Slicer/VTK.git )
-set( VTK_URL_MD5_TAG 6da2c7235b8de9d8663a62f3246198d6865ecfae )
+set( VTK_URL_MD5_TAG d8540e7ee356bbc025cb9917a41b7c7fa0548d4b )

 # JsonCpp snapshot 2014-04-15 r276
 set( JsonCpp_URL http://midas3.kitware.com/midas/download/bitstream/366544/JsonCpp_r276.tar.gz )
@@ -41,9 +41,9 @@
 # TubeTK Parameter Serializer snapshot 2014-02-05 )
 set( ParameterSerializer_URL
   https://github.com/Slicer/ParameterSerializer.git )
-set( ParameterSerializer_HASH_OR_TAG df985d8f7e7751a10852ca53b2b38c0fa1620a99 )
+set( ParameterSerializer_HASH_OR_TAG d7e94d3ff9de9a8782db6997f8e1bc45626cfa3b )

 # Slicer Execution Model snapshot 2014-02-18
 set( SlicerExecutionModel_URL
   ${github_protocol}://github.com/Slicer/SlicerExecutionModel.git )
-set( SlicerExecutionModel_HASH_OR_TAG 865e2a771a47c2a3daa3bd8b9a6fc6bac7537255 )
+set( SlicerExecutionModel_HASH_OR_TAG ecb58ad73c5dcdebf8c4d46257c7e44a07a7cdd4 )


BUG: Do not override user selection settings

The old code silently changed a user controlled setting.
It is better to give an error and request that the user
manually make the required changes.

Change-Id: I1517f788e3925cf8b7b208b7b7da6213d4485e77

--- Modules/Video/BridgeVXL/itk-module-init.cmake
+++ Modules/Video/BridgeVXL/itk-module-init.cmake
@@ -1,7 +1,9 @@
-find_package ( VXL REQUIRED )
+if(NOT ITK_USE_SYSTEM_VXL)
+  message( FATAL_ERROR "System installed VXL is required for ITKVideoBridgeVXL.")
+endif()
+find_package(VXL 2.0.0 REQUIRED)

 if (VXL_FOUND)
-  set(ITK_USE_SYSTEM_VXL ON CACHE BOOL "System installed VXL is required for ITKVideoBridgeVXL." FORCE)
   include( ${VXL_CMAKE_DIR}/UseVXL.cmake )
   message("ITK_USE_SYSTEM_VXL is ON; Use an outside build of VXL. ")
 endif()


Reverted back to use native copy command.

--- Source/cmake/Modules/Urho3D-CMake-magic.cmake
+++ Source/cmake/Modules/Urho3D-CMake-magic.cmake
@@ -280,7 +280,7 @@
         if (MSVC)
             file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${TARGET_NAME}.dir)
             add_custom_command (TARGET ${TARGET_NAME} PRE_LINK
-                COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different \"$(ProjectDir)$(IntDir)*.obj\" \"$(ProjectDir)CMakeFiles\\${TARGET_NAME}.dir\"
+                COMMAND copy /B \"$(ProjectDir)$(IntDir)*.obj\" \"$(ProjectDir)CMakeFiles\\${TARGET_NAME}.dir\"
                 COMMENT "Copying object files to a common location also used by Makefile generator")
         endif ()
     endif ()


Upgrade sugar_target_link_libraries

Upgrade sugar_target_link_libraries

Add support for debug/optimized libraries.

--- cmake/core/sugar_target_link_libraries.cmake
+++ cmake/core/sugar_target_link_libraries.cmake
@@ -5,6 +5,7 @@
 sugar_add_this_to_sourcelist()

 include(sugar_improper_number_of_arguments)
+include(sugar_status_debug)
 include(sugar_test_target_exists)
 include(sugar_test_variable_not_empty)

@@ -16,20 +17,82 @@
   list(REMOVE_AT libraries 0) # remove `target`
   sugar_test_target_exists(${target})

-  foreach(x ${libraries})
-    if(TARGET ${x})
-      get_target_property(sugar_ios ${x} SUGAR_IOS)
-      if(sugar_ios)
-        get_target_property(path_debug ${x} SUGAR_IOS_PATH_DEBUG)
-        get_target_property(path_release ${x} SUGAR_IOS_PATH_RELEASE)
-        target_link_libraries(${target} debug ${path_debug})
-        target_link_libraries(${target} optimized ${path_release})
-        add_dependencies(${target} ${x})
-      else()
-        target_link_libraries(${target} ${x})
-      endif()
-    else()
-      target_link_libraries(${target} ${x})
+  sugar_status_debug("link libraries: ${libraries}")
+  sugar_status_debug("to target: ${target}")
+
+  get_target_property(sugar_ios ${target} SUGAR_IOS)
+  if(sugar_ios)
+    get_target_property(real_target ${target} SUGAR_IOS_BASE_TARGET)
+    if(NOT real_target)
+      # optimized variant
+      set(real_target ${target})
     endif()
-  endforeach()
+  else()
+    set(real_target ${target})
+  endif()
+
+  list(GET libraries 0 x)
+  list(REMOVE_AT libraries 0)
+  string(COMPARE EQUAL "${x}" "debug" lib_debug)
+  string(COMPARE EQUAL "${x}" "optimized" lib_optimized)
+
+  if(lib_debug)
+    list(GET libraries 0 x)
+    list(REMOVE_AT libraries 0)
+    target_link_libraries(${real_target} debug "${x}")
+    if(libraries)
+      sugar_target_link_libraries(${real_target} ${libraries})
+    endif()
+    return()
+  endif()
+
+  if(lib_optimized)
+    list(GET libraries 0 x)
+    list(REMOVE_AT libraries 0)
+    target_link_libraries(${real_target} optimized "${x}")
+    if(libraries)
+      sugar_target_link_libraries(${real_target} ${libraries})
+    endif()
+    return()
+  endif()
+
+  # `x` is a library
+  if(NOT TARGET ${x})
+    target_link_libraries(${real_target} ${x})
+    if(libraries)
+      sugar_target_link_libraries(${real_target} ${libraries})
+    endif()
+    return()
+  endif()
+
+  # `x` is a target
+  get_target_property(sugar_ios ${x} SUGAR_IOS)
+  if(sugar_ios)
+    get_target_property(base_target ${x} SUGAR_IOS_BASE_TARGET)
+    if(NOT base_target)
+      # optimized variant
+      set(base_target ${x})
+    endif()
+    get_target_property(link_dep_libs ${base_target} LINK_LIBRARIES)
+    if(NOT link_dep_libs)
+      unset(link_dep_libs) # remove NOTFOUND if empty
+    endif()
+    add_dependencies(${target} ${x})
+    get_target_property(path_debug ${x} SUGAR_IOS_PATH_DEBUG)
+    get_target_property(path_release ${x} SUGAR_IOS_PATH_RELEASE)
+    set(
+        real_link
+        debug
+        ${path_debug}
+        optimized
+        ${path_release}
+        ${link_dep_libs}
+    )
+  else()
+    set(real_link ${x})
+  endif()
+  target_link_libraries(${real_target} ${real_link})
+  if(libraries)
+    sugar_target_link_libraries(${real_target} ${libraries})
+  endif()
 endfunction()


i#893 safeseh: follow-up to remove 64-bit warnings

Removes /safeseh from ml64 as we get a warning for 64-bit where the flag is
not supported.

Review-URL: https://codereview.appspot.com/263080043

--- make/cpp2asm_support.cmake
+++ make/cpp2asm_support.cmake
@@ -235,8 +235,9 @@
     set(ASM_DBG "")
   endif ()
   set(ASM_FLAGS "/nologo ${ASM_DBG}")
-  if (${vsgen_ver} VERSION_GREATER 11)
+  if (${vsgen_ver} VERSION_GREATER 10 AND NOT X64)
     # i#893: VS2012 adds default /safeseh for C files and we must match for asm
+    # (needed for 32-bit only, and in fact /safeseh flag is not supported by ml64).
     set(ASM_FLAGS "${ASM_FLAGS} /safeseh")
   endif ()
 endif ()


Require HarfBuzz in FindMagnum.cmake only if it was compiled with it.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -90,6 +90,10 @@
 if(NOT _TARGET_DESKTOP_GLES EQUAL -1)
     set(MAGNUM_TARGET_DESKTOP_GLES 1)
 endif()
+string(FIND "${_magnumConfigure}" "#define MAGNUM_USE_HARFBUZZ" _USE_HARFBUZZ)
+if(NOT _USE_HARFBUZZ EQUAL -1)
+    set(MAGNUM_USE_HARFBUZZ 1)
+endif()

 if(NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES)
     find_package(OpenGL REQUIRED)
@@ -212,9 +216,14 @@

         # Dependencies
         find_package(FreeType)
-        find_package(HarfBuzz)
-        if(NOT FREETYPE_FOUND OR NOT HARFBUZZ_FOUND)
+        if(NOT FREETYPE_FOUND)
             unset(MAGNUM_${_COMPONENT}_LIBRARY)
+        endif()
+        if(MAGNUM_USE_HARFBUZZ)
+            find_package(HarfBuzz)
+            if(NOT HARFBUZZ_FOUND)
+                unset(MAGNUM_${_COMPONENT}_LIBRARY)
+            endif()
         endif()
     endif()


minor cmake txt summary corrections

minor cmake txt summary corrections

--- cmakemodules/script_show_final_summary.cmake
+++ cmakemodules/script_show_final_summary.cmake
@@ -65,7 +65,6 @@
 MESSAGE(STATUS "")
 MESSAGE(STATUS " __________________________ OPTIONS _____________________________")
 SHOW_CONFIG_LINE("Build MRPT as a shared library?  " CMAKE_MRPT_BUILD_SHARED_LIB_ONOFF)
-SHOW_CONFIG_LINE("Use SSE?                         " CMAKE_MRPT_HAS_SSE)
 SHOW_CONFIG_LINE("Use SSE2?                        " CMAKE_MRPT_HAS_SSE2)
 SHOW_CONFIG_LINE("Use SSE3/SSSE3?                  " CMAKE_MRPT_HAS_SSE3)
 IF($ENV{VERBOSE})
@@ -91,7 +90,6 @@
 MESSAGE(STATUS  " ____________________ WILL USE THESE LIBRARIES __________________")

 SHOW_CONFIG_LINE_SYSTEM("Has eigen3                              " CMAKE_MRPT_HAS_EIGEN "[Version: ${PKG_EIGEN3_VERSION}]")
-SHOW_CONFIG_LINE_SYSTEM("Has FabMap (optional for HMT-SLAM)      " CMAKE_MRPT_HAS_FABMAP )
 SHOW_CONFIG_LINE_SYSTEM("Has ffmpeg libs (Video streaming)       " CMAKE_MRPT_HAS_FFMPEG "[avcodec ${LIBAVCODEC_VERSION}, avutil ${LIBAVUTIL_VERSION}, avformat ${LIBAVFORMAT_VERSION}]")
 SHOW_CONFIG_LINE_SYSTEM("Has gtest (Google unit testing library) " CMAKE_MRPT_HAS_GTEST )
 #SHOW_CONFIG_LINE("Has Intel threading lib (TBB)           " CMAKE_MRPT_HAS_TBB)


print whole filename

print whole filename

--- util/cmake/common.cmake
+++ util/cmake/common.cmake
@@ -45,12 +45,13 @@
 macro(PASCADD_EXECUTABLE filename outname)
 	# choose compiler subject to file extension
 	get_filename_component(FILE_EXT ${filename} EXT)
-	message(STATUS "${Yellow}adding executable file with extension ${Green}${FILE_EXT}${ColourReset}")

 	#remove leading whitespaces
 #	string(STRIP ${LIBRARIES_DEF} LIBRARIES_DEF)

 	if(${FILE_EXT} MATCHES ".cu")
+		message(STATUS "${Yellow}adding ${Green}${filename}${Yellow} (CUDA)${ColourReset}")
+
 		# --- compile with CUDA ---
 		if(NOT ${USE_CUDA})
 			message(FATAL_ERROR "${Red}Cannot compile .cu file without USE_CUDA=ON!${ColourReset}")
@@ -72,6 +73,8 @@
 	endif()

 	if(${FILE_EXT} MATCHES ".cpp")
+		message(STATUS "${Yellow}adding ${Green}${filename}${Yellow} (C++)${ColourReset}")
+
 		# compile with g++

 		# add executable file


Graph Control 5.0.0-1 Gold

Graph Control 5.0.0-1 Gold

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

--- version.cmake
+++ version.cmake
@@ -5,8 +5,8 @@
 set ( HPCC_MAJOR 5 )
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 8 )
+set ( HPCC_MATURITY "release" )
+set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Split off 7.12.x

Split off 7.12.x

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

--- version.cmake
+++ version.cmake
@@ -4,7 +4,7 @@
 set ( HPCC_NAME "Nagios Monitoring" )
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
-set ( HPCC_MINOR 11 )
+set ( HPCC_MINOR 13 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "trunk" )
 set ( HPCC_SEQUENCE 0 )


Split off 7.12.12

Split off 7.12.12

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 12 )
-set ( HPCC_POINT 11 )
+set ( HPCC_POINT 13 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.0.x

Split off 8.0.x

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

--- version.cmake
+++ version.cmake
@@ -3,8 +3,8 @@
 ###
 set ( HPCC_NAME "Nagios Monitoring" )
 set ( HPCC_PROJECT "nagios-monitoring" )
-set ( HPCC_MAJOR 7 )
-set ( HPCC_MINOR 13 )
+set ( HPCC_MAJOR 8 )
+set ( HPCC_MINOR 1 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "trunk" )
 set ( HPCC_SEQUENCE 0 )


update

update

--- modules/zlib.cmake
+++ modules/zlib.cmake
@@ -20,7 +20,6 @@

   # Includes
   include_directories("zlib")
-  include_directories("build/modules/zlib")

   # Add module subdirectory
   add_subdirectory("zlib")


Fixed incorrect ordering of git-command and reading of it's values.

--- src/cmake/git-download.cmake
+++ src/cmake/git-download.cmake
@@ -29,8 +29,14 @@
     set(multiValueArgs "")
     cmake_parse_arguments(args "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

+    # Determine if there are local changes, then we need to stash save & pop
+    execute_git(
+        COMMAND diff --shortstat
+        OUTPUT_VARIABLE GIT_HAVE_CHANGES
+    )
+
     if(GIT_HAVE_CHANGES)
-        message(AUTHOR_WARNING "Local changes detected! \n\tGit subtree requires a clean directory; please commit changes before running this.\n\tSkipping download.")
+        message(AUTHOR_WARNING "Local changes detected, skipping download.\n\tGit subtree requires a clean directory; please commit changes before running this.")
         return()
     endif()

@@ -49,12 +55,6 @@
     # Make clone-dir path relative to git-root
     string(REPLACE ${GIT_ROOT}/ "" RELATIVE_CLONE_DIR ${args_CLONE_DIR})

-    # Determine if there are local changes, then we need to stash save & pop
-    execute_git(
-        COMMAND diff --shortstat
-        OUTPUT_VARIABLE GIT_HAVE_CHANGES
-    )
-
     message("Cloning branch ${args_TAG} from ${args_URL} into relative directory ${RELATIVE_CLONE_DIR}:")
     set(MERGE_MESSAGE "Merged branch ${args_TAG} in repository ${args_URL}.")
     if(NOT EXISTS ${args_CLONE_DIR})


Fix list_extract function

Fix list_extract function

--- cmake/Custom.cmake
+++ cmake/Custom.cmake
@@ -33,4 +33,6 @@
         endif()
     endforeach()

+    set(${OUTPUT} ${${OUTPUT}} PARENT_SCOPE)
+
 endfunction (list_extract)


Fix stray character

Fix stray character

--- cmake/lapack.cmake
+++ cmake/lapack.cmake
@@ -638,7 +638,7 @@
    cgecon.c cgeequ.c cgees.c  cgeesx.c cgeev.c  cgeevx.c
    cgehd2.c cgehrd.c cgelq2.c cgelqf.c
    cgels.c  cgelsd.c cgelss.c cgelsy.c cgeql2.c cgeqlf.c cgeqp3.c
-   cgeqr2.c cgeqr2p.c cgeqrf.c fcgeqrfp.c cgerfs.c cgerq2.c cgerqf.c
+   cgeqr2.c cgeqr2p.c cgeqrf.c cgeqrfp.c cgerfs.c cgerq2.c cgerqf.c
    cgesc2.c cgesdd.c cgesvd.c cgesvdx.c
    cgesvj.c cgejsv.c cgsvj0.c cgsvj1.c
    cgesvx.c cgetc2.c cgetrf2.c


Support for cross-compilation in luajit.cmake

--- cmake/luajit.cmake
+++ cmake/luajit.cmake
@@ -130,7 +130,7 @@

 macro(luajit_build)
     set (luajit_buildoptions BUILDMODE=static)
-    set (luajit_copt ${CMAKE_C_FLAGS})
+    set (luajit_copt "")
     if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
         set (luajit_buildoptions ${luajit_buildoptions} CCDEBUG=${CC_DEBUG_OPT})
         set (luajit_copt ${luajit_copt} -O1)
@@ -139,20 +139,33 @@
         set (luajit_copt ${luajit_copt} -O2)
     endif()
     set (luajit_copt ${luajit_copt} -I${PROJECT_SOURCE_DIR}/libobjc)
-    set (luajit_cc ${CMAKE_C_COMPILER})
-    if (NOT luajit_cc)
-        message (FATAL_ERROR "LuaJIT will not compile with default C compiler (cc)")
+    set (luajit_target_cc "${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS}")
+    if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
+        # Regular mode - use CMake compiler for building host utils.
+        set (luajit_host_cc ${CMAKE_C_COMPILER})
+    else()
+        # Crosscompile mode - use a host CC compiler for building host utils.
+        # Since CMake does not support cross compilation properly
+        # we have to use system CC here.
+        set (luajit_host_cc "cc")
+    endif()
+    if (${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64" AND
+            ${CMAKE_SIZEOF_VOID_P} EQUAL 4)
+        # The host compiler must have same pointer size as the target compiler.
+        set (luajit_host_cc "${luajit_host_cc} -m32")
     endif()
     set(luajit_ldflags "${CMAKE_SHARED_LINKER_FLAGS}")
     separate_arguments(luajit_copt)
     separate_arguments(luajit_ldflags)
-    set (luajit_buildoptions ${luajit_buildoptions} CC="${luajit_cc}" TARGET_CC="${luajit_cc}" CCOPT="${luajit_copt}")
+    separate_arguments(luajit_host_cc)
+    separate_arguments(luajit_target_cc)
+    set (luajit_buildoptions ${luajit_buildoptions} HOST_CC="${luajit_host_cc}" TARGET_CC="${luajit_target_cc}" CCOPT="${luajit_copt}")
     set (luajit_buildoptions ${luajit_buildoptions} Q='' LDFLAGS="${luajit_ldflags}")
     if (${PROJECT_BINARY_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
         add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/third_party/luajit/src/libluajit.a
             WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/third_party/luajit
             COMMAND $(MAKE) clean
-            COMMAND $(MAKE) -C src ${luajit_buildoptions}
+            COMMAND $(MAKE) -C src ${luajit_buildoptions} libluajit.a
             DEPENDS ${CMAKE_SOURCE_DIR}/CMakeCache.txt
         )
     else()
@@ -163,7 +176,7 @@
             WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/third_party/luajit
             COMMAND cp -r ${PROJECT_SOURCE_DIR}/third_party/luajit/* .
             COMMAND $(MAKE) clean
-            COMMAND $(MAKE) -C src ${luajit_buildoptions}
+            COMMAND $(MAKE) -C src ${luajit_buildoptions} libluajit.a
             DEPENDS ${PROJECT_BINARY_DIR}/CMakeCache.txt ${PROJECT_BINARY_DIR}/third_party/luajit
         )
     endif()


cmake(python): Fixup

cmake(python): Fixup

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -134,8 +134,8 @@
   COMMAND ${CMAKE_COMMAND} -E remove_directory dist
   COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_NAME}/.libs
   # Don't need to copy static lib on windows.
-  COMMAND ${CMAKE_COMMAND} -E $<IF:${UNIX},copy,true>
-  $<${UNIX}:$<TARGET_SONAME_FILE:ortools>> ${PROJECT_NAME}/.libs
+  COMMAND ${CMAKE_COMMAND} -E $<IF:$<BOOL:${UNIX}>,copy,true>
+  $<$<BOOL:${UNIX}>:$<TARGET_SONAME_FILE:ortools>> ${PROJECT_NAME}/.libs
   COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:pywrapknapsack_solver> ${PROJECT_NAME}/algorithms
   COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:pywrapgraph> ${PROJECT_NAME}/graph
   COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:pywrapcp> ${PROJECT_NAME}/constraint_solver


remove the -mfma flag in when the host has AVX.

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -174,7 +174,7 @@
   endif()
   if (DEFINED HAVE_AVX)
 	if (NOT NO_AVX)
-    set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx -mfma")
+    set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx")
 	endif()
   endif()
   if (DEFINED HAVE_AVX2)


Update jpeg dependency to use bazel mirror in cmake build.

PiperOrigin-RevId: 170572688

--- tensorflow/contrib/cmake/external/jpeg.cmake
+++ tensorflow/contrib/cmake/external/jpeg.cmake
@@ -15,7 +15,7 @@
 include (ExternalProject)

 set(jpeg_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/external/jpeg_archive)
-set(jpeg_URL http://www.ijg.org/files/jpegsrc.v9a.tar.gz)
+set(jpeg_URL http://mirror.bazel.build/www.ijg.org/files/jpegsrc.v9a.tar.gz)
 set(jpeg_HASH SHA256=3a753ea48d917945dd54a2d97de388aa06ca2eb1066cbfdc6652036349fe05a7)
 set(jpeg_BUILD ${CMAKE_CURRENT_BINARY_DIR}/jpeg/src/jpeg)
 set(jpeg_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/jpeg/install)


wasisdk.toolchain.cmake bug fixes

wasisdk.toolchain.cmake bug fixes

--- cmake-toolchains/wasisdk.toolchain.cmake
+++ cmake-toolchains/wasisdk.toolchain.cmake
@@ -32,7 +32,7 @@
     set(WASISDK_CXX_FLAGS "${WASISDK_CXX_FLAGS} -fno-rtti")
 endif()

-set(WASI_OPT "-O3")
+set(WASISDK_OPT "-O3")

 set(CMAKE_SYSTEM_NAME Generic)
 set(CMAKE_SYSTEM_VERSION 1)
@@ -48,7 +48,7 @@
 # specify cross-compilers
 set(CMAKE_C_COMPILER "${WASISDK_ROOT}/bin/clang" CACHE PATH "gcc" FORCE)
 set(CMAKE_CXX_COMPILER "${WASISDK_ROOT}/bin/clang++" CACHE PATH "g++" FORCE)
-set(CMAKE_AR "${WASISDK_ROOT}/bin/ar$" CACHE PATH "archive" FORCE)
+set(CMAKE_AR "${WASISDK_ROOT}/bin/ar" CACHE PATH "archive" FORCE)
 set(CMAKE_LINKER "${WASISDK_ROOT}/bin/clang" CACHE PATH "linker" FORCE)
 set(CMAKE_RANLIB "${WASISDK_ROOT}/bin/ranlib" CACHE PATH "ranlib" FORCE)

@@ -95,31 +95,31 @@
 set(CMAKE_DL_LIBS)

 # c++ compiler flags
-set(CMAKE_CXX_FLAGS "${WASI_COMMON_FLAGS} ${WASI_CXX_FLAGS} -fstrict-aliasing -Wall -Wno-multichar -Wextra -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-inconsistent-missing-override -Wno-expansion-to-defined")
-set(CMAKE_CXX_FLAGS_RELEASE "${WASI_COMMON_FLAGS_RELEASE} ${WASI_OPT} -DNDEBUG")
+set(CMAKE_CXX_FLAGS "${WASISDK_COMMON_FLAGS} ${WASISDK_CXX_FLAGS} -fstrict-aliasing -Wall -Wno-multichar -Wextra -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-inconsistent-missing-override -Wno-expansion-to-defined")
+set(CMAKE_CXX_FLAGS_RELEASE "${WASISDK_COMMON_FLAGS_RELEASE} ${WASISDK_OPT} -DNDEBUG")
 set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1")
-set(CMAKE_CXX_FLAGS_PROFILING "${WASI_OPT} -DNDEBUG --profiling")
+set(CMAKE_CXX_FLAGS_PROFILING "${WASISDK_OPT} -DNDEBUG --profiling")

 # c compiler flags
-set(CMAKE_C_FLAGS "${WASI_COMMON_FLAGS} -fstrict-aliasing -Wall -Wextra -Wno-multichar -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-expansion-to-defined")
-set(CMAKE_C_FLAGS_RELEASE "${WASI_OPT} ${WASI_COMMON_FLAGS_RELEASE} -DNDEBUG")
+set(CMAKE_C_FLAGS "${WASISDK_COMMON_FLAGS} -fstrict-aliasing -Wall -Wextra -Wno-multichar -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-expansion-to-defined")
+set(CMAKE_C_FLAGS_RELEASE "${WASISDK_OPT} ${WASISDK_COMMON_FLAGS_RELEASE} -DNDEBUG")
 set(CMAKE_C_FLAGS_DEBUG "-O0 -g -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1")
-set(CMAKE_C_FLAGS_PROFILING "${WASI_OPT} -DNDEBUG --profiling")
+set(CMAKE_C_FLAGS_PROFILING "${WASISDK_OPT} -DNDEBUG --profiling")

 # linker flags
-set(CMAKE_EXE_LINKER_FLAGS "${WASI_COMMON_FLAGS} ${WASI_LINKER_FLAGS} ${WASI_EXE_LINKER_FLAGS}")
-set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${WASI_OPT} ${WASI_COMMON_FLAGS_RELEASE} ${WASI_LINKER_FLAGS_RELEASE}")
+set(CMAKE_EXE_LINKER_FLAGS "${WASISDK_COMMON_FLAGS} ${WASISDK_LINKER_FLAGS} ${WASISDK_EXE_LINKER_FLAGS}")
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${WASISDK_OPT} ${WASISDK_COMMON_FLAGS_RELEASE} ${WASISDK_LINKER_FLAGS_RELEASE}")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-O0 -g")
-set(CMAKE_EXE_LINKER_FLAGS_PROFILING "--profiling ${WASI_OPT} ${WASI_LINKER_FLAGS_RELEASE}")
+set(CMAKE_EXE_LINKER_FLAGS_PROFILING "--profiling ${WASISDK_OPT} ${WASISDK_LINKER_FLAGS_RELEASE}")

 # static library flags (for CMAKE_AR)
-set(CMAKE_STATIC_LINKER_FLAGS "${WASI_AR_FLAGS}")
+set(CMAKE_STATIC_LINKER_FLAGS "${WASISDK_AR_FLAGS}")

 # dynamic lib linker flags
-set(CMAKE_SHARED_LINKER_FLAGS "-shared ${WASI_COMMON_FLAGS} ${WASI_LINKER_FLAGS}")
-set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${WASI_OPT} ${WASI_COMMON_FLAGS_RELEASE} ${WASI_LINKER_FLAGS_RELEASE}")
-set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${WASI_OPT} -g")
-set(CMAKE_SHARED_LINKER_FLAGS_PROFILING "--profiling ${WASI_OPT} ${WASI_LINKER_FLAGS_RELEASE}")
+set(CMAKE_SHARED_LINKER_FLAGS "-shared ${WASISDK_COMMON_FLAGS} ${WASISDK_LINKER_FLAGS}")
+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${WASISDK_OPT} ${WASISDK_COMMON_FLAGS_RELEASE} ${WASISDK_LINKER_FLAGS_RELEASE}")
+set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${WASISDK_OPT} -g")
+set(CMAKE_SHARED_LINKER_FLAGS_PROFILING "--profiling ${WASISDK_OPT} ${WASISDK_LINKER_FLAGS_RELEASE}")

 # update cache variables for cmake gui
 set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Config Type" FORCE)


Fix hierarchy indentation.

Fix hierarchy indentation.

--- CPM.cmake
+++ CPM.cmake
@@ -736,13 +736,13 @@
 function(_cpm_print_with_hierarchy_level msg)
   # while ${number} is between 0 and 11
   if (DEFINED CPM_HIERARCHY_LEVEL)
-    set(number 0)
+    set(number 1)
     set(spacing "  ")
     while( number GREATER 0 AND number LESS ${CPM_HIERARCHY_LEVEL} )
       set(spacing "${spacing}  ")
-      math( EXPR number "${number} - 1" ) # decrement number
+      math( EXPR number "${number} + 1" ) # decrement number
     endwhile()
-    message("${spacing}| ${msg}")
+    message("${spacing}| ${CPM_HIERARCHY_LEVEL} - ${msg}")
   else()
     message(msg)
   endif()


updates to test.cmake

updates to test.cmake

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -23,6 +23,10 @@
 MACRO(update_test_models)
   IF(NOT EXISTS "${TEST_MODELS_DIRECTORY}")
     MESSAGE("cloning test models ...")
+    EXECUTE_PROCESS(
+      COMMAND "ssh "git@git.sdvis.org"
+      WORKING_DIRECTORY $ENV{HOME}
+    )
     EXECUTE_PROCESS(
       COMMAND ${CTEST_GIT_COMMAND} "clone" "git@git.sdvis.org:embree-models.git" embree-models
       WORKING_DIRECTORY $ENV{HOME}


CI: add Mosaic and Sertit object to CI

CI: add Mosaic and Sertit object to CI

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -133,7 +133,7 @@
 include ( "${CMAKE_CURRENT_LIST_DIR}/configure_options.cmake" )

 # For superbuild we need remote module
-foreach(remote_module DiapOTBModule OTBTemporalGapFilling)#otbGRM #Mosaic # #SertitObject
+foreach(remote_module DiapOTBModule OTBTemporalGapFilling Mosaic SertitObject)#otbGRM #Mosaic # #SertitObject
     set ( CONFIGURE_OPTIONS
       "${CONFIGURE_OPTIONS}-DModule_${remote_module}:BOOL=ON;")
 endforeach()


Update superbuild to GDCM 2.4.1

Update superbuild to GDCM 2.4.1

--- CMakeExternals/GDCM.cmake
+++ CMakeExternals/GDCM.cmake
@@ -31,8 +31,8 @@
      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src
      BINARY_DIR ${proj}-build
      PREFIX ${proj}-cmake
-     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/gdcm-2.2.1.tar.gz
-     URL_MD5 67c6808a6f62796954f4131e24aaab2c
+     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/gdcm-2.4.1.tar.bz2
+     URL_MD5 1120f9a5ebcef7df6933ca83545f514d
      INSTALL_COMMAND ""
      PATCH_COMMAND ${GDCM_PATCH_COMMAND}
      CMAKE_GENERATOR ${gen}


CMake: Error out on Cygwin platforms and derivatives (MinGW, MinGW-64)

Let's face it - we do not support those ports of the GNU Compiler
Collection. We have had multiple severe, unresolved miscompilation issues
for years.

--- cmake/checks/check_02_system_features.cmake
+++ cmake/checks/check_02_system_features.cmake
@@ -105,6 +105,18 @@
 #                                                                      #
 ########################################################################

+#
+# Put an end to user's suffering from cygwin's defects
+#
+IF( CMAKE_SYSTEM_NAME MATCHES "CYGWIN" OR
+    CMAKE_SYSTEM_NAME MATCHES "Windows" )
+  IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+    MESSAGE(FATAL_ERROR
+      "\nCygwin and forks such as MinGW and MinGW-64 are unsupported due to "
+      "multiple unresolved miscompilation issues.\n\n"
+      )
+  ENDIF()
+ENDIF()

 IF(CMAKE_SYSTEM_NAME MATCHES "Windows")


Download QuickTime prebuilt libs only if the SQK is not installed locally (Windows only); should fix the CMake warnings if SDK is installed

--- indra/cmake/QuickTimePlugin.cmake
+++ indra/cmake/QuickTimePlugin.cmake
@@ -1,10 +1,9 @@
 # -*- cmake -*-

-#Always download the prebuilt for now
-#if(INSTALL_PROPRIETARY)
+if(INSTALL_PROPRIETARY)
   include(Prebuilt)
   use_prebuilt_binary(quicktime)
-#endif(INSTALL_PROPRIETARY)
+endif(INSTALL_PROPRIETARY)

 if (DARWIN)
   include(CMakeFindFrameworks)
@@ -15,15 +14,35 @@

   find_library(DEBUG_QUICKTIME_LIBRARY qtmlclient.lib
                PATHS
-               ${ARCH_PREBUILT_DIRS_DEBUG}
                "${QUICKTIME_SDK_DIR}\\libraries"
                )

   find_library(RELEASE_QUICKTIME_LIBRARY qtmlclient.lib
                PATHS
-               ${ARCH_PREBUILT_DIRS_RELEASE}
                "${QUICKTIME_SDK_DIR}\\libraries"
                )
+
+  if (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
+    message ("Using QuickTime SDK libraries.")
+  else (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
+    message ("Using QuickTime prebuilt libraries.")
+    set (USE_QUICKTIME_PREBUILT ON CACHE BOOL "Using QuickTime prebuilt libraries.")
+
+    if (NOT INSTALL_PROPRIETARY)
+      include(Prebuilt)
+      use_prebuilt_binary(quicktime)
+    endif (NOT INSTALL_PROPRIETARY)
+
+    find_library(DEBUG_QUICKTIME_LIBRARY qtmlclient.lib
+                 PATHS
+                 ${ARCH_PREBUILT_DIRS_RELEASE}
+                 )
+
+    find_library(RELEASE_QUICKTIME_LIBRARY qtmlclient.lib
+                 PATHS
+                 ${ARCH_PREBUILT_DIRS_RELEASE}
+                 )
+  endif (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)

   if (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
     set(QUICKTIME_LIBRARY
@@ -33,10 +52,15 @@

   endif (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)

-  include_directories(
-    ${LIBS_PREBUILT_DIR}/include/quicktime
-    "${QUICKTIME_SDK_DIR}\\CIncludes"
+  if (USE_QUICKTIME_PREBUILT)
+    include_directories(
+      ${LIBS_PREBUILT_DIR}/include/quicktime
     )
+  else (USE_QUICKTIME_PREBUILT)
+    include_directories(
+      "${QUICKTIME_SDK_DIR}\\CIncludes"
+    )
+  endif (USE_QUICKTIME_PREBUILT)
 endif (DARWIN)

 mark_as_advanced(QUICKTIME_LIBRARY)


Bootloader size is less than 1K, moving upper at address 0x7C00

--- targets/avr/bootloader.cmake
+++ targets/avr/bootloader.cmake
@@ -6,7 +6,7 @@
   ${MCODE_BL_TOP}/main.c
 )

-set ( MCODE_BOOTLOADER_BASE 0x7000 )
+set ( MCODE_BOOTLOADER_BASE 0x7c00 )

 add_executable( bootloader ${BL_SRC_LIST} )
 target_link_libraries ( bootloader "-mmcu=atmega32 -Ttext=${MCODE_BOOTLOADER_BASE}" )


ManageGConf: update comment

ManageGConf: update comment

--- Modules/ManageGConf.cmake
+++ Modules/ManageGConf.cmake
@@ -3,7 +3,8 @@
 #
 # Defines the following macros:
 #   MANAGE_GCONF_SCHEMAS([FILE <schemasFile>]
-#       [INSTALL_DIR <dir>] [CONFIG_SOURCE <source>)
+#       [INSTALL_DIR <dir>] [CONFIG_SOURCE <source>]
+#     )
 #     - Process schemas file.
 #       * Parameters:
 #         + FILE <schemasFile>: (Optional) See GCONF_SCHEMAS_FILE.
@@ -12,17 +13,17 @@
 #           "${SYSCONF_DIR}/gconf/schemas
 #         + INSTALL_DIR <dir>: (Optional) See GCONF_INSTALL_DIR.
 #         + CONFIG_SOURCE <source>: (Optional) See GCONF_CONFIG_SOURCE.
-#       * Reads and defined following variables:
+#       * Reads and defines following variables:
 #         + GCONF_SCHEMAS_FILE: Schema file.
 #           Default: ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.schemas
 #         + GCONF_SCHEMAS_INSTALL_DIR: Directory the
 #           schemas file installed to
 #	    Default: ${SYSCONF_INSTALL_DIR}/gconf/schemas
 #         + GCONF_CONFIG_SOURCE: Configuration source.
-#           Default: "" (Use the system default)
+#           Default: "" (Use the system default).
 #       * Defines following targets:
-#         + install_schemas: install schemas
-#         + uninstall_schemas: uninstall schemas
+#         + install_schemas: install schemas.
+#         + uninstall_schemas: uninstall schemas.
 #

 IF(DEFINED _MANAGE_GCONF_CMAKE_)
@@ -96,4 +97,3 @@
 	DEST_SUBDIR "gconf/schemas")
 ENDMACRO(MANAGE_GCONF_SCHEMAS)

-


ARROW-4891: [C++] Add zlib headers to include directories

Author: Korn, Uwe <Uwe.Korn@blue-yonder.com>

Closes #3914 from xhochy/ARROW-4891 and squashes the following commits:

74117a4c2 <Korn, Uwe> ARROW-4891:  Add zlib headers to include directories

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1388,6 +1388,10 @@

 if(ARROW_WITH_ZLIB)
   resolve_dependency(ZLIB)
+
+  # TODO: Don't use global includes but rather target_include_directories
+  get_target_property(ZLIB_INCLUDE_DIR ZLIB::ZLIB INTERFACE_INCLUDE_DIRECTORIES)
+  include_directories(SYSTEM ${ZLIB_INCLUDE_DIR})
 endif()

 macro(build_lz4)


Allow stupid dst register in ABI test.

Allow stupid dst register in ABI test.

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

--- tests/abi.cmake
+++ tests/abi.cmake
@@ -7,7 +7,7 @@
    OUTPUT_VARIABLE asm)
 string(STRIP "${asm}" asm)
 if("${IMPL}" STREQUAL SSE)
-   set(reference "^(addps %xmm1,%xmm0 retq|vaddps %xmm(0,%xmm1|1,%xmm0),%xmm0 retq)$")
+   set(reference "^(addps %xmm(0,%xmm1 movaps %xmm1,%xmm0|1,%xmm0 retq)|vaddps %xmm(0,%xmm1|1,%xmm0),%xmm0 retq)$")
 elseif("${IMPL}" STREQUAL AVX)
    set(reference "^vaddps %ymm(0,%ymm1|1,%ymm0),%ymm0 retq$")
 elseif("${IMPL}" STREQUAL AVX2)
@@ -19,5 +19,5 @@
 if("${asm}" MATCHES "${reference}")
    message(STATUS "Passed.")
 else()
-   message(FATAL_ERROR "Failed. (${asm})")
+   message(FATAL_ERROR "Failed. ('${asm}' does not match '${reference}')")
 endif()


Tinyxml included properly

Tinyxml included properly

--- CMakeModules/KrisLibraryDependencies.cmake
+++ CMakeModules/KrisLibraryDependencies.cmake
@@ -82,7 +82,7 @@
   MESSAGE("TinyXML library found")
   SET(KRISLIBRARY_DEFINITIONS ${KRISLIBRARY_DEFINITIONS} -DHAVE_TINYXML=1 -DTIXML_USE_STL)
   SET(KRISLIBRARY_INCLUDE_DIRS ${KRISLIBRARY_INCLUDE_DIRS} ${TINYXML_INCLUDE_DIR})
-  SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} ${TINYXML_LIBRARY})
+  SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} ${TINYXML_LIBRARIES})
 ELSE(TINYXML_FOUND)
   MESSAGE("TinyXML library not found, setting HAVE_TINYXML=0")
 ENDIF(TINYXML_FOUND)


r9303/sofa : cmake: Check for SIMULATION_GRAPH_BGL before adding BoostKernel

Former-commit-id: 6dc2f5b5608cb544ce0abde0fba55018db60c2e1

--- sofa-dependencies.cmake
+++ sofa-dependencies.cmake
@@ -39,7 +39,10 @@
 add_subdirectory("${SOFA_APPLICATIONS_DIR}/sofa/gui")

 ## projects
-add_subdirectory("${SOFA_APPLICATIONS_DIR}/projects/BoostKernel")
+if(SIMULATION_GRAPH_BGL)
+	add_subdirectory("${SOFA_APPLICATIONS_DIR}/projects/BoostKernel")
+endif()
+
 add_subdirectory("${SOFA_APPLICATIONS_DIR}/projects/generateDoc")
 add_subdirectory("${SOFA_APPLICATIONS_DIR}/projects/GenerateRigid")
 add_subdirectory("${SOFA_APPLICATIONS_DIR}/projects/generateTypedefs")


raspberrypi2-cxx11 use os/raspberry2 & compiler/gcc-cross-compile-raspberry-pi

--- raspberrypi2-cxx11.cmake
+++ raspberrypi2-cxx11.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2015, Alexandre Pretyman
+# Copyright (c) 2015, 2017 Alexandre Pretyman
 # All rights reserved.

 if(DEFINED POLLY_RASPBERRYPI2_CXX11_CMAKE)
@@ -15,85 +15,11 @@
 )

 include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_common.cmake")
+
 include(polly_clear_environment_variables)
-include(polly_fatal_error)
-include(polly_add_cache_flag)
-
-set(_rpi_error_msg) #if empty, then no errors!
-string(COMPARE EQUAL
-    "$ENV{RASPBERRYPI_CROSS_COMPILE_TOOLCHAIN_PATH}"
-    ""
-    _is_empty
-)
-if(_is_empty)
-  set(_rpi_error_msg
-      "${_rpi_error_msg}\nRASPBERRYPI_CROSS_COMPILE_TOOLCHAIN_PATH environment variable not set. Set it to the absolute path of the \"bin\" directory for the toolchain"
-  )
-endif()
-
-string(COMPARE EQUAL
-    "$ENV{RASPBERRYPI_CROSS_COMPILE_TOOLCHAIN_PREFIX}"
-    ""
-    _is_empty
-)
-if(_is_empty)
-  set(_rpi_error_msg
-      "${_rpi_error_msg}\nRASPBERRYPI_CROSS_COMPILE_TOOLCHAIN_PREFIX environment variable not set. Set it to the triplet of the toolchain (ex: arm-linux-gnueabihf)"
-  )
-endif()
-
-string(COMPARE EQUAL
-    "$ENV{RASPBERRYPI_CROSS_COMPILE_SYSROOT}"
-    ""
-    _is_empty
-)
-if(_is_empty)
-  set(_rpi_error_msg
-    "${_rpi_error_msg}\nRASPBERRYPI_CROSS_COMPILE_SYSROOT environment variable not set. Set it to the sysroot to be used"
-  )
-endif()
-
-string(COMPARE NOTEQUAL
-    "${_rpi_error_msg}"
-    ""
-    _has_errors
-)
-if(_has_errors)
-  polly_fatal_error(
-      "RaspberyPi Toolchain configuration failed:"
-      ${_rpi_error_msg}
-  )
-endif()
-
-set(RAPSBERRYPI2_COMPILE_FLAGS
-    "-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
-    CACHE STRING "RaspberryPi 2 Compile Flags"
-)
-
-# We shouldn't try to hardcore the path, since the cross compiler for the Mac
-# needs to be in a "case-sensitive" file system
-set(CROSS_COMPILE_TOOLCHAIN_PATH
-    "$ENV{RASPBERRYPI_CROSS_COMPILE_TOOLCHAIN_PATH}"
-    CACHE PATH "RaspberryPi Toolchain Path"
-)
-
-# The prefix is what is known as the cross compiler triplet or quadruplet.
-# ex: arm-unknown-linux-gnueabihf (note: no dash at the end)
-set(CROSS_COMPILE_TOOLCHAIN_PREFIX
-    "$ENV{RASPBERRYPI_CROSS_COMPILE_TOOLCHAIN_PREFIX}"
-    CACHE STRING "RaspberryPi Toolchain Prefix"
-)
-
-# The sysroot for the cross compile
-set(CROSS_COMPILE_SYSROOT
-    "$ENV{RASPBERRYPI_CROSS_COMPILE_SYSROOT}"
-    CACHE PATH "RaspberryPi sysroot"
-)

 include("${CMAKE_CURRENT_LIST_DIR}/flags/cxx11.cmake")
-include("${CMAKE_CURRENT_LIST_DIR}/compiler/gcc-cross-compile.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/compiler/gcc-cross-compile-raspberry-pi.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/os/raspberry-pi2.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/os/raspberry-pi-hardfloat.cmake")

-polly_add_cache_flag(CMAKE_C_FLAGS ${RAPSBERRYPI2_COMPILE_FLAGS})
-polly_add_cache_flag(CMAKE_CXX_FLAGS ${RAPSBERRYPI2_COMPILE_FLAGS})
-polly_add_cache_flag(CMAKE_SYSTEM_NAME "Linux")
-polly_add_cache_flag(CMAKE_SYSTEM_PROCESSOR "armv7-a")


Include community board in cmake select (#826)

--- CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake
+++ CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake
@@ -73,7 +73,8 @@
                ${CHIBIOS_BOARD} STREQUAL "I2M_OXYGEN_NF" OR
                ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F401RE_NF" OR
                ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F411RE_NF" OR
-               ${CHIBIOS_BOARD} STREQUAL "GHI_FEZ_CERB40_NF")
+               ${CHIBIOS_BOARD} STREQUAL "GHI_FEZ_CERB40_NF" OR
+               ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO144_F412ZG_NF")
                 ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1
             else()
                 ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv2
@@ -116,7 +117,8 @@
    ${CHIBIOS_BOARD} STREQUAL "I2M_OXYGEN_NF" OR
    ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F401RE_NF" OR
    ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F411RE_NF" OR
-   ${CHIBIOS_BOARD} STREQUAL "GHI_FEZ_CERB40_NF")
+   ${CHIBIOS_BOARD} STREQUAL "GHI_FEZ_CERB40_NF" OR
+   ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO144_F412ZG_NF")
     list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1)
 else()
     list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv2)


Add precondition for some functions

Add precondition for some functions

--- build_tools/cmake/iree_cross_compile.cmake
+++ build_tools/cmake/iree_cross_compile.cmake
@@ -144,8 +144,12 @@

 # iree_host_install
 #
-# Defines custom commands and targets for installing the given `target`. The
-# custom target for install will be named as `iree_host_install_${target}`.
+# Defines custom commands and targets for installing the given `target` under
+# host configuration. The custom target for install will be named as
+# `iree_host_install_${target}`.
+#
+# Precondition:
+# - iree_create_configuration(HOST) is invoked previously.
 #
 # Parameters:
 # - COMPONENT: installation component; used for filtering installation targets.
@@ -179,6 +183,9 @@
 # Generates custom commands and targets for building and installing a tool on
 # host for cross-compilation.
 #
+# Precondition:
+# - iree_create_configuration(HOST) is invoked previously.
+#
 # Parameters:
 # - target: the target to build on host.
 # - BUILDONLY: only generates commands for building the target.


ENH: Turn remote module LSTK off by default.

In the updated version of LSTK repo,"EXCLUDE_FROM_ALL"
tag is added to the module dependency.Also the module name
no longer has ITK prefix in it.

Change-Id: Ia4467a0b2861a7e89e97028fe89d2ca61cb88c57

--- Modules/Remote/LesionSizingToolkit.remote.cmake
+++ Modules/Remote/LesionSizingToolkit.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(LesionSizingToolkit
   "Framework for determining the sizes of lesions in medical images."
   GIT_REPOSITORY http://public.kitware.com/LesionSizingToolkit.git
-  GIT_TAG 60cc50ff7
+  GIT_TAG 962ae6d7a
   )


ENH: Bump ParameterSerializer tag to version that includes fPIC option

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -57,10 +57,10 @@
   http://www.csie.ntu.edu.tw/~cjlin/libsvm/oldfiles/libsvm-3.17.tar.gz )
 set( LIBSVM_HASH_OR_TAG 67f8b597ce85c1f5288d7838e57ea28a )

-# TubeTK Parameter Serializer snapshot 2013-08-21 11:14:41
+# TubeTK Parameter Serializer snapshot 2013-12-20 01:04)
 set( ParameterSerializer_URL
   ${github_protocol}://github.com/TubeTK/TubeTK-ParameterSerializer.git )
-set( ParameterSerializer_HASH_OR_TAG 2dce11a61af383780d6be67950e850a8e089cd90 )
+set( ParameterSerializer_HASH_OR_TAG 67b34735c201d95cbfabf04f29bd120a12c63812 )

 # Slicer Execution Model (TubeTK fork) snapshot 2013-08-05 10:16:50
 set( SlicerExecutionModel_URL


Manual path insertion in case CTK_RUNTIME_LIB_DIRS empty

 * use the $CTK_BUILD/CTK-build/bin path
 * also a small warning is print out

--- CMake/mitkFunctionGetLibrarySearchPaths.cmake
+++ CMake/mitkFunctionGetLibrarySearchPaths.cmake
@@ -71,7 +71,15 @@
   endif()

   if(MITK_USE_BLUEBERRY)
-    list(APPEND _dir_candidates ${CTK_RUNTIME_LIBRARY_DIRS})
+    # quick-fix for Bug 16606 : the CTK_RUNTIME_LIB_DIRS variable was removed
+    # so check if the variable is empty, otherwise compose the path to CTK starting
+    if(NOT "${CTK_RUNTIME_LIBRARY_DIRS}" STREQUAL "")
+      list(APPEND _dir_candidates ${CTK_RUNTIME_LIBRARY_DIRS})
+    else()
+      message(STATUS "CTK Runtime library not set, composing hard-coded path")
+      message(STATUS "Using candidate: ${CTK_DIR}/CTK-build/bin" )
+      list(APPEND _dir_candidates ${CTK_DIR}/CTK-build/bin )
+    endif()
     if(DEFINED CTK_PLUGIN_RUNTIME_OUTPUT_DIRECTORY)
       if(IS_ABSOLUTE "${CTK_PLUGIN_RUNTIME_OUTPUT_DIRECTORY}")
         list(APPEND _dir_candidates "${CTK_PLUGIN_RUNTIME_OUTPUT_DIRECTORY}")


Don't enable "warning" level messages.

Don't enable "warning" level messages.

They are not supported on all versions

--- CPPCheck.cmake
+++ CPPCheck.cmake
@@ -184,7 +184,6 @@

     set (CPPCHECK_OPTIONS
          ${CPPCHECK_COMMON_OPTIONS}
-         --enable=warning
          --enable=performance
          --enable=portability)

@@ -281,4 +280,4 @@
                       INCLUDES ${_include_directories}
                       ${ARGN})

-endfunction (cppcheck_target_sources)+endfunction (cppcheck_target_sources)


Includes using "" might exist in the source directory.

--- CPPCheck.cmake
+++ CPPCheck.cmake
@@ -290,7 +290,18 @@

             string (STRIP ${HEADER} HEADER)

-            foreach (INCLUDE_DIRECTORY ${SCAN_INCLUDE_DIRECTORIES})
+            # Check if this include statement has quotes. If it does, then
+            # we should include the current source directory in the include
+            # directory scan.
+            string (FIND "${LINE}" "\"" QUOTE_INDEX)
+
+            if (NOT QUOTE_INDEX EQUAL -1)
+
+                list (APPEND SCAN_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR})
+
+            endif (NOT QUOTE_INDEX EQUAL -1)
+
+            foreach (INCLUDE_DIRECTORY ${SCAN_INCLUDES})

                 set (RELATIVE_PATH "${INCLUDE_DIRECTORY}/${HEADER}")
                 get_filename_component (ABSOLUTE_PATH ${RELATIVE_PATH} ABSOLUTE)


Merging r293230:
------------------------------------------------------------------------
r293230 | yuyichao | 2017-01-26 15:50:18 -0800 (Thu, 26 Jan 2017) | 11 lines

CMake is funky on detecting Intel 17 as GCC compatible.

Summary: This adds a fallback in case that the Intel compiler is failed to be detected correctly.

Reviewers: chapuni

Reviewed By: chapuni

Subscribers: llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D27610
------------------------------------------------------------------------

git-svn-id: 27e84c199cfb3049f109a3001c965f4b97b0bded@293780 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/DetermineGCCCompatible.cmake
+++ cmake/modules/DetermineGCCCompatible.cmake
@@ -7,5 +7,7 @@
     set(LLVM_COMPILER_IS_GCC_COMPATIBLE OFF)
   elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
     set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON)
+  elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel" )
+    set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON)
   endif()
 endif()


[cmake] Fix zlib cmake issue: Target <X> links to target "ZLIB::ZLIB" but the target was not found...

...after the changes in https://reviews.llvm.org/D79219.

Resolves rdar://problem/66057385

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -97,6 +97,10 @@
     endif()
   endif()

+  if(LLVM_ENABLE_ZLIB)
+   find_package(ZLIB REQUIRED)
+  endif()
+
   include(AddLLVM)
   include(AddSwiftTableGen) # This imports TableGen from LLVM.
   include(HandleLLVMOptions)


Only add errors on newer clang-tidy

Only add errors on newer clang-tidy

--- cmake/ClangTidy.cmake
+++ cmake/ClangTidy.cmake
@@ -12,9 +12,23 @@
         /usr/local/opt/llvm/bin
 )

+function(find_clang_tidy_version VAR)
+    execute_process(COMMAND ${CLANG_TIDY_EXE} -version OUTPUT_VARIABLE VERSION_OUTPUT)
+    separate_arguments(VERSION_OUTPUT_LIST UNIX_COMMAND "${VERSION_OUTPUT}")
+    list(FIND VERSION_OUTPUT_LIST "version" VERSION_INDEX)
+    math(EXPR VERSION_INDEX "${VERSION_INDEX} + 1")
+    list(GET VERSION_OUTPUT_LIST ${VERSION_INDEX} VERSION)
+    set(${VAR} ${VERSION} PARENT_SCOPE)
+endfunction()
+
 if( NOT CLANG_TIDY_EXE )
     message( STATUS "Clang tidy not found" )
+else()
+    find_clang_tidy_version(CLANG_TIDY_VERSION)
+    message( STATUS "Clang tidy found: ${CLANG_TIDY_VERSION}")
 endif()
+
+

 set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

@@ -34,11 +48,18 @@
         set(CLANG_TIDY_ANALYZE_TEMPORARY_DTORS "-analyze-temporary-dtors")
     endif()

+    if (${CLANG_TIDY_VERSION} VERSION_LESS "3.9.0")
+        set(CLANG_TIDY_ERRORS_ARG "")
+    else()
+        set(CLANG_TIDY_ERRORS_ARG "-warnings-as-errors='${CLANG_TIDY_ERRORS}'")
+
+    endif()
+
     set(CLANG_TIDY_COMMAND
         ${CLANG_TIDY_EXE}
         -p ${CMAKE_BINARY_DIR}
         -checks='${CLANG_TIDY_CHECKS}'
-        -warnings-as-errors='${CLANG_TIDY_ERRORS}'
+        ${CLANG_TIDY_ERRORS_ARG}
         -extra-arg='${CLANG_TIDY_EXTRA_ARGS}'
         ${CLANG_TIDY_ANALYZE_TEMPORARY_DTORS}
     )


Delete FindAntvr.cmake

Delete FindAntvr.cmake

--- cmake/FindAntvr.cmake
+++ cmake/FindAntvr.cmake
@@ -1 +0,0 @@
-


cmake: fix header detection for NLOPT library

--- cmake/FindNLOPT.cmake
+++ cmake/FindNLOPT.cmake
@@ -27,7 +27,7 @@

 # Include directories
 find_path(NLOPT_INCLUDE_DIRS
-    NAMES nlopt.h
+    NAMES nlopt.hpp
     HINTS ${PC_NLOPT_INCLUDEDIR}
     PATHS "${CMAKE_INSTALL_PREFIX}/include")


Correct typo: LIBCXXABI_BUILTINS_LIBRARY -> LIBCXX_BUILTINS_LIBRARY

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -42,7 +42,7 @@
     # Mingw64 requires quite a few "C" runtime libraries in order for basic
     # programs to link successfully with -nodefaultlibs.
     if (LIBCXX_USE_COMPILER_RT)
-      set(MINGW_RUNTIME ${LIBCXXABI_BUILTINS_LIBRARY})
+      set(MINGW_RUNTIME ${LIBCXX_BUILTINS_LIBRARY})
     else ()
       set(MINGW_RUNTIME gcc_s gcc)
     endif()


O1 implies fomit-frame-pointer

O1 implies fomit-frame-pointer

--- cmake/configure.cmake
+++ cmake/configure.cmake
@@ -35,7 +35,7 @@
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -fno-common")
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -DEIGEN_MPL2_ONLY -DEIGEN_DONT_PARALLELIZE -DEIGEN_DEFAULT_TO_ROW_MAJOR")
-        set(CMAKE_CXX_FLAGS_DEBUG               "-g -fno-omit-frame-pointer -O1")
+        set(CMAKE_CXX_FLAGS_DEBUG               "-g -O1 -fno-omit-frame-pointer")
         set(CMAKE_CXX_FLAGS_RELEASE             "-O3 -DNDEBUG -DEIGEN_NO_DEBUG")
         set(CMAKE_CXX_FLAGS_RELWITHDEBINFO      "-O3 -g -fno-omit-frame-pointer")
         set(CMAKE_CXX_FLAGS_MINSIZEREL          "-Os -DNDEBUG")


MAINT: specify `DO_EXPORTS` preprocessor only on libraries.

--- cmake/do_macros.cmake
+++ cmake/do_macros.cmake
@@ -173,6 +173,12 @@
       SOVERSION ${DO_${DO_PROJECT_NAME}_SOVERSION}
       OUTPUT_NAME DO_${DO_PROJECT_NAME}_${_library_name}-${DO_${DO_PROJECT_NAME}_VERSION}
       OUTPUT_NAME_DEBUG DO_${DO_PROJECT_NAME}_${_library_name}-${DO_${DO_PROJECT_NAME}_VERSION}-d)
+    if (DO_BUILD_SHARED_LIBS)
+      set_target_properties(
+        DO_${DO_PROJECT_NAME}_${_library_name}
+        PROPERTIES
+        COMPILE_DEFINITIONS "DO_EXPORTS")
+    endif ()

     # Specify where to install the static library.
     install(TARGETS DO_${DO_PROJECT_NAME}_${_library_name}


Updating Maya finder to include QUIET finding and adjust the REQUIRED condition.

--- FindMaya.cmake
+++ FindMaya.cmake
@@ -1,17 +1,29 @@
 ############################################################
-#
+#
 # Ecole Polythechnique Federal De Lausanne (EPFL)
 # Brain Mind Institute (BMI)
 # Blue Brain Project (BBP)
-# Copyrights (c) 2012
-#
+# Copyrights (c) 2012-2013
+#
 # Author : Marwam Abdellah <marwan.abdellah@epfl.ch>
-#
+#
 ############################################################

-SET(MAYA_FOUND "NO")
+# Initially NOT found
+SET(MAYA_FOUND "")

-FIND_PATH(MAYA_ROOT_DIR include/maya/MLibrary.h REQUIRED
+# Checking REQUIRED or NOT
+if(MAYA_FIND_REQUIRED)
+  set(_maya_output_type FATAL_ERROR)
+  set(_maya_output 1)
+else()
+  set(_maya_output_type STATUS)
+  if(NOT Maya_FIND_QUIETLY)
+    set(_maya_output 1)
+  endif()
+endif()
+
+FIND_PATH(MAYA_ROOT_DIR include/maya/MLibrary.h
   /usr/autodesk/maya2012-x64
   /usr/autodesk/maya8.5-x64
   /usr/autodesk/maya8.0-x64
@@ -33,110 +45,102 @@
  )

 IF(MAYA_ROOT_DIR)
-  MESSAGE(STATUS "MAYA_ROOT_DIR is found in : ${MAYA_ROOT_DIR}")
+  IF(${_maya_output})
+        MESSAGE(STATUS "MAYA_ROOT_DIR is found in : ${MAYA_ROOT_DIR}")
+  ENDIF()
   SET(MAYA_FOUND "TRUE")
 ELSE(MAYA_ROOT_DIR)
-  MESSAGE(FATAL_ERROR: "MAYA_ROOT_DIR is NOT found")
-  SET(MAYA_FOUND "NO")
+  IF(${_maya_output})
+    MESSAGE(${_maya_output_type} "MAYA_ROOT_DIR is NOT found")
+  ENDIF()
+  SET(MAYA_FOUND "")
+
+  # Include & libraries directories
+  SET(MAYA_INCLUDE_DIR "${MAYA_ROOT_DIR}/include")
+  SET(MAYA_LIBRARY_DIR "${MAYA_ROOT_DIR}/lib")
+
+  # Checking the libraries
+  IF(UNIX)
+      SET(MAYA_APP_LIBRARIES OpenMayalib)
+  ELSE(UNIX)
+      SET(MAYA_APP_LIBRARIES "")
+  ENDIF(UNIX)
+
+  # Foundation library
+  FIND_LIBRARY(MAYA_Foundation_LIBRARY Foundation
+      ${MAYA_LIBRARY_DIR}
+      NO_DEFAULT_PATH
+   )
+
+  # OpenMaya library
+  FIND_LIBRARY(MAYA_OpenMaya_LIBRARY OpenMaya
+      ${MAYA_LIBRARY_DIR}
+      NO_DEFAULT_PATH
+   )
+
+  # Maya animation library
+  FIND_LIBRARY(MAYA_OpenMayaAnim_LIBRARY OpenMayaAnim
+      ${MAYA_LIBRARY_DIR}
+      NO_DEFAULT_PATH
+   )
+
+  # OpenMayaUI library
+  FIND_LIBRARY(MAYA_OpenMayaUI_LIBRARY OpenMayaUI
+      ${MAYA_LIBRARY_DIR}
+      NO_DEFAULT_PATH
+   )
+
+  # OpenMayaRender library
+  FIND_LIBRARY(MAYA_OpenMayaRender_LIBRARY OpenMayaRender
+      ${MAYA_LIBRARY_DIR}
+      NO_DEFAULT_PATH
+   )
+
+  # OpenMayaFX library
+  FIND_LIBRARY(MAYA_OpenMayaFX_LIBRARY OpenMayaFX
+      ${MAYA_LIBRARY_DIR}
+      NO_DEFAULT_PATH
+   )
+
+  # Maya cloth library
+  FIND_LIBRARY(MAYA_Cloth_LIBRARY Cloth
+      ${MAYA_LIBRARY_DIR}
+      NO_DEFAULT_PATH
+   )
+
+  # Maya image library
+  FIND_LIBRARY(MAYA_Image_LIBRARY Image
+      ${MAYA_LIBRARY_DIR}
+      NO_DEFAULT_PATH
+   )
+
+  # Adding libraries to the MAYA_LIBRARY list to be linking against
+  SET(MAYA_BASE_LIBRARIES   ${MAYA_Foundation_LIBRARY}
+                            ${MAYA_OpenMaya_LIBRARY})
+  SET(MAYA_ANIM_LIBRARIES   ${MAYA_BASE_LIBRARIES}
+                            ${MAYA_OpenMayaAnim_LIBRARY} )
+  SET(MAYA_UI_LIBRARIES     ${MAYA_BASE_LIBRARIES}
+                            ${MAYA_OpenMayaUI_LIBRARY})
+  SET(MAYA_RENDER_LIBRARIES ${MAYA_BASE_LIBRARIES}
+                            ${MAYA_OpenMayaRender_LIBRARY})
+  SET(MAYA_FX_LIBRARIES     ${MAYA_BASE_LIBRARIES}
+                            ${MAYA_OpenMayaFX_LIBRARY})
+  SET(MAYA_CLOTH_LIBRARIES  ${MAYA_BASE_LIBRARIES}
+                            ${MAYA_Cloth_LIBRARY})
+  SET(MAYA_IMAGE_LIBRARIES  ${MAYA_Image_LIBRARY})
+
+  SET(MAYA_LIBRARIES 		    ${MAYA_BASE_LIBRARIES}
+                            ${MAYA_ANIM_LIBRARIES}
+                            ${MAYA_UI_LIBRARIES}
+                            ${MAYA_FX_LIBRARIES}
+                            ${MAYA_IMAGE_LIBRARIES})
+
+  # Adding BASIC definitions
+  ADD_DEFINITIONS(-D_BOOL -DFUNCPROTO -DREQUIRE_IOSTREAM)
 ENDIF(MAYA_ROOT_DIR)

-# Include & libraries directories
-SET(MAYA_INCLUDE_DIR "${MAYA_ROOT_DIR}/include")
-SET(MAYA_LIBRARY_DIR "${MAYA_ROOT_DIR}/lib")

-# Checking the libraries
-IF(UNIX)
-  SET(MAYA_APP_LIBRARIES OpenMayalib)
-ELSE(UNIX)
-  SET(MAYA_APP_LIBRARIES "")
-ENDIF(UNIX)
+IF(MAYA_FOUND AND _maya_output)
+  MESSAGE(STATUS "Found MAYA in ${MAYA_INCLUDE_DIR} ${MAYA_LIBRARIES}")
+ENDIF()

-# Foundation library
-FIND_LIBRARY(MAYA_Foundation_LIBRARY Foundation
-  ${MAYA_LIBRARY_DIR}
-  NO_DEFAULT_PATH
- )
-
-# OpenMaya library
-FIND_LIBRARY(MAYA_OpenMaya_LIBRARY OpenMaya
-  ${MAYA_LIBRARY_DIR}
-  NO_DEFAULT_PATH
- )
-
-# Maya animation library
-FIND_LIBRARY(MAYA_OpenMayaAnim_LIBRARY OpenMayaAnim
-  ${MAYA_LIBRARY_DIR}
-  NO_DEFAULT_PATH
- )
-
-# OpenMayaUI library
-FIND_LIBRARY(MAYA_OpenMayaUI_LIBRARY OpenMayaUI
-  ${MAYA_LIBRARY_DIR}
-  NO_DEFAULT_PATH
- )
-
-# OpenMayaRender library
-FIND_LIBRARY(MAYA_OpenMayaRender_LIBRARY OpenMayaRender
-  ${MAYA_LIBRARY_DIR}
-  NO_DEFAULT_PATH
- )
-
-# OpenMayaFX library
-FIND_LIBRARY(MAYA_OpenMayaFX_LIBRARY OpenMayaFX
-  ${MAYA_LIBRARY_DIR}
-  NO_DEFAULT_PATH
- )
-
-# Maya cloth library
-FIND_LIBRARY(MAYA_Cloth_LIBRARY Cloth
-  ${MAYA_LIBRARY_DIR}
-  NO_DEFAULT_PATH
- )
-
-# Maya image library
-FIND_LIBRARY(MAYA_Image_LIBRARY Image
-  ${MAYA_LIBRARY_DIR}
-  NO_DEFAULT_PATH
- )
-
-# Adding libraries to the MAYA_LIBRARY list to be linking against
-SET(MAYA_BASE_LIBRARIES
-  	${MAYA_Foundation_LIBRARY}
-  	${MAYA_OpenMaya_LIBRARY})
-SET(MAYA_ANIM_LIBRARIES
-  	${MAYA_BASE_LIBRARIES}
-  	${MAYA_OpenMayaAnim_LIBRARY} )
-SET(MAYA_UI_LIBRARIES
-  	${MAYA_BASE_LIBRARIES}
-  	${MAYA_OpenMayaUI_LIBRARY})
-SET(MAYA_RENDER_LIBRARIES
-  	${MAYA_BASE_LIBRARIES}
-  	${MAYA_OpenMayaRender_LIBRARY})
-SET(MAYA_FX_LIBRARIES
-  	${MAYA_BASE_LIBRARIES}
-  	${MAYA_OpenMayaFX_LIBRARY})
-SET(MAYA_CLOTH_LIBRARIES
- 	${MAYA_BASE_LIBRARIES}
-  	${MAYA_Cloth_LIBRARY})
-SET(MAYA_IMAGE_LIBRARIES
-  	${MAYA_Image_LIBRARY})
-
-SET(MAYA_LIBRARIES
-	${MAYA_BASE_LIBRARIES}
-	${MAYA_ANIM_LIBRARIES}
-	${MAYA_UI_LIBRARIES}
-	${MAYA_FX_LIBRARIES}
-	${MAYA_IMAGE_LIBRARIES})
-
-# Adding BASIC definitions
-ADD_DEFINITIONS(
-  -D_BOOL
-  -DFUNCPROTO
-  -DREQUIRE_IOSTREAM)
-
-IF(MAYA_FOUND)
-  MESSAGE(STATUS "Found MAYA in ${MAYA_INCLUDE_DIR} ${MAYA_LIBRARIES}")
-ELSE(MAYA_FOUND)
-  MESSAGE(STATUS "Maya was NOT Found")
-ENDIF(MAYA_FOUND)
-


cmake: Hack to get objective-C files to build with gnu99. (We need cmake upstream to be fixed with Objective-C to do that properly.)

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -114,7 +114,7 @@
             "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -undefined dynamic_lookup")

     set(SYS_DARWIN 1)
-
+    add_definitions(-std=gnu99) # Hack for obj-c files to be compiled with gnu99
     vlc_enable_modules(macosx minimal_macosx access_eyetv quartztext)

     vlc_find_frameworks(Cocoa Carbon OpenGL AGL IOKit Quicktime


cmake: As reported by jpeg, fix an endif.

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -181,7 +181,7 @@
         vlc_module_add_link_libraries(libvlc connect)
         vlc_module_add_link_libraries(cdda   connect)
         vlc_module_add_link_libraries(cddax  connect)
-    endif(HAVE_CONNECT)
+    endif(NOT HAVE_CONNECT)
 endif(NOT HAVE_CONNECT)

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


Bugfix: Store user supplied compiler flags that are given (once) via env
variables.

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

--- deal.II/cmake/setup_cached_variables.cmake
+++ deal.II/cmake/setup_cached_variables.cmake
@@ -123,7 +123,7 @@
   # "CACHE" ensures that we only set the variable if it is not already set
   # as a  cached variable. Effectively we're setting a default value:
   #
-  SET(${flag} "" CACHE STRING
+  SET(${flag} "${${flag}}" CACHE STRING
    "The user supplied cache variable will be appended _at the end_ of the auto generated ${flag} variable"
    )


A nicer summary

A nicer summary

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

--- deal.II/contrib/cmake/setup_finalize.cmake
+++ deal.II/contrib/cmake/setup_finalize.cmake
@@ -1,35 +1,49 @@
+#
+# Append the saved cache variable ${flags}_SAVED at the end of ${flags}
+#
 FOREACH(flags ${deal_ii_used_flags})
-  #
-  # Append the saved cache variable ${flags}_SAVED at the end of ${flags}
-  #
   SET(${flags} "${${flags}} ${${flags}_SAVED}")
 ENDFOREACH()

+#
+# And print out a nice configuration summary:
+#
 MESSAGE("

-
-deal.II successfully configured!
+*                                        *
+*    deal.II successfully configured!    *
+*                                        *

-Compiler Flags:
+    CMAKE_BUILD_TYPE:     ${CMAKE_BUILD_TYPE}
+    CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}

-Flags used by the compiler during all build types:
+General compiler flags (used by all build targets):

-    CMAKE_C_FLAGS:   ${CMAKE_C_FLAGS}
-    CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}
+    CMAKE_C_FLAGS:       ${CMAKE_C_FLAGS}
+    CMAKE_CXX_FLAGS:     ${CMAKE_CXX_FLAGS}
+")

-Additional flags used by the compiler during all release builds:
+IF(CMAKE_BUILD_TYPE MATCHES "Release")
+  MESSAGE("
+Additional compiler flags used for the Release target:

     CMAKE_C_FLAGS_RELEASE:   ${CMAKE_C_FLAGS_RELEASE}
     CMAKE_CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}
+")
+ENDIF()

-Additional flags used by the compiler during all debug builds:
+IF(CMAKE_BUILD_TYPE MATCHES "Debug")
+  MESSAGE("
+Additional compiler flags used for the Debug target:

     CMAKE_C_FLAGS_DEBUG:   ${CMAKE_C_FLAGS_DEBUG}
     CMAKE_CXX_FLAGS_DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}
+")
+ENDIF()

-(Note: Flags set with ccmake or the command line will be appended at the end
-of the default configuration)
+MESSAGE("
+(Note: Flags set with ccmake or the command line will be appended at the end of the default configuration)

 Configured Features:
@@ -38,11 +52,24 @@
 GET_CMAKE_PROPERTY(res VARIABLES)
 FOREACH(var ${res})
   IF(var MATCHES "DEAL_II_WITH")
-    MESSAGE("    ${var} = ${${var}}")
+    IF(${${var}})
+      # FEATURE is enabled
+      STRING(REGEX REPLACE "^DEAL_II_WITH_" "" feature ${var})
+
+      IF(FEATURE_${feature}_EXTERNAL_CONFIGURED)
+        MESSAGE("      ${var} set up with external dependencies")
+      ENDIF()
+
+      IF(FEATURE_${feature}_CONTRIB_CONFIGURED)
+        MESSAGE("      ${var} set up with contrib packages")
+      ENDIF()
+    ELSE()
+      # FEATURE is disabled
+      MESSAGE("    ( ${var} = ${${var}} )")
+    ENDIF()
   ENDIF()
 ENDFOREACH()

 MESSAGE("
-TODO: Tell something about contrib/external

 ")


Fixing stubs inclusion for several components (#2034)

--- CMake/Modules/FindNF_CoreCLR.cmake
+++ CMake/Modules/FindNF_CoreCLR.cmake
@@ -133,16 +133,11 @@
     nf_rt_native_nanoFramework_Runtime_Native_Rtc_stubs.cpp

     # Core stubs
-    Hardware_stub.cpp
-    InterruptHandler_stub.cpp
-    NativeEventDispatcher_stub.cpp
     RPC_stub.cpp
     BinaryFormatter_stub.cpp

     # CLR stubs
     Debugger_stub.cpp
-    Diagnostics_stub.cpp
-    Messaging_stub.cpp

     # Helpers
     nanoprintf.c


nodejs: copy cppgc headers to INSTALL_DIR

issue https://github.com/smanders/externpro/issues/272#issuecomment-858768613

--- projects/nodejs.cmake
+++ projects/nodejs.cmake
@@ -116,16 +116,19 @@
   set(nodejsHdrs ${SOURCE_DIR}/src/*.h)
   set(uvDir ${SOURCE_DIR}/deps/uv/include)
   set(v8Hdrs ${SOURCE_DIR}/deps/v8/include/*.h)
+  set(cppgcHdrs ${SOURCE_DIR}/deps/v8/include/cppgc/*.h)
   set(XP_TARGET nodejs_${ver}_stage)
   if(NOT TARGET ${XP_TARGET})
     ExternalProject_Add(${XP_TARGET} DEPENDS ${nodejs_${ver}_DEPS}
-      DOWNLOAD_COMMAND "" DOWNLOAD_DIR ${NULL_DIR} BINARY_DIR ${NULL_DIR}
+      DOWNLOAD_DIR ${NULL_DIR} BINARY_DIR ${NULL_DIR}
       SOURCE_DIR ${NULL_DIR} INSTALL_DIR ${STAGE_DIR}/include/node_${ver}/node
-      CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy_directory ${uvDir} <INSTALL_DIR>
-      BUILD_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=${nodejsHdrs}
+      DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${uvDir} <INSTALL_DIR>
+      CONFIGURE_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=${nodejsHdrs}
         -Ddst:STRING=<INSTALL_DIR> -P ${MODULES_DIR}/cmscopyfiles.cmake
-      INSTALL_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=${v8Hdrs}
+      BUILD_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=${v8Hdrs}
         -Ddst:STRING=<INSTALL_DIR> -P ${MODULES_DIR}/cmscopyfiles.cmake
+      INSTALL_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=${cppgcHdrs}
+        -Ddst:STRING=<INSTALL_DIR>/cppgc -P ${MODULES_DIR}/cmscopyfiles.cmake
       )
     set_property(TARGET ${XP_TARGET} PROPERTY FOLDER ${bld_folder})
   endif()