Add template results for dependencies and extra CFLAGS.  libffi has
none of those so the extra CMake code that is configured
should have no effect for libffi.

Tested by: Alan W. Irwin <airwin@users.sourceforge.net> using the
build_libffi target (or build_glib target that depends on the
build_libffi target) for both Linux and "MSYS Makefiles" on Wine. In
the latter case there was a popup error box with the last command
executed being the install script. But when I ran that command by hand
afterwards everything worked fine.  I suspect this intermittent error
is due to a race condition for parallel builds so I will try turning
off parallel builds for libffi for future tests.

svn path=/trunk/; revision=12441

--- cmake/build_projects/libffi/bp.cmake
+++ cmake/build_projects/libffi/bp.cmake
@@ -24,13 +24,25 @@
 # used below that configure how the External_Project functions
 # operate.

+# Protect against configuring a build twice in one CMake call
+if(libffi_configured)
+  return()
+endif(libffi_configured)
+set(libffi_configured ON)
+
+set(libffi_dependencies_LIST )
+
+foreach(build_configuration ${libffi_dependencies_LIST})
+  include(${build_configuration}/bp.cmake)
+endforeach(build_configuration ${libffi_dependences_LIST})
+
+# This can be safely done only after above includes.
 set(BP_PACKAGE libffi)

-# Protect against configuring a build twice in one CMake call
-if(${BP_PACKAGE}_configured)
-  return()
-endif(${BP_PACKAGE}_configured)
-set(${BP_PACKAGE}_configured ON)
+set(${BP_PACKAGE}_dependencies_targets)
+foreach(build_configuration ${${BP_PACKAGE}_dependencies_LIST})
+  list(APPEND ${BP_PACKAGE}_dependencies_targets build_${build_configuration})
+endforeach(build_configuration ${${BP_PACKAGE}_dependences_LIST})

 # Data that is related to downloads.
 set(${BP_PACKAGE}_URL ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz)
@@ -44,16 +56,19 @@
   determine_msys_path(BP_PATH "${BP_PATH}")
   # Must have all elements of env command in MSYS platform form
   determine_msys_path(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}")
+  set(${BP_PACKAGE}_SET_CFLAGS "CFLAGS=$ENV{CFLAGS}")
 else(MSYS_PLATFORM)
   set(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}")
+  set(${BP_PACKAGE}_SET_CFLAGS "CFLAGS=$ENV{CFLAGS}")
 endif(MSYS_PLATFORM)
 #message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")

 ExternalProject_Add(
   build_${BP_PACKAGE}
+  DEPENDS ${${BP_PACKAGE}_dependencies_targets}
   URL ${${BP_PACKAGE}_URL}
   URL_HASH ${${BP_PACKAGE}_DOWNLOAD_HASH_TYPE}=${${BP_PACKAGE}_DOWNLOAD_HASH}
-  CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${source_PATH}/${BP_CONFIGURE_COMMAND}
+  CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${${BP_PACKAGE}_SET_CFLAGS} ${source_PATH}/${BP_CONFIGURE_COMMAND}
   BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND}
   INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND} install
   )


[Exp PyROOT] Variable 'py_localruntimedir' set in a way that fits commit 38c49999


cmake: force gcc colour output when CLICOLOR_FORCE=1

--- src/cmake/common-settings.cmake
+++ src/cmake/common-settings.cmake
@@ -220,7 +220,11 @@
 	compile_flag("-fvisibility=hidden"       VISIBILITY_HIDDEN    RELEASE DEBUG RELWITHDEBINFO)
 	#compile_flag("-mfpmath=sse"          FPMATH_MSSE          RELEASE RELWITHDEBINFO)
 	if (NOT "${CLANG}")
-		compile_flag("-fdiagnostics-color=auto"  DIAG_COLORS      RELEASE DEBUG RELWITHDEBINFO)
+		if ("$ENV{CLICOLOR_FORCE}" STREQUAL "1")
+			compile_flag("-fdiagnostics-color=always" DIAG_COLORS  RELEASE DEBUG RELWITHDEBINFO)
+		else()
+			compile_flag("-fdiagnostics-color=auto"  DIAG_COLORS   RELEASE DEBUG RELWITHDEBINFO)
+		endif()
 	endif()

 	# link


cmake: /std::c++latest with Visual Studio

--- src/cmake/common-settings.cmake
+++ src/cmake/common-settings.cmake
@@ -180,10 +180,12 @@
 endif()

 if(MSVC)
-	set(CMAKE_C_FLAGS_DEBUG   "${COMMON_MSVC_FLAGS} /MD /GR /Ot /Od /EHsc")
-	set(CMAKE_CXX_FLAGS_DEBUG "${COMMON_MSVC_FLAGS} /MD /GR /Ot /Od /EHsc /fp:except")
+	set(CMAKE_C_FLAGS_DEBUG   "${COMMON_MSVC_FLAGS} /MD /GR /Ot /Od /EHsc /std:c++latest")
+	set(CMAKE_CXX_FLAGS_DEBUG "${COMMON_MSVC_FLAGS} /MD /GR /Ot /Od /EHsc /fp:except /std:c++latest")
 	set(MSVC_RELEASE_FLAGS)

+	# Use the latest C++ standard
+	set(MSVC_RELEASE_FLAGS "${MSVC_RELEASE_FLAGS} /std:c++latest")
 	# O2x: optimization
 	set(MSVC_RELEASE_FLAGS "${MSVC_RELEASE_FLAGS} /Ox")
 	# Prefer speed instead of size


urbdrc: disable by default

urbdrc: disable by default

--- channels/urbdrc/ChannelOptions.cmake
+++ channels/urbdrc/ChannelOptions.cmake
@@ -6,10 +6,6 @@

 string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION)

-if(WIN32)
-	option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF)
-else()
-	option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
-endif()
+option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF)


cmake: fix EVP detection with gcc

cmake: fix EVP detection with gcc

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -92,11 +92,11 @@

     set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
     set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
-    check_symbol_exists(EVP_aes_128_ctr openssl/evp.h HAVE_OPENSSL_EVP_AES_CTR)
+    check_function_exists(EVP_aes_128_ctr HAVE_OPENSSL_EVP_AES_CTR)

     set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
     set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
-    check_symbol_exists(EVP_aes_128_cbc openssl/evp.h HAVE_OPENSSL_EVP_AES_CBC)
+    check_function_exists(EVP_aes_128_cbc HAVE_OPENSSL_EVP_AES_CBC)

 endif()


Updated how snprintf and vsnprintf are discovered by cmake. Visual studio 2015 now include it in the file stdio.h. More information here : https://msdn.microsoft.com/en-us/library/bb531344.aspx

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -120,8 +120,14 @@

 check_function_exists(isblank HAVE_ISBLANK)
 check_function_exists(strncpy HAVE_STRNCPY)
-check_function_exists(vsnprintf HAVE_VSNPRINTF)
-check_function_exists(snprintf HAVE_SNPRINTF)
+
+if(MSVC14)
+	check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF)
+	check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)
+else(MSVC14)
+	check_function_exists(vsnprintf HAVE_VSNPRINTF)
+	check_function_exists(snprintf HAVE_SNPRINTF)
+endif(MSVC14)

 if (WIN32)
     check_function_exists(_strtoui64 HAVE__STRTOUI64)


Added new files to files.cmake

Added new files to files.cmake

--- Core/Code/files.cmake
+++ Core/Code/files.cmake
@@ -309,7 +309,7 @@
   Rendering/mitkGradientBackground.cpp
   Rendering/mitkManufacturerLogo.cpp
   Rendering/mitkMapper.cpp
-  Rendering/mitkPointSetGLMapper2D.cpp
+  Rendering/mitkPointSetVtkMapper2D.cpp
   Rendering/mitkPointSetVtkMapper3D.cpp
   Rendering/mitkPolyDataGLMapper2D.cpp
   Rendering/mitkSurfaceGLMapper2D.cpp


test_cc bug in usecyclus

test_cc bug in usecyclus

--- CMake/UseCyclus.cmake
+++ CMake/UseCyclus.cmake
@@ -176,11 +176,12 @@
       COMMENT "Copying ${CCTIN} to ${CCTOUT}."
       )
     SET(
-      "${lib_root}_Test_CC"
+      "${lib_root}_TEST_CC"
       "${CCOUT}"
       "${CCTOUT}"
       CACHE INTERNAL "Agent test source" FORCE
       )
+
     ADD_LIBRARY(${lib_root}Tests ${${lib_root}_Test_CC})
     TARGET_LINK_LIBRARIES(${lib_root}Tests dl cycluscore ${CYCLUS_GTEST_LIBRARIES})
     SET_TARGET_PROPERTIES(${lib_root}Tests PROPERTIES LINKER_LANGUAGE C)


Undo comment stacking.

Undo comment stacking.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -9,6 +9,7 @@
 include(TestFloatFormat)

 # Check if the size of numeric types are suitable.
+
 check_type_size("short" SIZEOF_SHORT)
 if(NOT ${SIZEOF_SHORT} EQUAL 2)
   message(FATAL_ERROR "TagLib requires that short is 16-bit wide.")
@@ -40,6 +41,7 @@
 endif()

 # Determine the CPU byte order.
+
 test_big_endian(IS_BIG_ENDIAN)

 if(NOT IS_BIG_ENDIAN)
@@ -49,6 +51,7 @@
 endif()

 # Check if the format of floating point types are suitable.
+
 test_float_format(FP_IEEE754)
 if(${FP_IEEE754} EQUAL 1)
   set(FLOAT_BYTEORDER 1)
@@ -59,6 +62,7 @@
 endif()

 # Determine which kind of atomic operations your compiler supports.
+
 check_cxx_source_compiles("
   #include <atomic>
   int main() {
@@ -202,6 +206,7 @@
 endif()

 # Determine whether your compiler supports some safer version of sprintf.
+
 check_cxx_source_compiles("
   #include <cstdio>
   int main() {
@@ -223,6 +228,7 @@
 endif()

 # Check for libz using the cmake supplied FindZLIB.cmake
+
 if(NOT ZLIB_SOURCE)
   find_package(ZLIB)
   if(ZLIB_FOUND)


Make aiur submit js coverage xml

Make aiur submit js coverage xml

--- cmake/aiur_nightly_js_coverage.cmake
+++ cmake/aiur_nightly_js_coverage.cmake
@@ -15,10 +15,9 @@
 set(CTEST_BUILD_NAME "Linux-master-nightly-js-cov")
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")

-
-file(RENAME "${CTEST_BINARY_DIRECTORY}/../coverage.xml" "${CTEST_BINARY_DIRECTORY}/coverage.xml")
 ctest_start("Nightly")
 ctest_configure()
+file(RENAME "${CTEST_BINARY_DIRECTORY}/../coverage.xml" "${CTEST_BINARY_DIRECTORY}/coverage.xml")
 ctest_coverage()
 file(REMOVE "${CTEST_BINARY_DIRECTORY}/coverage.xml")
 ctest_submit()


cmake: Removed trailing spaces on CompilerWarnings.cmake.

--- cmake/modules/CompilerWarnings.cmake
+++ cmake/modules/CompilerWarnings.cmake
@@ -21,7 +21,7 @@
             set(warning_flags "${warning_flags} -W${flag}")
         endif( ${${flag}_${lang}_result} )
     endforeach(flag ${desirable_flags})
-
+
     check_lang_compiler_flag(${lang} -Werror error_${lang}_result)
     if(${error_${lang}_result})
         set(error_flags "-Werror")
@@ -43,11 +43,11 @@
     else(${DISABLE_WERROR} STREQUAL ON)
         set(enable_werror 1)
     endif(${DISABLE_WERROR} STREQUAL ON)
-
+
     if(${werror_by_default} AND ${enable_werror})
         set(${ret} "${warning_flags} ${error_flags}")
     else(${werror_by_default} AND ${enable_werror})
         set(${ret} "${warning_flags}")
     endif(${werror_by_default} AND ${enable_werror})

-endmacro(compiler_warnings ret lang werror_by_default desirable_flags undesirable_flags)+endmacro(compiler_warnings ret lang werror_by_default desirable_flags undesirable_flags)


Updated FindTelepathyQt4.cmake to require latest TelepathyQt4 and use pkg-config.

svn path=/trunk/playground/network/telepathy-accounts-kcm/; revision=1001400

--- cmake/modules/FindTelepathyQt4.cmake
+++ cmake/modules/FindTelepathyQt4.cmake
@@ -1,28 +1,39 @@
-# Try to find the Qt binding of the Telepathy library
-# TELEPATHY_QT_FOUND - system has Telepathy-Qt
-# TELEPATHY_QT_INCLUDE_DIR - the Telepathy-Qt include directory
-# TELEPATHY_QT_LIBRARIES - Link these to use Telepathy-Qt
+# Try to find the Qt4 binding of the Telepathy library
+# TELEPATHY_QT4_FOUND - system has TelepathyQt4
+# TELEPATHY_QT4_INCLUDE_DIR - the TelepathyQt4 include directory
+# TELEPATHY_QT4_LIBRARIES - Link these to use TelepathyQt4

 # Copyright (c) 2008, Allen Winter <winter@kde.org>
+# Copyright (c) 2009, Andre Moreira Magalhaes <andrunko@gmail.com>
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

-set (TELEPATHY_QT4_FIND_REQUIRED ${TelepathyQt4_FIND_REQUIRED})
-if (TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
+set(TELEPATHY_QT4_FIND_REQUIRED ${TelepathyQt4_FIND_REQUIRED})
+if(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
   # Already in cache, be silent
-  set (TELEPATHY_QT4_FIND_QUIETLY TRUE)
-endif (TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
+  set(TELEPATHY_QT4_FIND_QUIETLY TRUE)
+endif(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)

-find_path (TELEPATHY_QT4_INCLUDE_DIR
-          NAMES TelepathyQt4/Client/Channel TelepathyQt4/Client/Connection TelepathyQt4/Types
-          PATHS ${CMAKE_INSTALL_PREFIX}/include/telepathy-1.0
-)
-find_library (TELEPATHY_QT4_LIBRARIES
-             NAMES telepathy-qt4
-             PATHS ${CMAKE_INSTALL_PREFIX}/lib
+find_package(PkgConfig)
+if(PKG_CONFIG_FOUND)
+    pkg_check_modules(PC_TELEPATHY_QT4 QUIET TelepathyQt4>=0.1.8)
+endif(PKG_CONFIG_FOUND)
+
+find_path(TELEPATHY_QT4_INCLUDE_DIR
+          NAMES TelepathyQt4/Types
+          HINTS
+          ${PC_TELEPATHY_QT4_INCLUDEDIR}
+          ${PC_TELEPATHY_QT4_INCLUDE_DIRS}
 )

-include (FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS (TELEPATHY_QT4 DEFAULT_MSG
-                                   TELEPATHY_QT4_LIBRARIES TELEPATHY_QT4_INCLUDE_DIR)
+find_library(TELEPATHY_QT4_LIBRARIES
+             NAMES telepathy-qt4
+             HINTS
+             ${PC_TELEPATHY_QT4_LIBDIR}
+             ${PC_TELEPATHY_QT4_LIBRARY_DIRS}
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(TELEPATHY_QT4 DEFAULT_MSG
+                                  TELEPATHY_QT4_LIBRARIES TELEPATHY_QT4_INCLUDE_DIR)


port-to-0.9: Remove deprecated Find file

--- cmake/modules/FindTelepathyQt4.cmake
+++ cmake/modules/FindTelepathyQt4.cmake
@@ -1,43 +0,0 @@
-# Try to find the Qt4 binding of the Telepathy library
-# TELEPATHY_QT4_FOUND - system has TelepathyQt4
-# TELEPATHY_QT4_INCLUDE_DIR - the TelepathyQt4 include directory
-# TELEPATHY_QT4_LIBRARIES - Link these to use TelepathyQt4
-
-# Copyright (c) 2008, Allen Winter <winter@kde.org>
-# Copyright (c) 2009, Andre Moreira Magalhaes <andrunko@gmail.com>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-set(TELEPATHY_QT4_FIND_REQUIRED ${TelepathyQt4_FIND_REQUIRED})
-if(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
-  # Already in cache, be silent
-  set(TELEPATHY_QT4_FIND_QUIETLY TRUE)
-endif(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
-
-find_package(PkgConfig)
-if(PKG_CONFIG_FOUND)
-    if (TelepathyQt4_FIND_VERSION_EXACT)
-        pkg_check_modules(PC_TELEPATHY_QT4 QUIET TelepathyQt4=${TelepathyQt4_FIND_VERSION})
-    else (TelepathyQt4_FIND_VERSION_EXACT)
-        pkg_check_modules(PC_TELEPATHY_QT4 QUIET TelepathyQt4>=${TelepathyQt4_FIND_VERSION})
-    endif (TelepathyQt4_FIND_VERSION_EXACT)
-endif(PKG_CONFIG_FOUND)
-
-find_path(TELEPATHY_QT4_INCLUDE_DIR
-          NAMES TelepathyQt4/Types
-          HINTS
-          ${PC_TELEPATHY_QT4_INCLUDEDIR}
-          ${PC_TELEPATHY_QT4_INCLUDE_DIRS}
-)
-
-find_library(TELEPATHY_QT4_LIBRARIES
-             NAMES telepathy-qt4
-             HINTS
-             ${PC_TELEPATHY_QT4_LIBDIR}
-             ${PC_TELEPATHY_QT4_LIBRARY_DIRS}
-)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(TELEPATHY_QT4 DEFAULT_MSG
-                                  TELEPATHY_QT4_LIBRARIES TELEPATHY_QT4_INCLUDE_DIR)


[root7] Root7 only compiles with C++17.

[root7] Root7 only compiles with C++17.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -323,7 +323,7 @@
 endforeach()

 #---ROOT 7 requires C++14 standard or higher---------------------------------------------------
-if(NOT CMAKE_CXX_STANDARD GREATER 11)
+if(NOT CMAKE_CXX_STANDARD GREATER 14)
   set(root7_defvalue OFF)
 endif()

@@ -340,10 +340,10 @@

 if(root7)
   if(NOT CMAKE_CXX_STANDARD)
-    set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++14 standard used with root7")
-    message(STATUS "Enabling C++14 for compilation of root7 components")
-  elseif(NOT CMAKE_CXX_STANDARD GREATER 11)
-    message(FATAL_ERROR ">>> At least C++14 standard required with root7, please enable it using CMake option: -DCMAKE_CXX_STANDARD=14")
+    set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++17 standard used with root7")
+    message(STATUS "Enabling C++17 for compilation of root7 components")
+  elseif(NOT CMAKE_CXX_STANDARD GREATER 14)
+    message(FATAL_ERROR ">>> At least C++17 standard required with root7, please enable it using CMake option: -DCMAKE_CXX_STANDARD=14")
   endif()
 endif()


Fixing bug #82873 (C.H.Christensen)

Fixing bug #82873 (C.H.Christensen)

--- cmake/ALICE_CMake.cmake
+++ cmake/ALICE_CMake.cmake
@@ -266,6 +266,7 @@

   ALICE_SetPackageVariable(PEDEFINE "EDEFINE" "${EDEFINE}" "${EDEFINE}")
   ALICE_SetPackageVariable(PEXPORT "EXPORT" "${EXPORT}" "${EXPORT}")
+  message(${CMAKE_INCLUDE_EXPORT_DIRECTORY})
   ALICE_SetPackageVariable(PEXPORTDEST "EXPORTDEST" "${CMAKE_INCLUDE_EXPORT_DIRECTORY}" "${CMAKE_INCLUDE_EXPORT_DIRECTORY}")
   ALICE_SetPackageVariable(PINC "INC" "${EINCLUDE};${MODULE}" "${EINCLUDE};${MODULE}")
   ALICE_SetPackageVariable(PELIBS "ELIBS" "${ELIBS}" "${ELIBS}")
@@ -327,7 +328,7 @@

 macro(ALICE_BuildModule)

-  add_definitions(-D_MODULE="${MODULE}")
+  add_definitions(-D_MODULE_="${MODULE}")
   foreach(PACKAGEFILE ${PACKAGES})
       set(lib)
       set(bin)


MAINT: fix linking errors with third-party libraries.

--- cmake/FindDO_Sara.cmake
+++ cmake/FindDO_Sara.cmake
@@ -202,9 +202,13 @@
             find_library(${IMAGE_IO_LIB}_RELEASE_LIBRARY
               NAMES ${IMAGE_IO_LIB}
               PATHS "C:/Program Files/DO-Sara/lib")
-            set(${IMAGE_IO_LIB}_LIBRARY
-              debug ${${IMAGE_IO_LIB}_DEBUG_LIBRARY}
-              optimized ${${IMAGE_IO_LIB}_RELEASE_LIBRARY})
+            if (DO_USE_STATIC_LIBS)
+              set(${IMAGE_IO_LIB}_LIBRARY
+                debug ${${IMAGE_IO_LIB}_DEBUG_LIBRARY}
+                optimized ${${IMAGE_IO_LIB}_RELEASE_LIBRARY})
+            elseif (NOT ${IMAGE_IO_LIB}_DEBUG_LIBRARY)
+              set(${IMAGE_IO_LIB}_LIBRARY ${${IMAGE_IO_LIB}_RELEASE_LIBRARY})
+            endif ()
           else ()
             find_package(JPEG REQUIRED)
             find_package(PNG REQUIRED)


BUG: Fix finding of JsonCpp_INCLUDE_DIRS.

Since the upstream JsonCpp does not yet have a jsoncpp-config.cmake, it has
difficulty finding the the include directory and libraries. The
FindJsonCpp.cmake module would fail with a system 0.5 JsonCpp installed
because it would find the wrong version when a build tree version was
intended.

We make sure the hint derived from JsonCpp_DIR looks in the source directory
instead of the build directory.

--- cmake/FindJsonCpp.cmake
+++ cmake/FindJsonCpp.cmake
@@ -22,16 +22,20 @@
 ##############################################################################

 if( JsonCpp_DIR )
-  set( JsonCpp_INCLUDEDIR ${JsonCpp_DIR}/include )
-  set( JsonCpp_LIBDIR ${JsonCpp_DIR}/lib )
+  if( EXISTS ${JsonCpp_DIR}/CMakeCache.txt )
+    file( STRINGS ${JsonCpp_DIR}/CMakeCache.txt _source_dir_def REGEX "jsoncpp_SOURCE_DIR" )
+    string( REGEX REPLACE "[^=]+[=]" "" _source_dir "${_source_dir_def}" )
+    set( _jsoncpp_include_dir "${_source_dir}/include" )
+  endif()
+  set( _jsoncpp_library ${JsonCpp_DIR}/lib )
 endif( JsonCpp_DIR )

 find_path( JsonCpp_INCLUDE_DIR NAMES json/json.h
-  HINTS ${JsonCpp_INCLUDEDIR}
+  HINTS ${_jsoncpp_include_dir}
   PATH_SUFFIXES jsoncpp )

 find_library( JsonCpp_LIBRARY NAMES jsoncpp libjsoncpp
-  HINTS ${JsonCpp_LIBDIR} )
+  HINTS ${_jsoncpp_library} )

 set( JsonCpp_INCLUDE_DIRS ${JsonCpp_INCLUDE_DIR} )
 set( JsonCpp_LIBRARIES ${JsonCpp_LIBRARY} )


Increased the required opencv version to 2.1

--- cmake/ROCSExtDeps.cmake
+++ cmake/ROCSExtDeps.cmake
@@ -126,8 +126,8 @@
 	if(OpenCV_FOUND)
 		# Found it!
 		# Test version
-		if(OpenCV_VERSION LESS 2)
-			message(FATAL_ERROR "OpenCV library found, but the version is smaller than 2.0.")
+		if(OpenCV_VERSION LESS 2.1)
+			message(FATAL_ERROR "OpenCV library found, but the version is smaller than 2.1.")
 		endif(OpenCV_VERSION LESS 2)
 		# Set includes/libraries
 		include_directories(${OpenCV_INCLUDE_DIRS}/.. ${OpenCV_INCLUDE_DIRS})


Preview CMAKE_GENERATOR variable.

Preview CMAKE_GENERATOR variable.

--- cmake/TbagPreview.cmake
+++ cmake/TbagPreview.cmake
@@ -56,6 +56,9 @@
     tbag_preview__print ("")

     tbag_preview__print_os ()
+    tbag_preview__print ("")
+
+    tbag_preview__print_variable (CMAKE_GENERATOR)
     tbag_preview__print ("")

     tbag_preview__print_variable (CMAKE_HOST_SYSTEM_NAME)


Specicy ZLIB_INCLUDE_DIRS as include directories

--- cmake/custom/cnpy.cmake
+++ cmake/custom/cnpy.cmake
@@ -1,4 +1,5 @@
 find_package(ZLIB REQUIRED)
+include_directories(SYSTEM ${ZLIB_INCLUDE_DIRS})

 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)


Message tweak.

Message tweak.

svn path=/trunk/; revision=6885

--- cmake/modules/gcw.cmake
+++ cmake/modules/gcw.cmake
@@ -30,7 +30,7 @@
 if(PLD_gcw)
   if(NOT PKGCONFIG_EXECUTABLE)
     message(STATUS
-    "WARNING: pkg-config not found. Setting PLD_gcw and ENABLE_pygcw to OFF"
+    "WARNING: pkg-config not found. Setting PLD_gcw and ENABLE_pygcw to OFF."
     )
     set(PLD_gcw OFF CACHE BOOL "Enable gcw device" FORCE)
     set(ENABLE_pygcw OFF)


fix the GTest with catkin again

fix the GTest with catkin again

--- cmake/tools/gtest.cmake
+++ cmake/tools/gtest.cmake
@@ -34,9 +34,15 @@
 set(GTEST_FOUND ${GTEST_FOUND} CACHE INTERNAL "")
 if(NOT GTEST_FOUND)
   if (EXISTS "/usr/src/gtest")
+    message(INFO "Building GTest from source.")
     # for now, this would only work on Ubuntu
     add_subdirectory("/usr/src/gtest/" ${CMAKE_BINARY_DIR}/gtest)
     set(CATKIN_GTEST_SRC_FOUND TRUE)
+    set(GTEST_LIBRARIES "gtest;gtest_main")
+    find_path(GTEST_INCLUDE_DIRS gtest/gtest.h)
+    set(GTEST_MAIN_LIBRARIES ${GTEST_LIBRARIES})
+    set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES})
+    set(GTEST_FOUND TRUE)
   else()
     message(WARNING "GTest not found; C++ tests will fail to build.")
   endif()


Improve error-message if med.h is not found in CMake, and write all commands in upper case, following the common syntax

--- cMake/FindMEDFile.cmake
+++ cMake/FindMEDFile.cmake
@@ -41,10 +41,10 @@
 ENDIF(MEDFILE_ROOT_DIR)

 FIND_PATH(MEDFILE_INCLUDE_DIRS med.h PATH_SUFFIXES med)
-find_file(meddotH med.h PATHS ${MEDFILE_INCLUDE_DIRS} NO_DEFAULT_PATH)
-if(NOT meddotH)
-  message( FATAL_ERROR "med.h not found in an error message above.")
-endif()
+FIND_FILE(meddotH med.h PATHS ${MEDFILE_INCLUDE_DIRS} NO_DEFAULT_PATH)
+IF(NOT meddotH)
+	MESSAGE(FATAL_ERROR "med.h not found, please install development header-files for libmedc")
+ENDIF(NOT meddotH)
 #FIND_PROGRAM(MDUMP mdump)
 FIND_LIBRARY(MEDFILE_C_LIBRARIES NAMES medC)
 FIND_LIBRARY(MEDFILE_F_LIBRARIES NAMES med)


COMP: Fix centOS build for libexpat, install it in lib instead of lib64

--- SuperBuild/CMake/External_expat.cmake
+++ SuperBuild/CMake/External_expat.cmake
@@ -34,6 +34,7 @@
   -DBUILD_examples:BOOL=OFF
   -DBUILD_tests:BOOL=OFF
   -DBUILD_tools:BOOL=OFF
+  -DCMAKE_INSTALL_LIBDIR:STRING=lib
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}
   LOG_DOWNLOAD 1
   LOG_CONFIGURE 1


Remove GIT_SUBMODULES from build_gtest. Not supported on older Cmake

--- CMakeModules/build_gtest.cmake
+++ CMakeModules/build_gtest.cmake
@@ -12,7 +12,6 @@
 # Add gtest
 ExternalProject_Add(
     googletest
-    GIT_SUBMODULES test/gtest
     SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../test/gtest"
     TIMEOUT 10
     CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}


Install wheel package to venv for packaging

--- Wrapping/Python/LegacyPackaging.cmake
+++ Wrapping/Python/LegacyPackaging.cmake
@@ -101,7 +101,7 @@

   add_custom_command( TARGET PythonVirtualEnv
     POST_BUILD
-    COMMAND "${VIRTUAL_PYTHON_EXECUTABLE}" -m pip install numpy
+    COMMAND "${VIRTUAL_PYTHON_EXECUTABLE}" -m pip install numpy wheel
 )
 endif()


BUG: wrong cmake variable with libpng

BUG: wrong cmake variable with libpng

--- CMake/External_libpng.cmake
+++ CMake/External_libpng.cmake
@@ -4,7 +4,7 @@

 set(DEFAULT_USE_SYSTEM_PNG  ON)

-option(USE_SYSTEM_PNG "  Use a system build of libtiff." ${DEFAULT_USE_SYSTEM_TIFF})
+option(USE_SYSTEM_PNG "  Use a system build of libtiff." ${DEFAULT_USE_SYSTEM_PNG})
 mark_as_advanced(USE_SYSTEM_PNG)

 if(USE_SYSTEM_PNG)


BUG: Propagate C++11 requirements to external project

This follows the protocol identified in VTK for
enforcing C++11 feature capabilities of compilers
that build against this version of ITK.

Change-Id: I7daa1f4cd9d470be865bbc7eb830274707229530

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -464,6 +464,16 @@
     set(_LIBRARY_BUILD_TYPE)
   endif()
   add_library(${_name} ${_LIBRARY_BUILD_TYPE} ${ARGN})
+  target_compile_features(${_name} PUBLIC cxx_nullptr
+                                          cxx_override
+                                          cxx_constexpr
+                                          cxx_range_for
+                                          cxx_rvalue_references
+                                          cxx_static_assert
+                                          cxx_strong_enums
+                                          cxx_lambdas
+                                          cxx_noexcept
+                                          cxx_alias_templates )
   itk_module_link_dependencies()
   itk_module_target(${_name})
 endmacro()


Using quotes in the string operations

Using quotes in the string operations

--- cmake/ALICE_CMake.cmake
+++ cmake/ALICE_CMake.cmake
@@ -22,7 +22,7 @@

 function(ALICE_CleanOutput _output input)

-  string(REGEX REPLACE "\n" " " clean ${input})
+  string(REGEX REPLACE "\n" " " clean "${input}")
   set(${_output} ${clean} PARENT_SCOPE)

 endfunction(ALICE_CleanOutput)
@@ -32,11 +32,11 @@
   set(corrected)
   foreach(path ${value})
     set(external)
-    string(REGEX MATCH "^/" external ${path})
+    string(REGEX MATCH "^/" external "${path}")
     if(NOT external)
       list(APPEND corrected "${CMAKE_SOURCE_DIR}/${path}" )
     else()
-      list(APPEND corrected ${path})
+      list(APPEND corrected "${path}")
     endif(NOT external)
   endforeach(path)
   set(${_output} ${corrected} PARENT_SCOPE)
@@ -50,10 +50,10 @@
   foreach(arg ${input})
     set(item ${arg})
     if(prefix)
-      string(REGEX MATCH "^${prefix}" pre ${arg})
+      string(REGEX MATCH "^${prefix}" pre "${arg}")
     endif(prefix)
     if(suffix)
-      string(REGEX MATCH "${suffix}$" suf ${arg})
+      string(REGEX MATCH "${suffix}$" suf "${arg}")
     endif(suffix)
     if(NOT pre)
       set(item "${prefix}${item}")
@@ -72,7 +72,7 @@
   set(format)
   foreach(arg ${input})
     set(item ${arg})
-    string(REGEX MATCH "^(/|-)" preformatted ${item})
+    string(REGEX MATCH "^(/|-)" preformatted "${item}")
     if(NOT preformatted)
       set(item "-l${item}")
     endif(NOT preformatted)
@@ -120,12 +120,12 @@
   if(ALIDEBUG STREQUAL "YES")
     set(ALICE_TARGET ${ALICE_TARGET}DEBUG)
     message("Befor ${CXXFLAGS}")
-    string(REGEX MATCHALL "-O[^ ]*" FFLAGS ${FFLAGS})
-    string(REGEX MATCHALL "-O[^ ]*" CXXFLAGS ${CXXFLAGS})
+    string(REGEX MATCHALL "-O[^ ]*" FFLAGS "${FFLAGS}")
+    string(REGEX MATCHALL "-O[^ ]*" CXXFLAGS "${CXXFLAGS}")
     message("After ${CXXFLAGS}")
-    string(REGEX MATCHALL "-O[^ ]*" CFLAGS ${CFLAGS})
-    string(REGEX MATCHALL "-O[^ ]*" SOFLAGS ${SOFLAGS})
-    string(REGEX MATCHALL "-O[^ ]*" LDFLAGS ${LDFLAGS})
+    string(REGEX MATCHALL "-O[^ ]*" CFLAGS "${CFLAGS}")
+    string(REGEX MATCHALL "-O[^ ]*" SOFLAGS "${SOFLAGS}")
+    string(REGEX MATCHALL "-O[^ ]*" LDFLAGS "${LDFLAGS}")
     set(FFLAGS "-g ${FFLAGS}")
     set(CXXFLAGS "-g ${CXXFLAGS}")
     set(CFLAGS "-g ${CFLAGS}")
@@ -346,10 +346,10 @@
   foreach(PACKAGEFILE ${PACKAGES})
       set(lib)
       set(bin)
-      string(REGEX MATCH "CMakelib" lib ${PACKAGEFILE})
-      string(REGEX MATCH "CMakebin" bin ${PACKAGEFILE})
+      string(REGEX MATCH "CMakelib" lib "${PACKAGEFILE}")
+      string(REGEX MATCH "CMakebin" bin "${PACKAGEFILE}")
       get_filename_component(PACKAGE ${PACKAGEFILE} NAME)
-      string(REGEX REPLACE "^CMake(lib|bin)(.*)\\.pkg" "\\2" PACKAGE ${PACKAGE})
+      string(REGEX REPLACE "^CMake(lib|bin)(.*)\\.pkg" "\\2" PACKAGE "${PACKAGE}")
       if(ALICEDEV)
         message("Adding package ${PACKAGE} in ${MODULE}")
       endif(ALICEDEV)


MOD: Added cmake project dependencies of SampleFramework to the Sample projects

--HG--
branch : sample-framework-devel

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -336,11 +336,15 @@
 # Define a CEGUI sample app
 #
 macro (cegui_add_sample _NAME)
+    add_dependencies(${CEGUI_TARGET_NAME} ${CEGUI_SAMPLEFRAMEWORK_EXENAME}
+                            ${CEGUI_TARGET_NAME} ${_NAME}${CEGUI_SLOT_VERSION}
+    )
+
     set (CEGUI_TARGET_NAME ${_NAME}${CEGUI_SLOT_VERSION})

     include_directories(${CMAKE_SOURCE_DIR}/samples/common/include)

-
+

     if (CEGUI_SAMPLES_USE_DIRECT3D9 OR CEGUI_SAMPLES_USE_DIRECT3D10 OR CEGUI_SAMPLES_USE_DIRECT3D11)
         link_directories(${DIRECTXSDK_LIBRARY_DIR})
@@ -352,6 +356,9 @@
 		${CMAKE_SOURCE_DIR}/samples/common/include/Sample.h
 		${CMAKE_SOURCE_DIR}/samples/common/include/SampleBase.h
 	)
+
+
+

     ###########################################################################
     #                   Dynamically Linked Library


MOD: Don't version the demo executables.

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -60,7 +60,6 @@
     endif()

     add_executable(${CEGUI_TARGET_NAME} ${CORE_SOURCE_FILES} ${CORE_HEADER_FILES})
-    set_target_properties(${CEGUI_TARGET_NAME} PROPERTIES VERSION ${CEGUI_VERSION})

     # append the _d (or whatever) for debug builds as needed.
     if (CEGUI_HAS_BUILD_SUFFIX AND CEGUI_BUILD_SUFFIX)


use directory-based include_directories command if we build with CUDA

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -94,7 +94,7 @@
       list(APPEND __params "${dir}")
     endif()
   endforeach()
-  if(CMAKE_VERSION VERSION_LESS 2.8.11)
+  if(HAVE_CUDA OR CMAKE_VERSION VERSION_LESS 2.8.11)
     include_directories(${__params})
   else()
     if(TARGET ${target})


re-enable accidentally disabled legacy libshogun tests

--- cmake/ShogunUtils.cmake
+++ cmake/ShogunUtils.cmake
@@ -119,6 +119,7 @@
 	IF(SANITIZER_FLAGS)
 		set_target_properties(${EXAMPLE} PROPERTIES COMPILE_FLAGS ${SANITIZER_FLAGS})
 	ENDIF()
+    add_test(libshogun-${EXAMPLE} ${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE})

 	# Add examples to the dependencies of modular interfaces to make sure
 	# nothing will infer with them being build single-threaded.


update path to cppunit

update path to cppunit

--- cmake/findCppUnit.cmake
+++ cmake/findCppUnit.cmake
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.8)

-set(CPPUNIT_ROOT_DIR ./cppunit/)
+set(CPPUNIT_ROOT_DIR ../cppunit/)

 get_filename_component(CPPUNIT_INCLUDE_DIR ${CPPUNIT_ROOT_DIR}include ABSOLUTE)
 include_directories(${CPPUNIT_INCLUDE_DIR})


Put in additional version numbers in gnat library search in anticipation
of future version changes.

svn path=/trunk/; revision=7426

--- cmake/modules/ada.cmake
+++ cmake/modules/ada.cmake
@@ -26,7 +26,7 @@
 endif(DEFAULT_NO_BINDINGS)

 if(ENABLE_ada)
-  find_library(GNAT_LIB NAMES gnat gnat-4.1)
+  find_library(GNAT_LIB NAMES gnat gnat-4.1 gnat-4.2 gnat-4.3)
   if(NOT GNAT_LIB)
     message(STATUS "WARNING: "
       "gnat library not found. Disabling ada bindings")


cmake: Fix how usage finds board names

cmake: Fix how usage finds board names

We had been search for <BOARD>.yaml, however its possible that doesn't
match anything and we actually use <BOARD>_defconfig in
boilerplate.cmake.  So search for *_defconfig instead of *.yaml to
generate the <BOARD> list.

Signed-off-by: Kumar Gala <a5e5248af4cd4f0ed8c515f61d40a6e2db46a66e@linaro.org>

--- cmake/usage/usage.cmake
+++ cmake/usage/usage.cmake
@@ -20,21 +20,21 @@
   foreach(root ${BOARD_ROOT})
     set(board_arch_dir ${root}/boards/${arch})

-    # Match the .yaml files in the board directories to make sure we are
-    # finding boards, e.g. qemu_xtensa/qemu_xtensa.yaml
-    file(GLOB_RECURSE yamls_for_${arch}
+    # Match the _defconfig files in the board directories to make sure we are
+    # finding boards, e.g. qemu_xtensa/qemu_xtensa_defconfig
+    file(GLOB_RECURSE defconfigs_for_${arch}
       RELATIVE ${board_arch_dir}
-      ${board_arch_dir}/*.yaml
+      ${board_arch_dir}/*_defconfig
       )

     # The above gives a list like
-    # nrf51_blenano/nrf51_blenano_yaml;nrf51_pca10028/nrf51_pca10028_yaml
-    # we construct a list of board names by removing both the .yaml
+    # nrf51_blenano/nrf51_blenano_defconfig;nrf51_pca10028/nrf51_pca10028_defconfig
+    # we construct a list of board names by removing both the _defconfig
     # suffix and the path.
     set(boards_for_${arch} "")
-    foreach(yaml_path ${yamls_for_${arch}})
-      get_filename_component(board ${yaml_path} NAME_WE)
-
+    foreach(defconfig_path ${defconfigs_for_${arch}})
+      get_filename_component(board ${defconfig_path} NAME)
+      string(REPLACE "_defconfig" "" board "${board}")
       list(APPEND boards_for_${arch} ${board})
     endforeach()
   endforeach()


[BUILD] Add USES_TERMINAL to targets

[BUILD] Add USES_TERMINAL to targets

Custom commands that require user input (e.g. sudo) will hang waiting
for input when using ninja, unless USES_TERMINAL is passed to
add_custom_command. This patch adds the USES_TERMINAL argument to
prevent such hangs.

--- scripts/cmake/targets.cmake
+++ scripts/cmake/targets.cmake
@@ -111,6 +111,7 @@
     COMMAND ${CMAKE_COMMAND} -E remove_directory ${BF_BUILD_INSTALL_DIR}
     COMMAND ${CMAKE_COMMAND} -E remove_directory ${BF_BUILD_DEPENDS_DIR}
     COMMENT "Cleaning build tree, removing all dependencies, and removing all build artifacts"
+    USES_TERMINAL
 )
 add_custom_target_info(
     TARGET distclean
@@ -139,6 +140,7 @@
     quick
     COMMAND ${SUDO} ${BUILD_SYSROOT_OS}/bin/bfm quick
     COMMENT "Loading and starting the VMM: ${BFM_VMM_BIN_PATH}/${BFM_DEFAULT_VMM}"
+    USES_TERMINAL
 )
 add_custom_target_info(
     TARGET quick
@@ -149,6 +151,7 @@
     stop
     COMMAND ${SUDO} ${BUILD_SYSROOT_OS}/bin/bfm stop
     COMMENT "Stopping the currently loaded VMM"
+    USES_TERMINAL
 )
 add_custom_target_info(
     TARGET stop
@@ -159,6 +162,7 @@
     unload
     COMMAND ${SUDO} ${BUILD_SYSROOT_OS}/bin/bfm unload
     COMMENT "Unloading the currently loaded VMM"
+    USES_TERMINAL
 )
 add_custom_target_info(
     TARGET unload
@@ -169,6 +173,7 @@
     dump
     COMMAND ${SUDO} ${BUILD_SYSROOT_OS}/bin/bfm dump
     COMMENT "Dumping debug output from the VMM"
+    USES_TERMINAL
 )
 add_custom_target_info(
     TARGET dump
@@ -179,6 +184,7 @@
     status
     COMMAND ${SUDO} ${BUILD_SYSROOT_OS}/bin/bfm status
     COMMENT "Displaying status of the current VMM"
+    USES_TERMINAL
 )
 add_custom_target_info(
     TARGET status
@@ -198,6 +204,7 @@
     COMMAND ${CMAKE_COMMAND} --build ${BF_BUILD_DIR_BFDRIVER} --target bfdriver_build
     COMMAND ${SUDO} ${CMAKE_COMMAND} --build ${BF_BUILD_DIR_BFDRIVER} --target bfdriver_load
     COMMENT "Unloading, cleaning, building, and reloading bfdriver"
+    USES_TERMINAL
 )
 add_custom_target_info(
     TARGET driver_quick
@@ -208,6 +215,7 @@
     driver_load
     COMMAND ${SUDO} ${CMAKE_COMMAND} --build ${BF_BUILD_DIR_BFDRIVER} --target bfdriver_load
     COMMENT "Loading bfdriver to the local OS"
+    USES_TERMINAL
 )
 add_custom_target_info(
     TARGET driver_load
@@ -218,6 +226,7 @@
     driver_unload
     COMMAND ${SUDO} ${CMAKE_COMMAND} --build ${BF_BUILD_DIR_BFDRIVER} --target bfdriver_unload
     COMMENT "Unloading bfdriver from the local OS"
+    USES_TERMINAL
 )
 add_custom_target_info(
     TARGET driver_unload


Removing CDash configuration information from the branch.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,5 +0,0 @@
-# CTest/CDash configuration
-SET (CTEST_DROP_METHOD "http")
-SET (CTEST_DROP_SITE "yakov.unidata.ucar.edu/")
-SET (CTEST_DROP_LOCATION "CDash/submit.php?project=WinNETCDF")
-SET (CTEST_DROP_SITE_CDASH TRUE)


ENH: remove CTestConfig

ENH: remove CTestConfig

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,15 +0,0 @@
-## This file should be placed in the root directory of your project.
-## Then modify the CMakeLists.txt file in the root directory of your
-## project to incorporate the testing dashboard.
-## # The following are required to uses Dart and the Cdash dashboard
-##   ENABLE_TESTING()
-##   INCLUDE(Dart)
-set(CTEST_PROJECT_NAME "Hyper")
-#set(CTEST_NIGHTLY_START_TIME "20:00:00 CEST")
-
-#set(CTEST_NIGHTLY_IDENT_LOCATION "http://host2.orfeo-toolbox.org/nightly/libNightlyNumber")
-
-#set(CTEST_DROP_METHOD "http")
-#set(CTEST_DROP_SITE "dash.orfeo-toolbox.org")
-#set(CTEST_DROP_LOCATION "/submit.php?project=OTB")
-#set(CTEST_DROP_SITE_CDASH TRUE)


[t:4814] fix the thing that makes it so perf tests don't run by default

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@43213 c7de825b-a66e-492c-adef-691d508d4ae1

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -102,12 +102,12 @@

 set(perf_tests
   perf_checkpoint_var.tdb
-  perf_cursor_nop.c
-  perf_malloc_free.c
-  perf_nop.c
-  perf_ptquery.c
-  perf_ptquery2.c
-  perf_xmalloc_free.c
+  perf_cursor_nop.tdb
+  perf_malloc_free.tdb
+  perf_nop.tdb
+  perf_ptquery.tdb
+  perf_ptquery2.tdb
+  perf_xmalloc_free.tdb
   )

 ## we also don't need to run perf tests every time


refs #5127 ignore some more compiler warnings in jemalloc

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@50750 c7de825b-a66e-492c-adef-691d508d4ae1

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -226,6 +226,7 @@
   "clang: warning: unknown warning option"
   # don't complain about warnings in jemalloc source
   "jemalloc-3.2.0/src"
+  "jemalloc/internal/jemalloc_internal.h"
   # don't complain about ranlib or libtool on empty archive
   "has no symbols"
   "the table of contents is empty"


Clean up CFlagsSetup.cmake

Clean up CFlagsSetup.cmake

--- CMake/hoomd/HOOMDCFlagsSetup.cmake
+++ CMake/hoomd/HOOMDCFlagsSetup.cmake
@@ -6,11 +6,10 @@
     "MinSizeRel" "RelWithDebInfo")
 endif()

-# let cmake set the flags
+# enable c++11
 set(CMAKE_CXX_STANDARD 11)
-set (CMAKE_CUDA_STANDARD 11)
-
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CUDA_STANDARD 11)

 # Enable compiler warnings on gcc and clang (common compilers used by developers)
 if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")


Fix external.cmake

Fix external.cmake

Closes #23.

--- external/external.cmake
+++ external/external.cmake
@@ -4,4 +4,4 @@

 execute_process(COMMAND git submodule update --init -- external/debug_assert
                 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
-add_subdirectory(${CMAKE_SOURCE_DIR}/external/debug_assert)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/debug_assert)


ENH: Update EXPAT to version 2.4.1

ENH: Update EXPAT to version 2.4.1

--- SuperBuild/CMake/External_expat.cmake
+++ SuperBuild/CMake/External_expat.cmake
@@ -24,8 +24,8 @@

 ExternalProject_Add(EXPAT
   PREFIX EXPAT
-  URL "http://downloads.sourceforge.net/project/expat/expat/2.3.0/expat-2.3.0.tar.gz"
-  URL_MD5 fb89c9a3dcc1e00e0fe0d0200af692dc
+  URL "http://downloads.sourceforge.net/project/expat/expat/2.4.1/expat-2.4.1.tar.gz"
+  URL_MD5 8738ef9ed1c5dcc03207286ea84f4299
   BINARY_DIR ${EXPAT_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


changed latex script to run twice

changed latex script to run twice

--- contrib/createDoc.cmake
+++ contrib/createDoc.cmake
@@ -21,10 +21,13 @@
 	find_program(LATEX pdflatex)

 	if(LATEX)
+	    # run latex twice to fix links
 		add_custom_command(
 			OUTPUT ${PROJECT_BINARY_DIR}/doc/tixi.pdf
 			DEPENDS ${PROJECT_BINARY_DIR}/doc/latex/refman.tex
 			WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc/latex/
+			COMMAND ${LATEX}
+			ARGS ${PROJECT_BINARY_DIR}/doc/latex/refman.tex
 			COMMAND ${LATEX}
 			ARGS ${PROJECT_BINARY_DIR}/doc/latex/refman.tex
 			COMMAND ${CMAKE_COMMAND}


Ask the compiler what libcxx should be (#118)

* Ask the compiler what libcxx should be

* fix typo

* merge libc++ and libstdc++ detection functions

--- conan.cmake
+++ conan.cmake
@@ -122,7 +122,7 @@
         set(_CONAN_SETTING_COMPILER gcc)
         set(_CONAN_SETTING_COMPILER_VERSION ${COMPILER_VERSION})
         if (USING_CXX)
-            conan_cmake_detect_gnu_libcxx(_LIBCXX)
+            conan_cmake_detect_unix_libcxx(_LIBCXX)
             set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
         endif ()
     elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL AppleClang)
@@ -133,37 +133,29 @@
         set(_CONAN_SETTING_COMPILER apple-clang)
         set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
         if (USING_CXX)
-            set(_CONAN_SETTING_COMPILER_LIBCXX libc++)
+            conan_cmake_detect_unix_libcxx(_LIBCXX)
+            set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
         endif ()
     elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Clang)
         string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION})
         list(GET VERSION_LIST 0 MAJOR)
         list(GET VERSION_LIST 1 MINOR)
+        set(_CONAN_SETTING_COMPILER clang)
+        set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
         if(APPLE)
             cmake_policy(GET CMP0025 APPLE_CLANG_POLICY_ENABLED)
             if(NOT APPLE_CLANG_POLICY_ENABLED)
                 message(STATUS "Conan: APPLE and Clang detected. Assuming apple-clang compiler. Set CMP0025 to avoid it")
                 set(_CONAN_SETTING_COMPILER apple-clang)
-                set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
-            else()
-                set(_CONAN_SETTING_COMPILER clang)
-                set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
             endif()
-            if (USING_CXX)
-                set(_CONAN_SETTING_COMPILER_LIBCXX libc++)
-            endif ()
-        else()
-            set(_CONAN_SETTING_COMPILER clang)
-            if(${MAJOR} GREATER 7)
-                set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR})
-            else()
-                set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
-            endif()
-            if (USING_CXX)
-                conan_cmake_detect_gnu_libcxx(_LIBCXX)
-                set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
-            endif ()
-        endif()
+        endif()
+        if(${_CONAN_SETTING_COMPILER} STREQUAL clang AND ${MAJOR} GREATER 7)
+            set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR})
+        endif()
+        if (USING_CXX)
+            conan_cmake_detect_unix_libcxx(_LIBCXX)
+            set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
+        endif ()
     elseif(${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL MSVC)
         set(_VISUAL "Visual Studio")
         _get_msvc_ide_version(_VISUAL_VERSION)
@@ -237,35 +229,52 @@
 endfunction()

-function(conan_cmake_detect_gnu_libcxx result)
-    # Allow -D_GLIBCXX_USE_CXX11_ABI=ON/OFF as argument to cmake
-    if(DEFINED _GLIBCXX_USE_CXX11_ABI)
-        if(_GLIBCXX_USE_CXX11_ABI)
-            set(${result} libstdc++11 PARENT_SCOPE)
-            return()
-        else()
-            set(${result} libstdc++ PARENT_SCOPE)
-            return()
-        endif()
-    endif()
-
-    # Check if there's any add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
+function(conan_cmake_detect_unix_libcxx result)
+    # Take into account any -stdlib in compile options
+    get_directory_property(compile_options DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_OPTIONS)
+
+    # Take into account any _GLIBCXX_USE_CXX11_ABI in compile definitions
     get_directory_property(defines DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS)
     foreach(define ${defines})
-        if(define STREQUAL "_GLIBCXX_USE_CXX11_ABI=0")
+        if(define MATCHES "_GLIBCXX_USE_CXX11_ABI")
+            if(define MATCHES "^-D")
+                set(compile_options ${compile_options} "${define}")
+            else()
+                set(compile_options ${compile_options} "-D${define}")
+            endif()
+        endif()
+    endforeach()
+
+    execute_process(
+        COMMAND ${CMAKE_COMMAND} -E echo "#include <string>"
+        COMMAND ${CMAKE_CXX_COMPILER} -x c++ ${compile_options} -E -dM -
+        OUTPUT_VARIABLE string_defines
+    )
+
+    if(string_defines MATCHES "#define __GLIBCXX__")
+        # Allow -D_GLIBCXX_USE_CXX11_ABI=ON/OFF as argument to cmake
+        if(DEFINED _GLIBCXX_USE_CXX11_ABI)
+            if(_GLIBCXX_USE_CXX11_ABI)
+                set(${result} libstdc++11 PARENT_SCOPE)
+                return()
+            else()
+                set(${result} libstdc++ PARENT_SCOPE)
+                return()
+            endif()
+        endif()
+
+        if(string_defines MATCHES "#define _GLIBCXX_USE_CXX11_ABI 1\n")
+            set(${result} libstdc++11 PARENT_SCOPE)
+        else()
+            # Either the compiler is missing the define because it is old, and so
+            # it can't use the new abi, or the compiler was configured to use the
+            # old abi by the user or distro (e.g. devtoolset on RHEL/CentOS)
             set(${result} libstdc++ PARENT_SCOPE)
-            return()
-        endif()
-    endforeach()
-
-    # Use C++11 stdlib as default if gcc is 5.1+
-    if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.1")
-      set(${result} libstdc++ PARENT_SCOPE)
-    else()
-      set(${result} libstdc++11 PARENT_SCOPE)
-    endif()
-endfunction()
-
+        endif()
+    else()
+        set(${result} libc++ PARENT_SCOPE)
+    endif()
+endfunction()

 function(conan_cmake_detect_vs_runtime result)
     string(TOUPPER ${CMAKE_BUILD_TYPE} build_type)
@@ -516,4 +525,3 @@
     execute_process(COMMAND ${CONAN_CMD} remote add ${CONAN_NAME} ${CONAN_URL}
       ${CONAN_INDEX_ARG} -f)
 endmacro()
-


turn off -fPIC for windows, it's just generating compiler warnings about an unknown flag.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -719,9 +719,11 @@
     set(cxx_full_relro_arg "-Wl,-z,now")
 endif()

-# compiling everything with -fPIC is needed to dynamically load libraries
-# linked against libstdc++
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+if (NOT WINDOWS)
+    # compiling everything with -fPIC is needed to dynamically load libraries
+    # linked against libstdc++
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+endif()

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


misc(policy): we should not assume CMP0002 is OLD

--- Modules/ManageEnvironmentCommon.cmake
+++ Modules/ManageEnvironmentCommon.cmake
@@ -73,10 +73,3 @@
 ## Message level INFO1 (5)
 SET(MANAGE_MESSAGE_LEVEL 5 CACHE STRING "Message (Verbose) Level")

-## Perfer the files located in the the CMake module directory thne CMAKE_MODULE_PATH
-IF(POLICY CMP0017)
-    CMAKE_POLICY(GET CMP0017 Cmp0017Var)
-    IF(NOT Cmp0017Var)
-	CMAKE_POLICY(SET CMP0017 NEW)
-    ENDIF(NOT Cmp0017Var)
-ENDIF()


fix variable ownership

fix variable ownership

--- external/vigra_cmake/VigraAddDep.cmake
+++ external/vigra_cmake/VigraAddDep.cmake
@@ -209,7 +209,7 @@
   # to find_package_plus(). These variables are stored in a variable called VAD_NEW_VARS_${_VAD_NAME}, which we will
   # also remove.
   foreach(_NEWVAR ${VAD_NEW_VARS_${_VAD_NAME}})
-    if (VAD_${_NEWVAR}_RESET_OWNER STREQUAL ${_VAD_NAME})
+    if ("${VAD_${_NEWVAR}_RESET_OWNER}" STREQUAL "${_VAD_NAME}")
       unset(${_NEWVAR} CACHE)
       unset(${_NEWVAR})
     else()


cleanup and comments

cleanup and comments

--- external/vigra_cmake/VigraAddDep.cmake
+++ external/vigra_cmake/VigraAddDep.cmake
@@ -29,7 +29,7 @@
 include(CMakeParseArguments)
 include(VAD_target_properties)

-#set package name alias
+#hardcoded package name aliases (TODO put in extra file? (and allow user to provide extra overrides))
 set(_VAD_Eigen_ALIAS Eigen3)

 if(VAD_EXTERNAL_ROOT)
@@ -368,7 +368,6 @@

   # First thing, we try to read the dep properties from the VAD file, if provided.
   find_file(VAD_${_VAD_NAME}_FILE VAD_${_VAD_NAME}.cmake ${CMAKE_MODULE_PATH})
-  message("search file ${VAD_${_VAD_NAME}_FILE} - VAD_${_VAD_NAME}.cmake in ${CMAKE_MODULE_PATH}")
   if(VAD_${_VAD_NAME}_FILE)
     message(STATUS "VAD file 'VAD_${_VAD_NAME}.cmake' was found at '${VAD_${_VAD_NAME}_FILE}'. The VAD file will now be parsed.")
     include(${VAD_${_VAD_NAME}_FILE})
@@ -447,14 +446,11 @@
   endif()

   if(ARG_VAD_${_VAD_NAME}_SYSTEM)
-
-    #vad system might call find_package again...
+    # endless recursion protection vad system might call find_package again...
     string(LENGTH "${_vigra_add_dep_running_${_VAD_NAME}_ARGS}" _vad_add_dep_prot_args_len)
     list(APPEND _vigra_add_dep_running_${_VAD_NAME}_ARGS "VAD_PROT_REC_START${ARGN}VAD_PROT_REC_STOP")
     vad_system(${_VAD_NAME} ${ARG_VAD_${_VAD_NAME}_UNPARSED_ARGUMENTS})
     string(SUBSTRING "${_vigra_add_dep_running_${_VAD_NAME}_ARGS}" 0 ${_vad_add_dep_prot_args_len} _vigra_add_dep_running_${_VAD_NAME}_ARGS)
-    #set(_vigra_add_dep_running_${_VAD_NAME}_ARGS)
-

     if(VAD_${_VAD_NAME}_SYSTEM_NOT_FOUND)
       message(STATUS "Dependency ${_VAD_NAME} was not found system-wide, vigra_add_dep() will exit without marking the dependency as satisfied.")


COMP: fix handling of system zlib

COMP: fix handling of system zlib

--- SuperBuild/External_zlib.cmake
+++ SuperBuild/External_zlib.cmake
@@ -26,8 +26,15 @@
 #endif()

 # Sanity checks
-if(DEFINED ${extProjName}_DIR AND NOT EXISTS ${${extProjName}_DIR})
-  message(FATAL_ERROR "${extProjName}_DIR variable is defined but corresponds to non-existing directory (${${extProjName}_DIR})")
+if(DEFINED ${extProjName}_DIR)
+  # sometimes on subsequent configure runs, zlib_DIR will be zlib_DIR-NOTFOUND, but
+  # the zlib vars will be set properly
+  if( NOT (IS_DIRECTORY "${ZLIB_INCLUDE_DIR}" AND EXISTS "${ZLIB_LIBRARY}" ) )
+    if(NOT EXISTS ${${extProjName}_DIR})
+      message(FATAL_ERROR
+        "${extProjName}_DIR variable is defined but corresponds to non-existing directory (${${extProjName}_DIR})")
+    endif()
+  endif()
 endif()

 # Set dependency list


Protect agains double include.

Protect agains double include.

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

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/PrintVar.cmake
+++ build-aux/cmake/modules/PrintVar.cmake
@@ -10,9 +10,13 @@
 ## For comments, bug reports and feedback: http://www.urbiforge.com
 ##

+if(NOT COMMAND PRINT_VAR)
+
 # Display the value of the variables given as argument.
 macro(PRINT_VAR)
   foreach(i ${ARGV})
     message(STATUS "${i}='${${i}}'")
   endforeach(i)
 endmacro(PRINT_VAR)
+
+endif(NOT COMMAND PRINT_VAR)


added check for -msse2 flag

added check for -msse2 flag

--- cmake/CompilerOptimizations.cmake
+++ cmake/CompilerOptimizations.cmake
@@ -45,6 +45,16 @@
 endif()

+check_c_compiler_flag(-msse2 HAS_SSE2)
+check_cxx_compiler_flag(-msse2 HAS_CXX_SSE2)
+  if (HAS_SSE2)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
+endif()
+if (HAS_CXX_SSE2)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
+endif()
+
+
 check_c_compiler_flag(-fomit-frame-pointer HAS_OMIT_FRAME_POINTER)
 check_cxx_compiler_flag(-fomit-frame-pointer HAS_CXX_OMIT_FRAME_POINTER)
 if (HAS_OMIT_FRAME_POINTER)


Add binding: Reformat CMake code

Add binding: Reformat CMake code

--- cmake/Modules/LibAddBinding.cmake
+++ cmake/Modules/LibAddBinding.cmake
@@ -1,4 +1,5 @@
-include(LibAddMacros)
+include (LibAddMacros)
+# ~~~
 # QUICK INTRODUCTION:
 # > To add a binding the following steps have to be performed:
 #   - call "check_binding_included ()": this prints exclusion messages based on categories
@@ -13,7 +14,9 @@
 #     "bindings" directory. As a result this only works for CMake scripts in the
 #     "tools", "include" and "plugins" (ADDTESTING_PHASE) directories.
 #
-
+# ~~~
+
+# ~~~
 # - Adds a binding if it is included in BINDINGS and not excluded by name or
 #   category (infos/status or infos/provides from it's README.md).
 #
@@ -43,27 +46,25 @@
 #   if (IS_INCLUDED)
 #     add_subdirectory (python)
 #   endif ()
-#
+# ~~~
 function (check_binding_included BINDING_NAME OUTVARIABLE)
 	cmake_parse_arguments (ARG
-		"SILENT" # optional keywords
-		"" # one value keywords
-		"" # multi value keywords
-		${ARGN}
-	)
-
-	check_item_is_excluded (
-		IS_EXCLUDED
-		BINDINGS
-		${BINDING_NAME}
-		SUBDIRECTORY ${BINDING_NAME}
-		BASEDIRECTORY "${CMAKE_SOURCE_DIR}/src/bindings"
- 		ENABLE_PROVIDES
-		${ARGN}
-	)
+			       "SILENT" # optional keywords
+			       "" # one value keywords
+			       "" # multi value keywords
+			       ${ARGN})
+
+	check_item_is_excluded (IS_EXCLUDED
+				BINDINGS
+				${BINDING_NAME}
+				SUBDIRECTORY
+				${BINDING_NAME}
+				BASEDIRECTORY
+				"${CMAKE_SOURCE_DIR}/src/bindings"
+				ENABLE_PROVIDES
+				${ARGN})
 	if (IS_EXCLUDED)
-		if (ARG_SILENT)
-			# make sure that the exclusion message is not printed
+		if (ARG_SILENT) # make sure that the exclusion message is not printed
 			set (IS_EXCLUDED "silent")
 		endif ()
 		exclude_binding (${BINDING_NAME} ${IS_EXCLUDED})
@@ -73,7 +74,8 @@
 	endif ()
 endfunction (check_binding_included)

-#- Add a binding to list of bindings that will be built and print corresponding
+# ~~~
+# - Add a binding to list of bindings that will be built and print corresponding
 #  message.
 #
 #  add_binding (BINDING_NAME)
@@ -83,7 +85,7 @@
 #
 #  example:
 #    add_binding ("anynameyouwant")
-#
+# ~~~
 function (add_binding BINDING_NAME)
 	if (ADDED_BINDINGS)
 		set (TMP "${ADDED_BINDINGS};${BINDING_NAME}")
@@ -97,7 +99,8 @@
 	message (STATUS "Include Binding ${BINDING_NAME}")
 endfunction (add_binding)

-#- Remove a binding from the global cache
+# ~~~
+# - Remove a binding from the global cache
 #
 #  exclude_binding (name reason)
 #
@@ -114,14 +117,13 @@
 #
 # example:
 #  exclude_binding (fstab "mntent is missing")
-#
+# ~~~
 function (exclude_binding name reason)
 	cmake_parse_arguments (ARG
-		"REMOVE" # optional keywords
-		"" # one value keywords
-		"" # multi value keywords
-		${ARGN}
-	)
+			       "REMOVE" # optional keywords
+			       "" # one value keywords
+			       "" # multi value keywords
+			       ${ARGN})

 	if (NOT ${reason} STREQUAL "silent")
 		message (STATUS "Exclude Binding ${name} because ${reason}")
@@ -140,6 +142,7 @@
 	endif ()
 endfunction (exclude_binding)

+# ~~~
 # - Check if a binding will be built.
 #   Can only be used run after bindins have been processed (e.g. in
 #   ADDTESTING_PHASE of plugins)
@@ -158,7 +161,7 @@
 #   if (NOT WAS_ADDED)
 #     message (WARNING "swig_python bindings are required for testing, test deactivated")
 #   endif ()
-#
+# ~~~
 function (check_binding_was_added BINDING_NAME OUTVARIABLE)
 	list (FIND ADDED_BINDINGS ${BINDING_NAME} FINDEX)
 	if (FINDEX GREATER -1)
@@ -168,7 +171,8 @@
 	endif ()
 endfunction (check_binding_was_added)

-#- Determines if ITEM_NAME is not included from LIST by
+# ~~~
+# - Determines if ITEM_NAME is not included from LIST by
 #  explicit mention or by category
 #
 #  check_item_is_excluded (OUTVARIABLE LIST ITEM_NAME)
@@ -199,36 +203,34 @@
 # 	if (IS_EXCLUDED)
 # 		remove_something ("io_uv" ${IS_EXCLUDED})
 # 	endif ()
-#
+# ~~~
 function (check_item_is_excluded OUTVARIABLE LIST ITEM_NAME)
 	cmake_parse_arguments (ARG
-		"ENABLE_PROVIDES;NO_CATEGORIES" # optional keywords
-		"SUBDIRECTORY;BASEDIRECTORY" # one value keywords
-		"" # multi value keywords
-		${ARGN}
-	)
+			       "ENABLE_PROVIDES;NO_CATEGORIES" # optional keywords
+			       "SUBDIRECTORY;BASEDIRECTORY" # one value keywords
+			       "" # multi value keywords
+			       ${ARGN})
 	set (${OUTVARIABLE} "NO" PARENT_SCOPE)

 	list (FIND ${LIST} "-${ITEM_NAME}" FOUND_EXCLUDE_NAME)
 	if (FOUND_EXCLUDE_NAME GREATER -1)
-		set (${OUTVARIABLE} "explicitly excluded" PARENT_SCOPE)
-		# let explicit exclusion win
+		set (${OUTVARIABLE} "explicitly excluded" PARENT_SCOPE) # let explicit exclusion win

 		return ()
 	endif ()

 	list (FIND ${LIST} "${ITEM_NAME}" FOUND_NAME)
 	if (FOUND_NAME EQUAL -1)
-		set (${OUTVARIABLE} "silent" PARENT_SCOPE)
-		# maybe it is included by category
-	else ()
-		# plugin is given explicit
-		return ()
+		set (${OUTVARIABLE} "silent" PARENT_SCOPE) # maybe it is included by category
+
+	else ()
+
+		return () # plugin is given explicit
 	endif ()

 	if (ARG_NO_CATEGORIES)
-		# we are done if categories are disabled
-		return ()
+
+		return () # we are done if categories are disabled
 	endif ()

 	if (NOT ARG_BASEDIRECTORY)
@@ -240,26 +242,26 @@
 		set (README_FILE ${ARG_BASEDIRECTORY}/${ARG_SUBDIRECTORY}/README.md)
 	endif ()
 	if (NOT EXISTS ${README_FILE})
+
 		# we need README.md for extracting categories
 		message (WARNING "readme file does not exist at ${README_FILE}")
 	else ()
-		FILE(READ ${README_FILE} contents)
-		STRING (REGEX MATCH "- +infos/status *= *([-a-zA-Z0-9 ]*)" CATEGORIES "${contents}")
-		STRING (REGEX REPLACE "- +infos/status *= *([-a-zA-Z0-9 ]*)" "\\1" CATEGORIES "${CATEGORIES}")
-		STRING (REGEX REPLACE " " ";" CATEGORIES "${CATEGORIES}")
+		file (READ ${README_FILE} contents)
+		string (REGEX MATCH "- +infos/status *= *([-a-zA-Z0-9 ]*)" CATEGORIES "${contents}")
+		string (REGEX REPLACE "- +infos/status *= *([-a-zA-Z0-9 ]*)" "\\1" CATEGORIES "${CATEGORIES}")
+		string (REGEX REPLACE " " ";" CATEGORIES "${CATEGORIES}")

 		if (ARG_ENABLE_PROVIDES)
-			STRING (REGEX MATCH "- +infos/provides *= *([a-zA-Z0-9/ ]*)" PROVIDES "${contents}")
-			STRING (REGEX REPLACE "- +infos/provides *= *([a-zA-Z0-9/ ]*)" "\\1" PROVIDES "${PROVIDES}")
-			STRING (REGEX REPLACE " " ";" PROVIDES "${PROVIDES}")
+			string (REGEX MATCH "- +infos/provides *= *([a-zA-Z0-9/ ]*)" PROVIDES "${contents}")
+			string (REGEX REPLACE "- +infos/provides *= *([a-zA-Z0-9/ ]*)" "\\1" PROVIDES "${PROVIDES}")
+			string (REGEX REPLACE " " ";" PROVIDES "${PROVIDES}")
 			split_plugin_providers (PROVIDES)
 			list (APPEND CATEGORIES "${PROVIDES}")
-		endif()
-	endif()
+		endif ()
+	endif ()
 	list (APPEND CATEGORIES "ALL")

-	STRING (TOUPPER "${CATEGORIES}" CATEGORIES)
-	#message (STATUS "CATEGORIES FOUND FOR ${ITEM_NAME}: ${CATEGORIES}")
+	string (TOUPPER "${CATEGORIES}" CATEGORIES) # message (STATUS "CATEGORIES FOUND FOR ${ITEM_NAME}: ${CATEGORIES}")

 	foreach (CAT ${CATEGORIES})
 		list (FIND ${LIST} "-${CAT}" FOUND_EXCLUDE_CATEGORY)


CELIX-144: fixed a problem in the deploy macro. The macro will now first check if the provided bundle is an absolute path; the expression EXISTS has undefined behaviour when used on a non absolute path (e.g only a bundle name).

git-svn-id: 2595ac559ac7dd568b108f33b264eba7ab70070c@1625975 13f79535-47bb-0310-9956-ffa450edef68

--- cmake/cmake_celix/Packaging.cmake
+++ cmake/cmake_celix/Packaging.cmake
@@ -336,7 +336,7 @@

 	FOREACH(BUNDLE ${DEPLOY_BUNDLES})
 		SET(DEP_NAME ${DEPLOY_NAME}_${BUNDLE})
-		IF(EXISTS ${BUNDLE})  #it is a full path not a bundle name (e.g. a target)
+		IF(IS_ABSOLUTE ${BUNDLE} AND EXISTS ${BUNDLE})  #it is a full path not a bundle name (e.g. a target)
 			get_filename_component(BUNDLE_NAME ${BUNDLE} NAME_WE)
 			add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles/${BUNDLE_NAME}.zip
 				COMMAND ${CMAKE_COMMAND} -E copy ${BUNDLE}


From Brett Viren:
There is an extraneous "}" in the REFLEX_GENERATE_DICTIONARY cmake macro.

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

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -154,7 +154,7 @@
   if(IS_ABSOLUTE ${ARG_SELECTION})
     set(selectionfile ${ARG_SELECTION})
   else()
-    set(selectionfile ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SELECTION}})
+    set(selectionfile ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SELECTION})
   endif()

   set(gensrcdict ${dictionary}_dict.cpp)


-Wno-deprecated-declarations

-Wno-deprecated-declarations

Eigen 3.2.8 has a couple of these that this patch silences.

--- cmake/unix_compiler_options.cmake
+++ cmake/unix_compiler_options.cmake
@@ -1,4 +1,4 @@
-set(PDAL_COMMON_CXX_FLAGS "-Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-align -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include"
+set(PDAL_COMMON_CXX_FLAGS "-Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-align -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -Wno-deprecated-declarations -isystem /usr/local/include"
 )

 if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")


refactor(build): setting variable defaults according to newest libs version

Signed-off-by: Jason Dellaluce <20c6928ffe03623fc951bdff750fdd62eb23ea4d@gmail.com>
Co-authored-by: Federico Di Pierro <6c3e26470d5343bb7a522873746c21bb7fcc0d20@gmail.com>
Co-authored-by: Leonardo Grasso <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@leonardograsso.com>

--- cmake/modules/falcosecurity-libs.cmake
+++ cmake/modules/falcosecurity-libs.cmake
@@ -43,6 +43,10 @@
 endif()

 set(PROBE_VERSION "${FALCOSECURITY_LIBS_VERSION}")
+set(PROBE_NAME "falco")
+set(DRIVER_PACKAGE_NAME "falco")
+set(SCAP_BPF_PROBE_ENV_VAR_NAME "FALCO_BPF_PROBE")
+set(SCAP_HOST_ROOT_ENV_VAR_NAME "HOST_ROOT")

 if(NOT LIBSCAP_DIR)
   set(LIBSCAP_DIR "${FALCOSECURITY_LIBS_SOURCE_DIR}")


update(build): bump libs version

update(build): bump libs version

Signed-off-by: Jason Dellaluce <20c6928ffe03623fc951bdff750fdd62eb23ea4d@gmail.com>
Co-authored-by: Federico Di Pierro <6c3e26470d5343bb7a522873746c21bb7fcc0d20@gmail.com>
Co-authored-by: Leonardo Grasso <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@leonardograsso.com>

--- cmake/modules/falcosecurity-libs.cmake
+++ cmake/modules/falcosecurity-libs.cmake
@@ -20,8 +20,8 @@
 # default below In case you want to test against another falcosecurity/libs version just pass the variable - ie., `cmake
 # -DFALCOSECURITY_LIBS_VERSION=dev ..`
 if(NOT FALCOSECURITY_LIBS_VERSION)
-  set(FALCOSECURITY_LIBS_VERSION "4f320f32ef36738a282e0e801bb114a749f8a00c")
-  set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=2748eb22d298fdf81635f54355842bfd1a166cd1fb97083b685a50680d970607")
+  set(FALCOSECURITY_LIBS_VERSION "a743aa4ab28e4bd82c73f74be4f866911a4be0fa")
+  set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=d7d5ddffa985fb2314ac2a0841bb51c7c7cc9f3c56ef7b89adf22278d73fa810")
 endif()

 # cd /path/to/build && cmake /path/to/source


SuperBuild: use a github commit archive for shark

--- SuperBuild/CMake/External_shark.cmake
+++ SuperBuild/CMake/External_shark.cmake
@@ -16,8 +16,8 @@

   ExternalProject_Add(SHARK
     PREFIX SHARK
-    GIT_REPOSITORY "https://github.com/Shark-ML/Shark/"
-    GIT_TAG "master"
+    URL "https://github.com/Shark-ML/Shark/archive/349f29bd71c370e0f88f7fc9aa66fa5c4768fcb0.zip"
+    URL_MD5 d6e4310f943e8dda4a0151612b5c62ce
     SOURCE_DIR ${SHARK_SB_SRC}
     BINARY_DIR ${SHARK_SB_BUILD_DIR}
     INSTALL_DIR ${SB_INSTALL_PREFIX}


Detect VTK version during configure

Detect VTK version during configure

--- ANTS.cmake
+++ ANTS.cmake
@@ -65,9 +65,13 @@
    vtkImagingStencil
    vtkImagingGeneral
    vtkRenderingAnnotation
-   vtkRenderingVolumeOpenGL
- #   vtkRenderingVolumeOpenGL2 # VTK7
    )
+
+  if(VTK_VERSION_MAJOR GREATER 6)
+    find_package(VTK COMPONENTS vtkRenderingVolumeOpenGL2)
+  else(VTK_VERSION_MAJOR GREATER 6)
+     find_package(VTK COMPONENTS vtkRenderingVolumeOpenGL)
+  endif(VTK_VERSION_MAJOR GREATER 6)

   if(VTK_FOUND)
     include(${VTK_USE_FILE})


Autodetect num processors for running the suite.

Review URL: https://codereview.appspot.com/6454094

SVN-Revision: 1512

--- suite/runsuite_common_pre.cmake
+++ suite/runsuite_common_pre.cmake
@@ -214,6 +214,37 @@
   file(MAKE_DIRECTORY "${CTEST_DROP_SITE}:${CTEST_DROP_LOCATION}")
 endif (arg_nightly)

+# Find the number of CPUs on the current system.
+# Cribbed from http://www.kitware.com/blog/home/post/63
+if(NOT DEFINED PROCESSOR_COUNT)
+  # Unknown:
+  set(PROCESSOR_COUNT 4)  # Guess
+
+  # Linux:
+  set(cpuinfo_file "/proc/cpuinfo")
+  if(EXISTS "${cpuinfo_file}")
+    file(STRINGS "${cpuinfo_file}" procs REGEX "^processor.: [0-9]+$")
+    list(LENGTH procs PROCESSOR_COUNT)
+  endif()
+
+  # Mac:
+  if(APPLE)
+    find_program(cmd_sys_pro "system_profiler")
+    if(cmd_sys_pro)
+      execute_process(COMMAND ${cmd_sys_pro} OUTPUT_VARIABLE info)
+      string(REGEX REPLACE "^.*Total Number Of Cores: ([0-9]+).*$" "\\1"
+        PROCESSOR_COUNT "${info}")
+    endif()
+  endif()
+
+  # Windows:
+  if(WIN32)
+    set(PROCESSOR_COUNT "$ENV{NUMBER_OF_PROCESSORS}")
+  endif()
+endif()
+
+math(EXPR PROCESSOR_COUNT "${PROCESSOR_COUNT} + 2")
+
 # CTest goes and does our builds and then wants to configure
 # and build again and complains there's no top-level setting of
 # CTEST_BINARY_DIRECTORY:
@@ -233,7 +264,7 @@
     # can't repro w/ VERBOSE=1
     set(CTEST_BUILD_COMMAND_BASE "${MAKE_COMMAND} -j2")
   else (have_cygwin)
-    set(CTEST_BUILD_COMMAND_BASE "${MAKE_COMMAND} -j5")
+    set(CTEST_BUILD_COMMAND_BASE "${MAKE_COMMAND} -j${PROCESSOR_COUNT}")
   endif (have_cygwin)
 elseif (arg_use_nmake)
   set(CTEST_CMAKE_GENERATOR "NMake Makefiles")
@@ -487,7 +518,8 @@
         # i#111: run tests in parallel, supported on CTest 2.8.0+
         # Note that adding -j to CMAKE_COMMAND does not work, though invoking
         # this script with -j does work, but we want parallel by default.
-        ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 5)
+        ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}"
+          PARALLEL_LEVEL ${PROCESSOR_COUNT})
       else (RUN_PARALLEL)
         ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}")
       endif (RUN_PARALLEL)


[Config] Fixed the delivery directory of Python modules and libraries

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -497,7 +497,7 @@

     # Set the Python installation directory
     set (INSTALL_PY_LIB_DIR
-      ${INSTALL_LIB_DIR}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
+      ${INSTALL_LIB_DIR}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
       CACHE PATH "Installation directory for Python libraries")

     # Update the list of include directories for the project
@@ -1461,7 +1461,7 @@
   set (exec_prefix   ${prefix})
   set (bindir        ${exec_prefix}/bin)
   set (libdir        ${exec_prefix}/${LIBDIR})
-  set (pylibdir	     ${libdir}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PACKAGE})
+  set (pylibdir	     ${libdir}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/py${PACKAGE})
   set (libexecdir    ${exec_prefix}/libexec)
   set (sbindir       ${exec_prefix}/sbin)
   set (sysconfdir    ${prefix}/etc)


simplify boost use script, remove Boost_LIBS

no reason to keep Boost_LIBS around any longer
now, more simple
  xpFindPkg(PKGS boost)
  target_link_libraries(foo PRIVATE Boost::iostreams)
instead of more complicated
  set(Boost_LIBS iostreams)
  xpFindPkg(PKGS boost)
  target_link_libraries(foo PRIVATE ${BOOST_LIBRARIES})
the cmake boost targets have cleaned-up boost a lot!

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

--- projects/use/usexp-boost-config.cmake
+++ projects/use/usexp-boost-config.cmake
@@ -13,40 +13,7 @@
   set(BOOST_VER @BOOST_OLDVER@)
 endif()
 set(BOOST_VERSION "${BOOST_VER} [@PROJECT_NAME@]")
-if(NOT DEFINED Boost_LIBS)
-  # dependencies determined by 'grep _DEPS boost_*/*-static.cmake'
-  set(Boost_LIBS   # dependency order
-    log_setup      # dep:log
-    ######
-    log            # dep:thread
-    ######
-    graph          # dep:regex
-    json           # dep:container
-    thread         # dep:atomic
-    timer          # dep:chrono
-    wserialization # dep:serialization
-    ######
-    atomic
-    chrono
-    container
-    date_time
-    filesystem
-    iostreams
-    nowide
-    program_options
-    random
-    regex
-    serialization
-    system
-    test_exec_monitor
-    unit_test_framework
-    )
-endif()
-list(FIND Boost_LIBS iostreams idx)
-if(NOT ${idx} EQUAL -1)
-  # iostreams depends on zlib bzip2
-  xpFindPkg(PKGS bzip2 zlib) # dependencies
-endif()
+xpFindPkg(PKGS bzip2 zlib) # iostreams depends on zlib bzip2
 # see BoostConfig.cmake for details on the following variables
 set(Boost_FIND_QUIETLY TRUE)
 set(Boost_USE_STATIC_LIBS ON)
@@ -54,9 +21,8 @@
 set(Boost_USE_STATIC_RUNTIME ON)
 #set(Boost_VERBOSE TRUE) # enable verbose output of BoostConfig.cmake
 #set(Boost_DEBUG TRUE) # enable debug (even more verbose) output of BoostConfig.cmake
-find_package(Boost ${BOOST_VER} REQUIRED COMPONENTS ${Boost_LIBS}
-  PATHS ${XP_ROOTDIR}/lib/cmake/Boost-${BOOST_VER} NO_DEFAULT_PATH
-  )
+set(boostPath ${XP_ROOTDIR}/lib/cmake/Boost-${BOOST_VER})
+find_package(Boost ${BOOST_VER} REQUIRED ALL PATHS ${boostPath} NO_DEFAULT_PATH)
 mark_as_advanced(Boost_DIR)
 set(${PRJ}_LIBRARIES ${Boost_LIBRARIES})
 set(reqVars ${PRJ}_VERSION ${PRJ}_LIBRARIES)


build: package .api files in vpp-dev

build: package .api files in vpp-dev

Type: fix

Change-Id: I035ff638d346109e1b3b5e5a8cdd36d650c45e5e
Signed-off-by: Benoît Ganne <38aad8ffcfa407b890d258e568f161530f66882d@cisco.com>

--- src/cmake/library.cmake
+++ src/cmake/library.cmake
@@ -47,7 +47,7 @@
     foreach(file ${ARG_API_FILES})
       get_filename_component(dir ${file} DIRECTORY)
       install(
-	FILES ${CMAKE_CURRENT_BINARY_DIR}/${file}.h
+	FILES ${file} ${CMAKE_CURRENT_BINARY_DIR}/${file}.h
 	DESTINATION include/${lib}/${dir}
 	COMPONENT vpp-dev
       )


HTCONDOR-1441 make CRT merge modules optional for MSI creation

--- build/cmake/CondorPackageConfig.cmake
+++ build/cmake/CondorPackageConfig.cmake
@@ -328,24 +328,24 @@
 			"$ENV{VS170COMNTOOLS}../../VC/Redist/MSVC/v143/MergeModules"
 			"$ENV{SV170COMNTOOLS}../../VC/Redist/MSVC/14.16.27012/MergeModules"
 		)
-		## Win8 batlab hack! if we can't find the merge module we want, look again for the VC140 merge module...
-		## we need this because we can't install a new VC toolset on Win8, and the VC140 merge module is close enough...
+		## Starting with Visual C++ 2019, merge modules are deprecated and MS makes them hard to get a hold of
+		## Instead, they want you to redistribute a separate installer for the vc runtime
+		## so if we don't find the merge modules, just build the Condor installer without them
 		if (CPACK_VC_MERGE_MODULE MATCHES "-NOTFOUND")
-			if (CMAKE_SIZEOF_VOID_P EQUAL 8)
-				set (VC_CRT_MSM Microsoft_VC140_CRT_x64.msm)
-			else()
-				set (VC_CRT_MSM Microsoft_VC140_CRT_x86.msm)
-			endif()
-			find_file( CPACK_VC_MERGE_MODULE
-				${VC_CRT_MSM}
-				"C:/Program Files/Common Files/Merge Modules" "C:/Program Files (x86)/Common Files/Merge Modules" )
+			set (VC_CRT_MSM off)
 		endif ()
 	endif ()

-	message(STATUS "CPACK_VC_MERGE_MODULE = ${CPACK_VC_MERGE_MODULE}")
-
-	set (WIX_MERGE_MODLES "<Merge Id=\"VCCRT\" Language=\"1033\" DiskId=\"1\" SourceFile=\"${CPACK_VC_MERGE_MODULE}\"/>\n${WIX_MERGE_MODLES}")
-	set (WIX_MERGE_REFS "<MergeRef Id=\"VCCRT\"/>\n${WIX_MERGE_REFS}")
+	if (VC_CRT_MSM)
+		message(STATUS "CPACK_VC_MERGE_MODULE = ${CPACK_VC_MERGE_MODULE}")
+
+		set (WIX_MERGE_MODLES "<Merge Id=\"VCCRT\" Language=\"1033\" DiskId=\"1\" SourceFile=\"${CPACK_VC_MERGE_MODULE}\"/>\n${WIX_MERGE_MODLES}")
+		set (WIX_MERGE_REFS "<MergeRef Id=\"VCCRT\"/>\n${WIX_MERGE_REFS}")
+	else(VC_CRT_MSM)
+		message(STATUS "CRT MergeModules not found, building installer without them.")
+		set (WIX_MERGE_MODLES "")
+		set (WIX_MERGE_REFS "")
+	endif ()

 	configure_file(${CONDOR_WIX_LOC}/xml/win.xsl.in ${CONDOR_BINARY_DIR}/msconfig/WiX/xml/condor.xsl @ONLY)


Print tag

Print tag

--- utilities/polly_common.cmake
+++ utilities/polly_common.cmake
@@ -15,8 +15,8 @@
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")

 include(polly_fatal_error)
+include(polly_status_debug)
 include(polly_status_print)
-include(polly_status_debug)

 # All well-known variables must be CACHE type:
 #     http://www.cmake.org/pipermail/cmake/2012-January/048429.html
@@ -31,6 +31,7 @@
 endif()

 polly_status_print("Used toolchain: ${POLLY_TOOLCHAIN_NAME}")
+polly_status_debug("Used tag: ${POLLY_TOOLCHAIN_TAG}")

 # support for hunter (github.com/ruslo/hunter)
 set(HUNTER_INSTALL_TAG ${POLLY_TOOLCHAIN_TAG})


cmake: In FindHoudiniEngine, output path to the bin directory on Windows

Output path to HoudiniEngine_BINARYDIR.

--- cmake/Modules/FindHoudiniEngine.cmake
+++ cmake/Modules/FindHoudiniEngine.cmake
@@ -3,11 +3,13 @@
 #   HoudiniEngine_INCLUDE_DIRS
 #   HoudiniEngine_LIBRARIES
 #   HoudiniEngine_LIBRARY_DIR
+#   HoudiniEngine_BINARY_DIR
 #
 # Hints for finding package:
 #   HoudiniEngine_ROOT
 #   HoudiniEngine_INCLUDEDIR
 #   HoudiniEngine_LIBRARYDIR
+#   HoudiniEngine_BINARYDIR

 set( _houdiniengine_lib HAPIL )

@@ -26,6 +28,11 @@
 # HoudiniEngine_LIBRARYDIR
 if ( DEFINED HoudiniEngine_LIBRARYDIR )
     list( APPEND _houdiniengine_library_search_dirs "${HoudiniEngine_LIBRARYDIR}" )
+endif ()
+
+# HoudiniEngine_BINARYDIR
+if ( DEFINED HoudiniEngine_BINARYDIR )
+    list( APPEND _houdiniengine_binary_search_dirs "${HoudiniEngine_BINARYDIR}" )
 endif ()

 # HoudiniEngine_ROOT
@@ -47,6 +54,7 @@
     elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )
         list( APPEND _houdiniengine_include_search_dirs "${_houdiniengine_root}/toolkit/include" )
         list( APPEND _houdiniengine_library_search_dirs "${_houdiniengine_root}/custom/houdini/dsolib" )
+        list( APPEND _houdiniengine_binary_search_dirs "${_houdiniengine_root}/bin" )
     elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
         list( APPEND _houdiniengine_include_search_dirs "${_houdiniengine_root}/toolkit/include" )
         list( APPEND _houdiniengine_library_search_dirs "${_houdiniengine_root}/../Libraries" )
@@ -81,6 +89,15 @@
     DIRECTORY
     )
 list( APPEND _houdiniengine_required_vars HoudiniEngine_LIBRARY_DIR )
+
+if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )
+    find_path(
+        HoudiniEngine_BINARY_DIR
+        libHAPI.dll
+        HINTS ${_houdiniengine_binary_search_dirs}
+        )
+    list( APPEND _houdiniengine_required_vars HoudiniEngine_BINARY_DIR )
+endif ()

 ########################################
 # Create library target


[cmake] Remove MSVC C4258 override

[cmake] Remove MSVC C4258 override

Tested on VS2017 and VS2019 llvm/clang builds with WX enabled - its no longer necessary to disable this warning.

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

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -504,7 +504,6 @@
       -wd4146 # Suppress 'unary minus operator applied to unsigned type, result still unsigned'
       -wd4180 # Suppress 'qualifier applied to function type has no meaning; ignored'
       -wd4244 # Suppress ''argument' : conversion from 'type1' to 'type2', possible loss of data'
-      -wd4258 # Suppress ''var' : definition from the for loop is ignored; the definition from the enclosing scope is used'
       -wd4267 # Suppress ''var' : conversion from 'size_t' to 'type', possible loss of data'
       -wd4291 # Suppress ''declaration' : no matching operator delete found; memory will not be freed if initialization throws an exception'
       -wd4345 # Suppress 'behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized'


Fix "root-config --python-version"

Fix "root-config --python-version"

Fixes ROOT-10167

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -574,7 +574,7 @@
 get_filename_component(altf77 "${CMAKE_Fortran_COMPILER}" NAME)
 get_filename_component(altld ${CMAKE_CXX_COMPILER} NAME)

-set(pythonvers ${PYTHON_VERSION})
+set(pythonvers ${PYTHON_VERSION_STRING})

 #---RConfigure.h---------------------------------------------------------------------------------------------
 configure_file(${PROJECT_SOURCE_DIR}/config/RConfigure.in include/RConfigure.h NEWLINE_STYLE UNIX)


FT-599 switched from _SVID_SOURCE to _DEFAULT_SOURCE

Newer libc doesn't like _SVID_SOURCE:
https://sourceware.org/ml/libc-alpha/2013-12/msg00652.html

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -17,7 +17,7 @@
 if (NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
   ## on FreeBSD these types of macros actually remove functionality
   add_c_defines(
-    _SVID_SOURCE
+    _DEFAULT_SOURCE
     _XOPEN_SOURCE=600
     )
 endif ()


Drop CONFIG option when locating GLFW CMake find package

Signed-off-by: Dan Bailey <39b6ae1dd30d9ab3cd77a2d084b277520f14c203@ilm.com>

--- cmake/OpenVDBGLFW3Setup.cmake
+++ cmake/OpenVDBGLFW3Setup.cmake
@@ -115,7 +115,7 @@
 endif()

 set(glfw3_FIND_VERSION ${MINIMUM_GLFW_VERSION})
-find_package(glfw3 ${MINIMUM_GLFW_VERSION} CONFIG REQUIRED)
+find_package(glfw3 ${MINIMUM_GLFW_VERSION} REQUIRED)

 find_package(PackageHandleStandardArgs)
 find_package_handle_standard_args(glfw3


Compile all in one file to avoid .mod file problem

--- test/module_test.cmake
+++ test/module_test.cmake
@@ -1,15 +1,10 @@
 # Base test definition
 # Perform code transformation and compare the output with a reference

-set (CPU_DIR __cpu__)
-set (GPU_DIR __gpu__)
-
 # Define input and output file name
-set (ORIGINAL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mo_column.f90)
-set (OUTPUT_FILE_CPU ${CMAKE_CURRENT_SOURCE_DIR}/${CPU_DIR}/transformed_code_cpu.f90)
-set (OUTPUT_FILE_GPU ${CMAKE_CURRENT_SOURCE_DIR}/${GPU_DIR}/transformed_code_gpu.f90)
-set (MAIN_CPU ${CMAKE_CURRENT_SOURCE_DIR}/${CPU_DIR}/main.f90)
-set (MAIN_GPU ${CMAKE_CURRENT_SOURCE_DIR}/${GPU_DIR}/main.f90)
+set (ORIGINAL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/original_code.f90)
+set (OUTPUT_FILE_CPU ${CMAKE_CURRENT_SOURCE_DIR}/transformed_code_cpu.f90)
+set (OUTPUT_FILE_GPU ${CMAKE_CURRENT_SOURCE_DIR}/transformed_code_gpu.f90)
 set (REFERENCE_FILE_CPU ${CMAKE_CURRENT_SOURCE_DIR}/reference_cpu.f90)
 set (REFERENCE_FILE_GPU ${CMAKE_CURRENT_SOURCE_DIR}/reference_gpu.f90)

@@ -29,14 +24,6 @@

 if (NOT EXISTS ${XMOD_DIR})
   file(MAKE_DIRECTORY ${XMOD_DIR})
-endif()
-
-if (NOT EXISTS ${CPU_DIR})
-  file(MAKE_DIRECTORY ${CPU_DIR})
-endif()
-
-if (NOT EXISTS ${GPU_DIR})
-  file(MAKE_DIRECTORY ${GPU_DIR})
 endif()

 # Create intermediate representation in XcodeML Fortran format
@@ -62,17 +49,6 @@
   COMMENT "Translating CLAW directive with ${CLAWFC} for GPU target"
 )

-add_custom_command(
-  OUTPUT  ${MAIN_CPU}
-  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/main.f90 ${MAIN_CPU}
-  COMMENT "Copy main.f90 to ${MAIN_CPU}"
-)
-add_custom_command(
-  OUTPUT  ${MAIN_GPU}
-  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/main.f90 ${MAIN_GPU}
-  COMMENT "Copy main.f90 to ${MAIN_GPU}"
-)
-
 # Target for the transformation
 add_custom_target(
   transform-${TEST_NAME}
@@ -93,11 +69,9 @@
 set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${CLAW_TEST_FFP_FLAGS}")

 # Build the original code and the transformed code
-add_executable (${EXECUTABLE_ORIGINAL} EXCLUDE_FROM_ALL "${ORIGINAL_FILE}" "main.f90")
-add_executable (${EXECUTABLE_TRANSFORMED_CPU} EXCLUDE_FROM_ALL "${OUTPUT_FILE_CPU}" "${CMAKE_CURRENT_SOURCE_DIR}/${CPU_DIR}/main.f90")
-target_compile_definitions(${EXECUTABLE_TRANSFORMED_CPU} PRIVATE -D_CLAW)
-add_executable (${EXECUTABLE_TRANSFORMED_GPU} EXCLUDE_FROM_ALL "${OUTPUT_FILE_GPU}" "${CMAKE_CURRENT_SOURCE_DIR}/${GPU_DIR}/main.f90")
-target_compile_definitions(${EXECUTABLE_TRANSFORMED_GPU} PRIVATE -D_CLAW)
+add_executable (${EXECUTABLE_ORIGINAL} EXCLUDE_FROM_ALL "${ORIGINAL_FILE}")
+add_executable (${EXECUTABLE_TRANSFORMED_CPU} EXCLUDE_FROM_ALL "${OUTPUT_FILE_CPU}")
+add_executable (${EXECUTABLE_TRANSFORMED_GPU} EXCLUDE_FROM_ALL "${OUTPUT_FILE_GPU}")

 # Set target specific compilation options
 if(OPENACC_ENABLE)


Set warning properties for MSVC properly

--- cmake/ApplyStrictCompileOptions.cmake
+++ cmake/ApplyStrictCompileOptions.cmake
@@ -4,6 +4,6 @@
 	elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
 		set_property(DIRECTORY PROPERTY COMPILE_OPTIONS -Wall -Wextra -pedantic -Werror)
 	elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
-		set_property(DIRECTORY PROPERTY COMPILE_OPTIONS "/W4 /wd4244 /wd4805 /wd4389 /wd4267 /WX")
+		set_property(DIRECTORY PROPERTY COMPILE_OPTIONS /W4 /wd4244 /wd4805 /wd4389 /wd4267 /WX)
 	endif ()
 endmacro ()


Fix the duplicate target bug.

Fix the duplicate target bug.

--- cmake/TbagModule/TbagProjectPCH.cmake
+++ cmake/TbagModule/TbagProjectPCH.cmake
@@ -9,63 +9,65 @@
     message (FATAL_ERROR "Not found original header file path (parameter 01).")
 endif ()

-get_filename_component (TbagProjectPCH_ORIGINAL_NAME "${TbagProjectPCH_0}" NAME)
-string (REPLACE "." "-" TbagProjectPCH_NAME "${TBAG_PROJECT_CONST_NAME}-${TbagProjectPCH_ORIGINAL_NAME}-pch")
-set (TbagProjectPCH_COPY_PATH ${CMAKE_BINARY_DIR}/${TbagProjectPCH_ORIGINAL_NAME})
+if (NOT DEFINED TbagProjectPCH_NAME)
+    get_filename_component (TbagProjectPCH_ORIGINAL_NAME "${TbagProjectPCH_0}" NAME)
+    string (REPLACE "." "-" TbagProjectPCH_NAME "${TbagProjectPCH_ORIGINAL_NAME}-pch")
+    set (TbagProjectPCH_COPY_PATH ${CMAKE_BINARY_DIR}/${TbagProjectPCH_ORIGINAL_NAME})

-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GCC")
-    set (TbagProjectPCH_RESULT_PATH "${TbagProjectPCH_COPY_PATH}.gch")
-else ()
-    set (TbagProjectPCH_RESULT_PATH "${TbagProjectPCH_COPY_PATH}.pch")
+    if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GCC")
+        set (TbagProjectPCH_RESULT_PATH "${TbagProjectPCH_COPY_PATH}.gch")
+    else ()
+        set (TbagProjectPCH_RESULT_PATH "${TbagProjectPCH_COPY_PATH}.pch")
+    endif ()
+
+    ## Extension CXX flags.
+    if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+        set (TbagProjectPCH_CXX_FLAGS_EX ${CMAKE_C_FLAGS_DEBUG})
+    elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+        set (TbagProjectPCH_CXX_FLAGS_EX ${CMAKE_C_FLAGS_RELEASE})
+    elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
+        set (TbagProjectPCH_CXX_FLAGS_EX ${CMAKE_C_FLAGS_RELWITHDEBINFO})
+    elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel")
+        set (TbagProjectPCH_CXX_FLAGS_EX ${CMAKE_C_FLAGS_MINSIZEREL})
+    endif()
+
+    string (REPLACE " " ";" TbagProjectPCH_CXX_FLAGS "${CMAKE_CXX_FLAGS};${TbagProjectPCH_CXX_FLAGS_EX}")
+
+    ## Definitions.
+    foreach (__define_cursor ${TBAG_PROJECT_DEFINITIONS})
+        if ("${__define_cursor}" MATCHES "^-D")
+            list (APPEND TbagProjectPCH_CXX_FLAGS "${__define_cursor}")
+        else ()
+            list (APPEND TbagProjectPCH_CXX_FLAGS "-D${__define_cursor}")
+        endif ()
+    endforeach ()
+
+    ## Include directories.
+    foreach (__include_cursor ${TBAG_PROJECT_INCLUDE_DIRS})
+        if ("${__include_cursor}" MATCHES "^-I")
+            list (APPEND TbagProjectPCH_CXX_FLAGS "${__include_cursor}")
+        else ()
+            list (APPEND TbagProjectPCH_CXX_FLAGS "-I${__include_cursor}")
+        endif ()
+    endforeach ()
+
+    ## PCH custom target.
+    add_custom_target (${TbagProjectPCH_NAME} ALL DEPENDS ${TbagProjectPCH_RESULT_PATH})
+
+    add_custom_command (
+            OUTPUT ${TbagProjectPCH_COPY_PATH}
+            COMMAND ${CMAKE_COMMAND} -E copy "${TbagProjectPCH_0}" "${TbagProjectPCH_COPY_PATH}"
+            DEPENDS "${TbagProjectPCH_0}"
+            WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
+
+    add_custom_command (
+            OUTPUT ${TbagProjectPCH_RESULT_PATH}
+            COMMAND ${CMAKE_CXX_COMPILER} ${TbagProjectPCH_CXX_FLAGS}
+                                          -x c++-header ${TbagProjectPCH_COPY_PATH}
+                                          -o ${TbagProjectPCH_RESULT_PATH}
+            DEPENDS "${TbagProjectPCH_COPY_PATH}"
+            WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
 endif ()
-
-## Extension CXX flags.
-if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
-    set (TbagProjectPCH_CXX_FLAGS_EX ${CMAKE_C_FLAGS_DEBUG})
-elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
-    set (TbagProjectPCH_CXX_FLAGS_EX ${CMAKE_C_FLAGS_RELEASE})
-elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
-    set (TbagProjectPCH_CXX_FLAGS_EX ${CMAKE_C_FLAGS_RELWITHDEBINFO})
-elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel")
-    set (TbagProjectPCH_CXX_FLAGS_EX ${CMAKE_C_FLAGS_MINSIZEREL})
-endif()
-
-string (REPLACE " " ";" TbagProjectPCH_CXX_FLAGS "${CMAKE_CXX_FLAGS};${TbagProjectPCH_CXX_FLAGS_EX}")
-
-## Definitions.
-foreach (__define_cursor ${TBAG_PROJECT_DEFINITIONS})
-    if ("${__define_cursor}" MATCHES "^-D")
-        list (APPEND TbagProjectPCH_CXX_FLAGS "${__define_cursor}")
-    else ()
-        list (APPEND TbagProjectPCH_CXX_FLAGS "-D${__define_cursor}")
-    endif ()
-endforeach ()
-
-## Include directories.
-foreach (__include_cursor ${TBAG_PROJECT_INCLUDE_DIRS})
-    if ("${__include_cursor}" MATCHES "^-I")
-        list (APPEND TbagProjectPCH_CXX_FLAGS "${__include_cursor}")
-    else ()
-        list (APPEND TbagProjectPCH_CXX_FLAGS "-I${__include_cursor}")
-    endif ()
-endforeach ()
-
-## PCH custom target.
-add_custom_target (${TbagProjectPCH_NAME} ALL DEPENDS ${TbagProjectPCH_RESULT_PATH})
-
-add_custom_command (
-        OUTPUT ${TbagProjectPCH_COPY_PATH}
-        COMMAND ${CMAKE_COMMAND} -E copy "${TbagProjectPCH_0}" "${TbagProjectPCH_COPY_PATH}"
-        DEPENDS "${TbagProjectPCH_0}"
-        WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
-
-add_custom_command (
-        OUTPUT ${TbagProjectPCH_RESULT_PATH}
-        COMMAND ${CMAKE_CXX_COMPILER} ${TbagProjectPCH_CXX_FLAGS}
-                                      -x c++-header ${TbagProjectPCH_COPY_PATH}
-                                      -o ${TbagProjectPCH_RESULT_PATH}
-        DEPENDS "${TbagProjectPCH_COPY_PATH}"
-        WORKING_DIRECTORY ${CMAKE_BINARY_DIR})

 list (APPEND TBAG_PROJECT_DEPENDENCIES ${TbagProjectPCH_NAME})
 list (APPEND TBAG_PROJECT_INCLUDE_DIRS ${CMAKE_BINARY_DIR})


Fix builds for older macOS deployment targets after r354365

Surprisingly, check_symbol_exists is not sufficient. The macOS linker checks the
called functions against a compatibility list for the given deployment target
and check_symbol_exists doesn't trigger this check as it never calls the
function.

This fixes the GreenDragon bots where the deployment target is 10.9

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -917,25 +917,31 @@

 option(LLVM_FORCE_ENABLE_STATS "Enable statistics collection for builds that wouldn't normally enable it" OFF)

-check_symbol_exists(os_signpost_interval_begin "os/signpost.h" _signposts_available)
-if(_signposts_available)
-  set(LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS "WITH_ASSERTS" CACHE STRING
-      "Enable support for Xcode signposts. Can be WITH_ASSERTS, FORCE_ON, FORCE_OFF")
-  string(TOUPPER "${LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS}"
-                 uppercase_LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS)
-  if( uppercase_LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS STREQUAL "WITH_ASSERTS" )
-    if( LLVM_ENABLE_ASSERTIONS )
+check_symbol_exists(os_signpost_interval_begin "os/signpost.h" macos_signposts_available)
+if(macos_signposts_available)
+  check_cxx_source_compiles(
+    "#include <os/signpost.h>
+    int main() { os_signpost_interval_begin(nullptr, 0, \"\", \"\"); return 0; }"
+    macos_signposts_usable)
+  if(macos_signposts_usable)
+    set(LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS "WITH_ASSERTS" CACHE STRING
+        "Enable support for Xcode signposts. Can be WITH_ASSERTS, FORCE_ON, FORCE_OFF")
+    string(TOUPPER "${LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS}"
+                   uppercase_LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS)
+    if( uppercase_LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS STREQUAL "WITH_ASSERTS" )
+      if( LLVM_ENABLE_ASSERTIONS )
+        set( LLVM_SUPPORT_XCODE_SIGNPOSTS 1 )
+      endif()
+    elseif( uppercase_LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS STREQUAL "FORCE_ON" )
       set( LLVM_SUPPORT_XCODE_SIGNPOSTS 1 )
-    endif()
-  elseif( uppercase_LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS STREQUAL "FORCE_ON" )
-    set( LLVM_SUPPORT_XCODE_SIGNPOSTS 1 )
-  elseif( uppercase_LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS STREQUAL "FORCE_OFF" )
-    # We don't need to do anything special to turn off signposts.
-  elseif( NOT DEFINED LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS )
-    # Treat LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS like "FORCE_OFF" when it has not been
-    # defined.
-  else()
-    message(FATAL_ERROR "Unknown value for LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS:"
-                        " \"${LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS}\"!")
-  endif()
-endif()
+    elseif( uppercase_LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS STREQUAL "FORCE_OFF" )
+      # We don't need to do anything special to turn off signposts.
+    elseif( NOT DEFINED LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS )
+      # Treat LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS like "FORCE_OFF" when it has not been
+      # defined.
+    else()
+      message(FATAL_ERROR "Unknown value for LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS:"
+                          " \"${LLVM_ENABLE_SUPPORT_XCODE_SIGNPOSTS}\"!")
+    endif()
+  endif()
+endif()


support any 19.1x compiler

support any 19.1x compiler

--- cmake/modules/hunter_setup_msvc.cmake
+++ cmake/modules/hunter_setup_msvc.cmake
@@ -42,7 +42,7 @@
     string(COMPARE EQUAL "${MSVC_VERSION}" "1700" _vs_11_2012)
     string(COMPARE EQUAL "${MSVC_VERSION}" "1800" _vs_12_2013)
     string(COMPARE EQUAL "${MSVC_VERSION}" "1900" _vs_14_2015)
-    string(REGEX MATCH "^191[01]$" _vs_15_2017 "${MSVC_VERSION}")
+    string(REGEX MATCH "^191[0-9]$" _vs_15_2017 "${MSVC_VERSION}")

     if(_vs_8_2005)
       set(HUNTER_MSVC_VERSION "8")


- for msvc only

 - for msvc only

git-svn-id: 41bd7e47c31e4d43f97241d7529f6785d233c6d8@12768 23f926e6-80f1-49ca-85a0-60d4a27bb3ac

--- rdo/packages/cmake/trunk/split-bison.cmake
+++ rdo/packages/cmake/trunk/split-bison.cmake
@@ -38,7 +38,7 @@
 		LIST(APPEND OUTPUT_FILE ${BISON_${INPUT_FILE}_OUTPUT_HEADER})
 	ENDIF()

-	IF(WIN32)
+	IF(MSVC)
 		ADD_CUSTOM_COMMAND(
 			OUTPUT ${OUTPUT_FILE}
 			COMMAND set CYGWIN=nodosfilewarning


Add Ogre SDK D3D9 include path to Ogre package cmake.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -166,6 +166,7 @@
         # Ogre built from sources
         include_directories($ENV{OGRE_HOME}/include)
         include_directories($ENV{OGRE_HOME}/include/RenderSystems/Direct3D9/include)
+        include_directories($ENV{OGRE_HOME}/RenderSystems/Direct3D9/include)
         # Ogre official sdk
         include_directories($ENV{OGRE_HOME}/include/OGRE)
         include_directories($ENV{OGRE_HOME}/include/OGRE/RenderSystems/Direct3D9)


add iris_vision sitl model

add iris_vision sitl model

--- platforms/posix/cmake/sitl_target.cmake
+++ platforms/posix/cmake/sitl_target.cmake
@@ -47,7 +47,7 @@
 # create targets for each viewer/model/debugger combination
 set(viewers none jmavsim gazebo replay)
 set(debuggers none ide gdb lldb ddd valgrind callgrind)
-set(models none iris iris_opt_flow iris_rplidar iris_irlock standard_vtol plane solo tailsitter typhoon_h480 rover hippocampus tiltrotor)
+set(models none iris iris_opt_flow iris_vision iris_rplidar iris_irlock standard_vtol plane solo tailsitter typhoon_h480 rover hippocampus tiltrotor)
 set(all_posix_vmd_make_targets)
 foreach(viewer ${viewers})
 	foreach(debugger ${debuggers})


ARROW-7162: [C++] Cleanup warnings in cmake_modules/SetupCxxFlags.cmake

Closes #5828 from pitrou/ARROW-7162-cleanup-clang-warnings and squashes the following commits:

e6cb6cd2a <Antoine Pitrou> ARROW-7162:  Cleanup warnings in cmake_modules/SetupCxxFlags.cmake

Authored-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>
Signed-off-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>

--- cpp/cmake_modules/SetupCxxFlags.cmake
+++ cpp/cmake_modules/SetupCxxFlags.cmake
@@ -138,35 +138,7 @@
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /W3 /wd4365 /wd4267 /wd4838")
   elseif("${COMPILER_FAMILY}" STREQUAL "clang")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wextra -Wdocumentation \
--Wno-c++98-compat \
--Wno-c++98-compat-pedantic -Wno-deprecated -Wno-weak-vtables -Wno-padded \
--Wno-comma -Wno-unused-macros -Wno-unused-parameter -Wno-unused-template -Wno-undef \
--Wno-shadow -Wno-switch-enum -Wno-exit-time-destructors \
--Wno-global-constructors -Wno-weak-template-vtables -Wno-undefined-reinterpret-cast \
--Wno-implicit-fallthrough -Wno-unreachable-code -Wno-unreachable-code-return \
--Wno-float-equal -Wno-missing-prototypes -Wno-documentation-unknown-command \
--Wno-old-style-cast -Wno-covered-switch-default \
--Wno-cast-align -Wno-vla-extension -Wno-shift-sign-overflow \
--Wno-used-but-marked-unused -Wno-missing-variable-declarations \
--Wno-gnu-zero-variadic-macro-arguments -Wno-conversion -Wno-sign-conversion \
--Wno-disabled-macro-expansion -Wno-format-nonliteral -Wno-missing-noreturn")
-
-    # Version numbers where warnings are introduced
-    if("${COMPILER_VERSION}" VERSION_GREATER "3.3")
-      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-gnu-folding-constant")
-    endif()
-    if("${COMPILER_VERSION}" VERSION_GREATER "3.6")
-      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-reserved-id-macro")
-      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-range-loop-analysis")
-      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-double-promotion")
-    endif()
-    if("${COMPILER_VERSION}" VERSION_GREATER "3.8")
-      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-undefined-func-template")
-    endif()
-
-    if("${COMPILER_VERSION}" VERSION_GREATER "3.9")
-      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-zero-as-null-pointer-constant")
-    endif()
+        -Wno-unused-parameter")

     if("${COMPILER_VERSION}" VERSION_GREATER "7.0")
       # ARROW-6259: Flatbuffers generates code with superfluous semicolons, so
@@ -184,6 +156,7 @@
     message(FATAL_ERROR "Unknown compiler. Version info:\n${COMPILER_VERSION_FULL}")
   endif()
   arrow_add_werror_if_debug()
+
 elseif("${BUILD_WARNING_LEVEL}" STREQUAL "EVERYTHING")
   # Pedantic builds for fixing warnings
   if("${COMPILER_FAMILY}" STREQUAL "msvc")
@@ -201,6 +174,7 @@
     message(FATAL_ERROR "Unknown compiler. Version info:\n${COMPILER_VERSION_FULL}")
   endif()
   arrow_add_werror_if_debug()
+
 else()
   # Production builds (warning are not treated as errors)
   if("${COMPILER_FAMILY}" STREQUAL "msvc")
@@ -214,6 +188,7 @@
   else()
     message(FATAL_ERROR "Unknown compiler. Version info:\n${COMPILER_VERSION_FULL}")
   endif()
+
 endif()

 if("${COMPILER_FAMILY}" STREQUAL "msvc")
@@ -222,6 +197,10 @@

   # Disable unchecked iterator warnings, equivalent to /D_SCL_SECURE_NO_WARNINGS
   set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /wd4996")
+
+  # Disable "switch statement contains 'default' but no 'case' labels" warning
+  # (required for protobuf, see https://github.com/protocolbuffers/protobuf/issues/6885)
+  set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /wd4065")
 endif()

 if("${COMPILER_FAMILY}" STREQUAL "gcc")


Revert "disable /std:c++latest flag in VS2015u3, as it causes compilation problems"

This reverts commit ae0466d6f032ad07bf080e9744c4b589bb0587d5.

--- toolchains/msvc.toolchain.cmake
+++ toolchains/msvc.toolchain.cmake
@@ -34,8 +34,7 @@

 # w4373: '...': virtual function overrides '...', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
 # w4324: 'structure was padded due to alignment specifier'
-# In VS 2015 u3, /std:c++latest causes error C2039: 'ptr_fun': is not a member of 'std'
-add_compile_options( -MP -Oi -Zc:threadSafeInit- )
+add_compile_options( /std:c++latest -MP -Oi -Zc:threadSafeInit- )
 add_definitions(
   -D_CRT_SECURE_NO_WARNINGS
   -D_SCL_SECURE_NO_WARNINGS


Find OpenBLAS more aggressively.  This made a difference on Fedora 20

--- bench/btl/cmake/FindOPENBLAS.cmake
+++ bench/btl/cmake/FindOPENBLAS.cmake
@@ -3,7 +3,7 @@
   set(OPENBLAS_FIND_QUIETLY TRUE)
 endif (OPENBLAS_LIBRARIES)

-find_file(OPENBLAS_LIBRARIES libopenblas.so PATHS /usr/lib $ENV{OPENBLASDIR} ${LIB_INSTALL_DIR})
+find_file(OPENBLAS_LIBRARIES NAMES libopenblas.so libopenblas.so.0 PATHS /usr/lib /usr/lib64 $ENV{OPENBLASDIR} ${LIB_INSTALL_DIR})
 find_library(OPENBLAS_LIBRARIES openblas PATHS $ENV{OPENBLASDIR} ${LIB_INSTALL_DIR})

 if(OPENBLAS_LIBRARIES AND CMAKE_COMPILER_IS_GNUCXX)


Import ios.simulator.toolchain.cmake from VTK.


Remove workaround for sanitizers on old Android NDK. (#8961)

This should not be needed anymore on current NDKs where the default
linker is LLD, and it's reasonable to expect at least people using
sanitizers to be using a recent NDK.

Reference: https://github.com/android/ndk/issues/1088

--- build_tools/cmake/sanitizers.cmake
+++ build_tools/cmake/sanitizers.cmake
@@ -25,10 +25,3 @@
   string(APPEND CMAKE_CXX_FLAGS " -fsanitize=thread")
   string(APPEND CMAKE_C_FLAGS " -fsanitize=thread")
 endif()
-if(ANDROID)
-  # Work around https://github.com/android/ndk/issues/1088
-  if(${IREE_ENABLE_ASAN} OR ${IREE_ENABLE_MSAN} OR ${IREE_ENABLE_TSAN})
-    string(APPEND CMAKE_EXE_LINKER_FLAGS " -fuse-ld=gold")
-    string(APPEND CMAKE_SHARED_LINKER_FLAGS " -fuse-ld=gold")
-  endif()
-endif()


Enable CIVETWEB_ENABLE_IPV6 flag.

Enable CIVETWEB_ENABLE_IPV6 flag.

--- external/External.cmake
+++ external/External.cmake
@@ -659,7 +659,7 @@
                        "-DCIVETWEB_DISABLE_CGI=OFF"
                        "-DCIVETWEB_DISABLE_CACHING=OFF"
                        "-DCIVETWEB_ENABLE_CXX=OFF"
-                       "-DCIVETWEB_ENABLE_IPV6=OFF"
+                       "-DCIVETWEB_ENABLE_IPV6=ON"
                        "-DCIVETWEB_ENABLE_WEBSOCKETS=ON"
                        "-DCIVETWEB_ENABLE_SERVER_STATS=OFF"
                        "-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=OFF"


Change clang version check from 9.1.0 to 9.0.0

--- tools/VoltDBCompilation.cmake
+++ tools/VoltDBCompilation.cmake
@@ -199,7 +199,7 @@
     # related to the LLVM versioning numbers.
     VOLTDB_ADD_COMPILE_OPTIONS(-Wno-unused-local-typedefs -Wno-absolute-value)
   ENDIF()
-  IF ( "9.1.0" VERSION_LESS ${CMAKE_CXX_COMPILER_VERSION} )
+  IF ( "9.0.0" VERSION_LESS ${CMAKE_CXX_COMPILER_VERSION} )
     VOLTDB_ADD_COMPILE_OPTIONS(-Wno-user-defined-warnings)
   ENDIF()
 ELSE()


Update CompilerWarnings.cmake

Update CompilerWarnings.cmake

Remove typo in link

--- cmake/CompilerWarnings.cmake
+++ cmake/CompilerWarnings.cmake
@@ -1,6 +1,6 @@
 # from here:
 #
-# https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Avai lable.md
+# https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md

 function(set_project_warnings project_name)
   option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" TRUE)


[cmake] fix: -static-libgcc and -static-libstdc++ are not applicable on mac

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -239,19 +239,21 @@
 		"-std=c++98" "-std=c++11" "-std=c++14" "-std=gnu++98" "-std=gnu++11" "-std=gnu++14"
 		)

-	axl_create_compiler_flag_setting (
-		GCC_FLAG_STATIC_LIBGCC
-		DESCRIPTION "Use static linkage to libgcc"
-		DEFAULT "-static-libgcc"
-		"-static-libgcc"
-		)
-
-	axl_create_compiler_flag_setting (
-		GCC_FLAG_CPP_STATIC_LIBSTDCPP
-		DESCRIPTION "Use static linkage to libstdc++"
-		DEFAULT "-static-libstdc++"
-		"-static-libstdc++"
-		)
+	if (NOT APPLE)
+		axl_create_compiler_flag_setting (
+			GCC_FLAG_STATIC_LIBGCC
+			DESCRIPTION "Use static linkage to libgcc"
+			DEFAULT "-static-libgcc"
+			"-static-libgcc"
+			)
+
+		axl_create_compiler_flag_setting (
+			GCC_FLAG_CPP_STATIC_LIBSTDCPP
+			DESCRIPTION "Use static linkage to libstdc++"
+			DEFAULT "-static-libstdc++"
+			"-static-libstdc++"
+			)
+	endif ()

 	axl_create_compiler_flag_setting (
 		GCC_FLAG_CPP_RTTI