FindMagnum: provide MAGNUM_APPLICATION_{LIBRARIES,INCLUDE_DIRS} aliases.

Convenience aliases to variables related to one particular *Application
component, defined if and only if exactly one *Application component is
requested and found. Meant to be used to simplify porting when each
platform uses different *Application library.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -41,6 +41,10 @@
 #  MAGNUM_*_FOUND   - Whether the component was found
 #  MAGNUM_*_LIBRARIES - Component library and dependent libraries
 #  MAGNUM_*_INCLUDE_DIRS - Include dirs of module dependencies
+# If exactly one *Application component is requested and found, its
+# libraries and include dirs are also available in convenience aliases
+# MAGNUM_APPLICATION_LIBRARIES and MAGNUM_APPLICATION_INCLUDE_DIRS to
+# simplify porting.
 #
 # Features of found Magnum library are exposed in these variables:
 #  MAGNUM_TARGET_GLES   - Defined if compiled for OpenGL ES
@@ -283,6 +287,19 @@

         # Don't expose variables w/o dependencies to end users
         mark_as_advanced(FORCE MAGNUM_${_COMPONENT}_LIBRARY _MAGNUM_${_COMPONENT}_INCLUDE_DIR)
+
+        # If this is application library, make it available also in global
+        # MAGNUM_APPLICATION_LIBRARIES and MAGNUM_APPLICATION_INCLUDE_DIRS. If
+        # these variables are already set, unset them to avoid ambiguity.
+        if(${component} MATCHES .+Application)
+            if(NOT DEFINED MAGNUM_APPLICATION_LIBRARIES AND NOT DEFINED MAGNUM_APPLICATION_INCLUDE_DIRS)
+                set(MAGNUM_APPLICATION_LIBRARIES ${MAGNUM_${_COMPONENT}_LIBRARIES})
+                set(MAGNUM_APPLICATION_INCLUDE_DIRS ${MAGNUM_${_COMPONENT}_INCLUDE_DIRS})
+            else()
+                unset(MAGNUM_APPLICATION_LIBRARIES)
+                unset(MAGNUM_APPLICATION_INCLUDE_DIRS)
+            endif()
+        endif()
     else()
         set(Magnum_${component}_FOUND FALSE)
     endif()


modules: fix root library finding for superprojects.

Will this never end?!

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -285,6 +285,8 @@
         # TODO: give me INTERFACE_LINK_OPTIONS or something, please
         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s USE_WEBGL2=1")
     endif()
+else()
+    set(MAGNUM_LIBRARY Magnum::Magnum)
 endif()

 # Ensure that all inter-component dependencies are specified as well
@@ -608,7 +610,7 @@
 # Complete the check with also all components
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Magnum
-    REQUIRED_VARS MAGNUM_LIBRARY MAGNUM_INCLUDE_DIR
+    REQUIRED_VARS MAGNUM_INCLUDE_DIR MAGNUM_LIBRARY
     HANDLE_COMPONENTS)

 # Create Windowless*Application, *Application and *Context aliases


fixup

fixup

--- rosidl_typesupport_opensplice_cpp/cmake/rosidl_typesupport_opensplice_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_opensplice_cpp/cmake/rosidl_typesupport_opensplice_cpp_generate_interfaces.cmake
@@ -85,7 +85,7 @@
   endif()
 endforeach()

-# If not on Windows, disable some warnings with Connext's generated code
+# If not on Windows, disable some warnings with OpenSplice's generated code
 if(NOT WIN32)
   set(_opensplice_compile_flags)
   if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")


Fix typo in ament_auto_find_test_dependencies (#363)

Signed-off-by: wep21 <cebc76887fb024c258caf0fb07404eb2ace0f5da@yahoo.co.jp>

--- ament_cmake_auto/cmake/ament_auto_find_test_dependencies.cmake
+++ ament_cmake_auto/cmake/ament_auto_find_test_dependencies.cmake
@@ -23,7 +23,7 @@
 macro(ament_auto_find_test_dependencies)
   set(_ARGN "${ARGN}")
   if(_ARGN)
-    message(FATAL_ERROR "ament_lint_auto_find_test_dependencies() called with "
+    message(FATAL_ERROR "ament_auto_find_test_dependencies() called with "
       "unused arguments: ${_ARGN}")
   endif()


New function: set_tbb_offload_properties

Wrap existing cetbuildtools functionality for scanning and
applying flags needed to compile a target's sources with
TBB offload support.

Currently requires existence of the scanning program so
does not do much yet...

--- Modules/CetCMakeUtilities.cmake
+++ Modules/CetCMakeUtilities.cmake
@@ -2,7 +2,7 @@
 # CetCMakeUtilities
 # -----------------
 #
-# Cetbuildtools2 utility functions and macros
+# Cetbuildtools2 utility functions and macros.
 #

 #-----------------------------------------------------------------------
@@ -153,18 +153,6 @@
   endif()
 endfunction()

-
-#-----------------------------------------------------------------------
-# BOOST.UNIT HELPERS
-#-----------------------------------------------------------------------
-# Many places where Boost.unit is used.
-# Generally always boils down to setting a couple of target properties
-# and linking said target to the Boost.Unit library.
-# Encapsulate this in a function taking the target to be "Boost.Unitified"
-# Will need review if additional use cases/styles of use are encountered
-# TODO: Error checking
-
-# - Apply needed properties

 #-----------------------------------------------------------------------
 #[[.rst:
@@ -240,8 +228,54 @@
   # libs to link - can't specify link rule here as others may use it.
   target_link_libraries(${_target} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
 endfunction()
-#-----------------------------------------------------------------------
-# END OF BOOST.UNIT HELPERS
-#-----------------------------------------------------------------------
-
-
+
+
+#-----------------------------------------------------------------------
+# TBB.OFFLOAD HELPERS
+#-----------------------------------------------------------------------
+# Several places where "find_tbb_offloads" occurs. This command does
+# not (apparently) appear anywhere in the cetbuildtools code, so
+# seems to be a placeholder. Nevertheless, can provide a suitable
+# wrapper to apply the additional properties needed
+# TODO: Note that the CMake Variable TBB_OFFLOAD_FLAG also needs to be
+# set... plus whatever other links... but that can all be co-located here.
+
+#[[.rst:
+.. cmake:command:: set_tbb_offload_properties
+
+  .. code-block:: cmake
+
+    set_tbb_offload_properties(<target>)
+
+  :cmake:command:`Function <cmake:command:function>` to apply properties
+  needed to compile target ``<target>`` with support for TBB offloads.
+
+  Currently unimplemented (see below) and will emit a warning when used.
+
+.. todo::
+
+  Needs ``find_tbb_offloads`` command which doesn't appear to exist
+  anywhere yet. Assumed that this scans source files for usage of
+  offload specific calls, returning true if so. The needed compile flag
+  is then added...
+#]]
+function(set_tbb_offload_properties _target)
+  if(NOT TARGET ${_target})
+    message(FATAL_ERROR "set_tbb_offload_properties: input '${_target}' is not a valid CMake target")
+  endif()
+
+  # Only apply if the find_tbb_offloads command exists...
+  if(COMMAND find_tbb_offloads)
+    get_target_property(_target_sources ${_target} SOURCES)
+    find_tbb_offloads(FOUND_VAR have_tbb_offload ${_target_sources})
+    if(have_tbb_offload)
+      set_property(TARGET ${_target}
+        APPEND PROPERTY
+          LINK_FLAGS ${TBB_OFFLOAD_FLAG}
+        )
+    endif()
+  else()
+    message(WARNING "set_tbb_offload_properties: no find_tbb_offloads command available")
+  endif()
+endfunction()
+


COMP: Add -fno-sized-deallocation for GCC 12

Addresses:

```
/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.0/../../../../include/c++/12.1.0/bits/new_allocator.h:158:2: error: call to '__builtin_operator_delete' selects non-usual deallocation function
        _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n));
```

Fixes #3452

--- CMake/ITKSetStandardCompilerFlags.cmake
+++ CMake/ITKSetStandardCompilerFlags.cmake
@@ -344,6 +344,10 @@
       endforeach()
     endif()

+    if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "12")
+      set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} -fno-sized-deallocation")
+    endif()
+
     # gcc must have -msse2 option to enable sse2 support
     if(VNL_CONFIG_ENABLE_SSE2 OR VNL_CONFIG_ENABLE_SSE2_ROUNDING)
       set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} -msse2")


add support for Wolfram Desktop and Wolfram Engine

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -34,7 +34,7 @@
 cmake_policy(POP)

 set (Mathematica_CMAKE_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}")
-set (Mathematica_CMAKE_MODULE_VERSION "3.2.5")
+set (Mathematica_CMAKE_MODULE_VERSION "3.2.6")

 # activate select policies
 if (POLICY CMP0025)
@@ -242,7 +242,7 @@
 macro (_get_program_names _outProgramNames)
 	set (${_outProgramNames} "")
 	# Mathematica products in order of preference
-	set (_MathematicaApps "Mathematica" "gridMathematica Server")
+	set (_MathematicaApps "Mathematica" "Wolfram Desktop" "Wolfram Engine" "gridMathematica Server")
 	# Mathematica product versions in order of preference
 	set (_MathematicaVersions
 		"12.0" "11.3" "11.2" "11.1" "11.0"
@@ -271,7 +271,9 @@

 # internal function to get Mathematica Windows installation directory for a registry entry
 function (_add_registry_search_path _registryKey _outSearchPaths)
-	set (_ProductNamePatterns "Wolfram Mathematica [0-9]+" "Wolfram Finance Platform")
+	set (_ProductNamePatterns
+		"Wolfram Mathematica [0-9.]+" "Wolfram Desktop [0-9.]+"
+		"Wolfram Engine [0-9.]+" "Wolfram Finance Platform")
 	get_filename_component (
 		_productName "[${_registryKey};ProductName]" NAME)
 	get_filename_component (
@@ -2660,7 +2662,7 @@
 	if ("${_component}" STREQUAL "Mathematica")
 		set (${_outVars}
 			Mathematica_ROOT_DIR
-			Mathematica_KERNEL_EXECUTABLE Mathematica_FRONTEND_EXECUTABLE)
+			Mathematica_KERNEL_EXECUTABLE)
 	elseif ("${_component}" STREQUAL "MathLink")
 		set (${_outVars}
 			Mathematica_MathLink_LIBRARY Mathematica_MathLink_INCLUDE_DIR)


CI: enable ccache on macos

CI: enable ccache on macos

--- CI/otb-macos-superbuild.cmake
+++ CI/otb-macos-superbuild.cmake
@@ -22,4 +22,6 @@

 set(site_option
 "OTB_USE_GLUT=OFF
-OTB_USE_GLFW=OFF")+OTB_USE_GLFW=OFF
+CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
+CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache")


CI: no filters for coverage for now

CI: no filters for coverage for now

--- CI/ubuntu-18.04-llvm-qa.cmake
+++ CI/ubuntu-18.04-llvm-qa.cmake
@@ -23,8 +23,8 @@
 set(site_option
 "CMAKE_C_COMPILER:STRING=clang
 CMAKE_CXX_COMPILER:STRING=clang++
-CMAKE_C_FLAGS:STRING=--coverage -fprofile-exclude-files=\"^/usr/include/.*\$;.*/xdk/include/.*\$\"
-CMAKE_CXX_FLAGS:STRING=--coverage -fprofile-exclude-files=\"^/usr/include/.*\$;.*/xdk/include/.*\$\"
+CMAKE_C_FLAGS:STRING=--coverage
+CMAKE_CXX_FLAGS:STRING=--coverage
 CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld
 CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld
 CMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=lld


restrict FOLLY_HAVE_WEAK_SYMBOLS

restrict FOLLY_HAVE_WEAK_SYMBOLS

Summary: Restrict `FOLLY_HAVE_WEAK_SYMBOLS` by requiring not just that use of gnu weak symbols will compile but also that it will link and run when no definition is available for a weak declaration.

Reviewed By: luciang

Differential Revision: D25788660

fbshipit-source-id: 52447601257242cd713ac5cd70e900e3738a9770

--- CMake/FollyConfigChecks.cmake
+++ CMake/FollyConfigChecks.cmake
@@ -128,10 +128,11 @@
   }"
   FOLLY_HAVE_VLA
 )
-check_cxx_source_compiles("
-  extern \"C\" void configure_link_extern_weak_test() __attribute__((weak));
-  int main(int argc, char** argv) {
-    return configure_link_extern_weak_test == nullptr;
+check_cxx_source_runs("
+  extern \"C\" int folly_example_undefined_weak_symbol() __attribute__((weak));
+  int main(int argc, char** argv) {
+    auto f = folly_example_undefined_weak_symbol; // null pointer
+    return f ? f() : 0; // must compile, link, and run with null pointer
   }"
   FOLLY_HAVE_WEAK_SYMBOLS
 )


fixed: boost config typo

fixed: boost config typo

--- CMake/OSGBuildFunctions.cmake
+++ CMake/OSGBuildFunctions.cmake
@@ -2712,8 +2712,8 @@
 ENDMACRO(OSG_FIND_PACKAGE_QUIET)

 MACRO(OSG_BOOST_DEP_SETUP)
-    SET(Boost_USE_MULTITHREAD ON )
-    SET(Boost_USE_STATIC_LIBS OFF)
+    SET(Boost_USE_MULTITHREADED ON )
+    SET(Boost_USE_STATIC_LIBS   OFF)

     SET(Boost_NO_BOOST_CMAKE TRUE CACHE INTERNAL "" FORCE)
     SET(Boost_ADDITIONAL_VERSIONS "1.54.0"


vtkPythonWrapping: Set python module prefix on wrapper targets

Commit dd2c9df0 (Cleanup building of static modules for Python,
2012-08-02) dropped use of python_add_module but did not port all
functionality to the new macro.  Add a missing property to remove the
"lib" prefix from python module names.  Otherwise they cannot be
imported by python.

Change-Id: Ica3539fbb86a4147499e4bedb7dfe3900a645896

--- CMake/vtkPythonWrapping.cmake
+++ CMake/vtkPythonWrapping.cmake
@@ -73,6 +73,7 @@
 function(_vtk_add_python_module name)
   if (BUILD_SHARED_LIBS)
     add_library(${name} MODULE ${ARGN})
+    set_property(TARGET ${name} PROPERTY PREFIX "${PYTHON_MODULE_PREFIX}")
     if (WIN32 AND NOT CYGWIN)
       # when building shared on Windows, the python module files need to be
       # named as *.pyd


uninstaller: add TintinCDKCameraHighAmbient to the uninstall list

--- windows_all_in_installer_config.cmake
+++ windows_all_in_installer_config.cmake
@@ -49,6 +49,7 @@
   \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `VoxelDCamera.conf`\n
   \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `VoxelDCameraNormal.conf`\n
   \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `TintinCDKCamera.conf`\n
+  \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `TintinCDKCameraHighAmbient.conf`\n
   \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `TintinCDKCameraShortRange.conf`\n
   \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `TintinCDKCameraNoCalibration.conf`\n
   \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `TintinCDKCameraLongRange.conf`\n


Use conda `--force-reinstall` instead of deprecated `--force`

Fixes #446

Signed-off-by: Elms <93f558a3452e88ebb2324de5c5f48ac5d4ec1d53@freshred.net>

--- make/env.cmake
+++ make/env.cmake
@@ -178,7 +178,7 @@

     add_custom_command(
       OUTPUT ${OUTPUTS}
-      COMMAND ${CONDA_BIN} install -f ${PACKAGE_SPEC}
+      COMMAND ${CONDA_BIN} install --force-reinstall ${PACKAGE_SPEC}
       ${TOUCH_COMMANDS}
       DEPENDS conda ${CONDA_BIN}
       )


Fixed extranious ... which was screwing up ARGV

--- cmake-modules/ConditionalSources.cmake
+++ cmake-modules/ConditionalSources.cmake
@@ -24,14 +24,14 @@
 # the ${ARGV} from being parsed by cmake's macro preprocessor.
 include(VerboseMessage)

-function(conditional_sources condition_var ...)
   include(CMakeParseArguments)
   cmake_parse_arguments(conditional_sources "" "GROUP_NAME" "FILES" ${ARGV})
+function(conditional_sources condition_var)

   source_group(${conditional_sources_GROUP_NAME} FILES ${conditional_sources_FILES})

   if(NOT (${condition_var}))
-    set_source_files_properties( ${ARGN} PROPERTIES HEADER_FILE_ONLY TRUE)
+    set_source_files_properties( ${conditional_sources_FILES} PROPERTIES HEADER_FILE_ONLY TRUE)
     verbose_message("Setting INACTIVE source group \"${conditional_sources_GROUP_NAME}\" with files ${conditional_sources_FILES}")
   else()
     verbose_message("Setting source group \"${conditional_sources_GROUP_NAME}\" with files ${conditional_sources_FILES}")
@@ -39,7 +39,7 @@
 endfunction()

 #as conditional_sources, but also appends the soruces to the source_list_var
-function(add_conditional_sources source_list_var condition_var ...)
+function(add_conditional_sources source_list_var condition_var)
   list(REMOVE_AT ARGV 0)
   conditional_sources(${ARGV})


update: coverage processing

update: coverage processing

--- cmake/HUGH_FIELDS_SetupVariables.cmake
+++ cmake/HUGH_FIELDS_SetupVariables.cmake
@@ -11,5 +11,3 @@
 endif()

 include(CMakeAddons_SetupVariables)
-
-set(${PROJECT_NAME}_COVERAGE_EXCLUDE "${${PROJECT_NAME}_COVERAGE_EXCLUDE} 'install/*'")


Changed CMake FindSystemdJournal module to reflect the merging of libsystemd and libsystemd-journal

--- cmake/Modules/FindSystemdJournal.cmake
+++ cmake/Modules/FindSystemdJournal.cmake
@@ -16,7 +16,7 @@
   find_package(PkgConfig)

   if (PKG_CONFIG_FOUND)
-    pkg_check_modules(_LIBSYSTEMD_JOURNAL_PC QUIET "libsystemd-journal")
+    pkg_check_modules(_LIBSYSTEMD_JOURNAL_PC QUIET "libsystemd")
     pkg_check_modules(_LIBSYSTEMD_ID128_PC QUIET "libsystemd-id128")
     pkg_check_modules(_LIBSYSTEMD_PC QUIET "libsystemd")
   endif (PKG_CONFIG_FOUND)
@@ -35,7 +35,7 @@
     /usr/local/include
   )

-  find_library (LIBSYSTEMD_JOURNAL_LIBRARIES NAMES systemd-journal systemd-id128
+  find_library (LIBSYSTEMD_JOURNAL_LIBRARIES NAMES systemd systemd-id128
     PATHS
     ${_LIBSYSTEMD_JOURNAL_PC_LIBDIR}
     ${_LIBSYSTEMD_ID128_PC_LIBDIR}


OpenCVDetectPython.cmake: set minimum python versions

This fixes compilation when python is not found or only one version of python
is found

Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>

--- cmake/modules/OpenCVDetectPython.cmake
+++ cmake/modules/OpenCVDetectPython.cmake
@@ -132,6 +132,9 @@
 endif()
 endfunction(find_python)

+set(MIN_VER_PYTHON2 2.7)
+set(MIN_VER_PYTHON3 3.2)
+
 find_python(2.7 "${MIN_VER_PYTHON2}" PYTHON2_LIBRARY PYTHON2_INCLUDE_DIR
     PYTHON2INTERP_FOUND PYTHON2_EXECUTABLE PYTHON2_VERSION_STRING
     PYTHON2_VERSION_MAJOR PYTHON2_VERSION_MINOR PYTHON2LIBS_FOUND
@@ -146,7 +149,6 @@
     PYTHON3_DEBUG_LIBRARIES PYTHON3_LIBRARY_DEBUG PYTHON3_INCLUDE_PATH
     PYTHON3_INCLUDE_DIR PYTHON3_INCLUDE_DIR2 PYTHON3_PACKAGES_PATH)

-
 if(PYTHON_DEFAULT_EXECUTABLE)
     set(PYTHON_DEFAULT_AVAILABLE "TRUE")
 elseif(PYTHON2INTERP_FOUND) # Use Python 2 as default Python interpreter


Remove an intel warning due to a bug

Remove an intel warning due to a bug

--- cmake/Flags.cmake
+++ cmake/Flags.cmake
@@ -21,11 +21,15 @@
     #  1419  : external declaration in primary source file (happens in boost files)
     #   383  : value copied to temporary, reference to temporary used (generally ok in c++)
     #   981  : operands are evaluated in unspecified order (generally ok in c++)
+    #   869  : parameter "XXX" was never referenced.
+    #          This is due to a bug in Intel before Intel 16 that causes this
+    #          remark to be printed for variadic templates
     list(APPEND BPMODULE_CXX_STRICT_FLAGS "-wd1418")
     list(APPEND BPMODULE_CXX_STRICT_FLAGS "-wd1419")
     list(APPEND BPMODULE_CXX_STRICT_FLAGS "-wd411")
     list(APPEND BPMODULE_CXX_STRICT_FLAGS "-wd383")
     list(APPEND BPMODULE_CXX_STRICT_FLAGS "-wd981")
+    list(APPEND BPMODULE_CXX_STRICT_FLAGS "-wd869")

 elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
     list(APPEND BPMODULE_CXX_STRICT_FLAGS "-fPIC")


Disable test-stressproof for the time being

--- test/CTestCustom.cmake
+++ test/CTestCustom.cmake
@@ -1,6 +1,6 @@
 #---Custom CTest settings---------------------------------------------------

-set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE} test-stressgui)
+set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE} test-stressgui test-stressproof)

 if(WIN32)
   set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE} test-tcollex)


ensure the tulip.isLoaded function is defined before downloading the compiled WebAssembly module for tulip

--- src/emscripten/wrap_compiled_code.cmake
+++ src/emscripten/wrap_compiled_code.cmake
@@ -27,6 +27,7 @@
   FILE(APPEND ${JSFILE} "  tulip.useWorker = false;")
 ENDIF(TULIP_USE_WORKER)
 IF(USE_WASM)
+  FILE(APPEND ${JSFILE} "  tulip.isLoaded = function() {return false;};")
   FILE(APPEND ${JSFILE} "  var xhr = new XMLHttpRequest();")
   FILE(APPEND ${JSFILE} "  xhr.open('GET', tulip.modulePrefixURL + 'tulip.wasm');")
   FILE(APPEND ${JSFILE} "  xhr.responseType = 'arraybuffer';")


Remove HAVE_XSHM because it is not used

Remove HAVE_XSHM because it is not used

--- config-kopete.h.cmake
+++ config-kopete.h.cmake
@@ -7,9 +7,6 @@

 /* Define to compile with GSM SMS support */
 /* #undef INCLUDE_SMSGSM */
-
-/* TODO */
-/* #undef HAVE_XSHM */

 /* Define to 1 if you have the <inttypes.h> header file. */
 #cmakedefine HAVE_INTTYPES_H 1


Update superbuild googletest version to 1.11

--- SuperBuild/External_GTest.cmake
+++ SuperBuild/External_GTest.cmake
@@ -10,7 +10,7 @@
 set(GTEST_GIT_REPOSITORY "${git_protocol}://github.com/google/googletest.git" CACHE  STRING "Google Test repository")
 mark_as_advanced(GTEST_GIT_REPOSITORY)

-set(GTEST_GIT_TAG "release-1.10.0" CACHE STRING "Tag or hash for GTtest git repo")
+set(GTEST_GIT_TAG "release-1.11.0" CACHE STRING "Tag or hash for GTtest git repo")
 mark_as_advanced(GTEST_GIT_TAG)
 set(GTEST_TAG_COMMAND GIT_TAG "${GTEST_GIT_TAG}")


Don't use add_llvm_definitions for adding warning flags.  It makes it too hard
to have them appear in the right order.  Instead append all warnings explicitly
to the language flags.  This was already the case for many warnings.  Fixes the
issue of -Wno-maybe-uninitialized not being effective because -Wall was being
placed after it rather than before.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -71,9 +71,17 @@
   endif()
 endfunction()

-function(append_if variable value condition)
+function(append value)
+  foreach(variable ${ARGN})
+    set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
+  endforeach(variable)
+endfunction()
+
+function(append_if condition value)
   if (${condition})
-    set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
+    foreach(variable ${ARGN})
+      set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
+    endforeach(variable)
   endif()
 endfunction()

@@ -91,7 +99,7 @@
       # MinGW warns if -fvisibility-inlines-hidden is used.
     else()
       check_cxx_compiler_flag("-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG)
-      append_if(CMAKE_CXX_FLAGS "-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG)
+      append_if(SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG "-fvisibility-inlines-hidden" CMAKE_CXX_FLAGS)
     endif()
   endif()
 endif()
@@ -186,7 +194,7 @@
   endif (LLVM_ENABLE_WERROR)
 elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
   if (LLVM_ENABLE_WARNINGS)
-    add_llvm_definitions( -Wall -W -Wno-unused-parameter -Wwrite-strings )
+    append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)

     # Turn off missing field initializer warnings for gcc to avoid noise from
     # false positives with empty {}. Turn them on otherwise (they're off by
@@ -194,23 +202,21 @@
     check_cxx_compiler_flag("-Wmissing-field-initializers" CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG)
     if (CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG)
       if (CMAKE_COMPILER_IS_GNUCXX)
-        add_llvm_definitions( -Wno-missing-field-initializers )
+        append("-Wno-missing-field-initializers" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
       else()
-        add_llvm_definitions( -Wmissing-field-initializers )
+        append("-Wmissing-field-initializers" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
       endif()
     endif()

-    if (LLVM_ENABLE_PEDANTIC)
-      add_llvm_definitions( -pedantic -Wno-long-long )
-    endif (LLVM_ENABLE_PEDANTIC)
+    append_if(LLVM_ENABLE_PEDANTIC "-pedantic -Wno-long-long" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
     check_cxx_compiler_flag("-Werror -Wcovered-switch-default" CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)
-    append_if(CMAKE_CXX_FLAGS "-Wcovered-switch-default" CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)
+    append_if(CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG "-Wcovered-switch-default" CMAKE_CXX_FLAGS)
     check_c_compiler_flag("-Werror -Wcovered-switch-default" C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)
-    append_if(CMAKE_C_FLAGS "-Wcovered-switch-default" C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)
-    append_if(CMAKE_CXX_FLAGS "-Wno-uninitialized" USE_NO_UNINITIALIZED)
-    append_if(CMAKE_CXX_FLAGS "-Wno-maybe-uninitialized" USE_NO_MAYBE_UNINITIALIZED)
+    append_if(C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG "-Wcovered-switch-default" CMAKE_C_FLAGS)
+    append_if(USE_NO_UNINITIALIZED "-Wno-uninitialized" CMAKE_CXX_FLAGS)
+    append_if(USE_NO_MAYBE_UNINITIALIZED "-Wno-maybe-uninitialized" CMAKE_CXX_FLAGS)
     check_cxx_compiler_flag("-Werror -Wnon-virtual-dtor" CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG)
-    append_if(CMAKE_CXX_FLAGS "-Wnon-virtual-dtor" CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG)
+    append_if(CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG "-Wnon-virtual-dtor" CMAKE_CXX_FLAGS)
   endif (LLVM_ENABLE_WARNINGS)
   if (LLVM_ENABLE_WERROR)
     add_llvm_definitions( -Werror )


Setting ${PROJECT_NAME}_ALL_DEP_TARGETS also for header only libraries Otherwise DoxygenRule.cmake fails if there's not other target (e.g. no tests).

--- CommonLibrary.cmake
+++ CommonLibrary.cmake
@@ -168,11 +168,11 @@
       endif()

       common_enable_dlopen_usage(${LibName})
-
-      # for DoxygenRule.cmake and SubProject.cmake
-      set_property(GLOBAL APPEND PROPERTY ${PROJECT_NAME}_ALL_DEP_TARGETS
-        ${LibName})
-    endif()
+    endif()
+
+    # for DoxygenRule.cmake and SubProject.cmake
+    set_property(GLOBAL APPEND PROPERTY
+                 ${PROJECT_NAME}_ALL_DEP_TARGETS ${LibName})

     # add an alias with PROJECT_NAME to the target to ease detection of
     # subproject inclusion in CommonConfig.cmake


shift VS2010 to last choice since not fully supported (i#401)

SVN-Revision: 654

--- suite/runsuite_common_pre.cmake
+++ suite/runsuite_common_pre.cmake
@@ -221,18 +221,19 @@
 elseif (arg_use_nmake)
   set(CTEST_CMAKE_GENERATOR "NMake Makefiles")
 else (arg_use_make)
-  get_filename_component(vs_dir [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;ProductDir] REALPATH)
+  # we don't yet support VS2010 (i#401) so prefer the others
+  get_filename_component(vs_dir [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VS;ProductDir] REALPATH)
   # on failure getting weird results: "c:/registry", so we assume will have Studio
   if ("${vs_dir}" MATCHES "Studio")
-    set(vs_generator "Visual Studio 10")
+    set(vs_generator "Visual Studio 9 2008")
   else ()
-    get_filename_component(vs_dir [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VS;ProductDir] REALPATH)
+    get_filename_component(vs_dir [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VS;ProductDir] REALPATH)
     if ("${vs_dir}" MATCHES "Studio")
-      set(vs_generator "Visual Studio 9 2008")
+      set(vs_generator "Visual Studio 8 2005")
     else ()
-      get_filename_component(vs_dir [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VS;ProductDir] REALPATH)
+      get_filename_component(vs_dir [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;ProductDir] REALPATH)
       if ("${vs_dir}" MATCHES "Studio")
-        set(vs_generator "Visual Studio 8 2005")
+        set(vs_generator "Visual Studio 10")
       endif ()
     endif ()
   endif ()


use 'Zc:preprocessor' or 'experimental:preprocessor', depending on MSVC version

--- toolchains/msvc.toolchain.cmake
+++ toolchains/msvc.toolchain.cmake
@@ -41,7 +41,14 @@
 # w4324: 'structure was padded due to alignment specifier'
 # w5104: 'found 'L#x' in macro replacement list, did you mean 'L""#x'?' @ windows.h + experimental PP
 # w5105: 'macro expansion producing 'defined' has undefined behavior' @ windows.h + experimental PP
-add_compile_options( /std:c++latest /permissive- /Zc:preprocessor -MP -Oi -wd4324 -wd4373 -wd5104 -wd5105 )
+add_compile_options( /std:c++latest /permissive- -MP -Oi -wd4324 -wd4373 -wd5104 -wd5105 )
+
+if ( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.26" )
+    add_compile_options( /Zc:preprocessor )
+else()
+    add_compile_options( /experimental:preprocessor )
+endif()
+
 add_definitions(
   -D_CRT_SECURE_NO_WARNINGS
   -D_SCL_SECURE_NO_WARNINGS


want libev, too

want libev, too

--- libbase.pc.cmake
+++ libbase.pc.cmake
@@ -5,5 +5,5 @@
 Version: @LIBBASE_VERSION@
 Requires: libpcre >= 7.0
 # Conflicts:
-Libs: -L@CMAKE_INSTALL_PREFIX@/lib -lbase -lpthread -pthread @POSIX_RT_LIBS@ @MYSQL_LDFLAGS@
+Libs: -L@CMAKE_INSTALL_PREFIX@/lib -lbase -lev -lpthread -pthread @POSIX_RT_LIBS@ @MYSQL_LDFLAGS@
 Cflags: -I@CMAKE_INSTALL_PREFIX@/include -pthread @CFLAGS_RDYNAMIC@ @MYSQL_CFLAGS@ @CXXFLAGS@


update head for libdvid

update head for libdvid

--- libdvidcpp.cmake
+++ libdvidcpp.cmake
@@ -12,7 +12,7 @@
 include (cppnetlib)

-set(LIBDVID_VERSION 704a826aaea3ade22835be3aeb5711d96fb616b4) # 2014-07-18
+set(LIBDVID_VERSION 8a2b915ca472d8e9858297bc98010812a70ba4fe) # 2014-07-25

 external_git_repo (libdvidcpp
     ${LIBDVID_VERSION}


Remove broken cmake version check, as the required version of cmake is 2.6 anyhow

--- lib/FindGuile.cmake
+++ lib/FindGuile.cmake
@@ -46,7 +46,7 @@

 # check guile's version if we're using cmake >= 2.6
-IF(GUILE_INCLUDE_DIR AND NOT CMAKE_MAJOR_VERSION LESS 2 AND NOT CMAKE_MINOR_VERSION LESS 6)
+IF(GUILE_INCLUDE_DIR)
 	SET(GUILE_VERSION_MAJOR 0)
 	SET(GUILE_VERSION_MINOR 0)
 	SET(GUILE_VERSION_PATCH 0)
@@ -75,7 +75,7 @@
 		SET(GUILE_FOUND TRUE)
 	ENDIF ()

-ENDIF(GUILE_INCLUDE_DIR AND NOT CMAKE_MAJOR_VERSION LESS 2 AND NOT CMAKE_MINOR_VERSION LESS 6)
+ENDIF(GUILE_INCLUDE_DIR)

 IF(GUILE_FOUND AND GUILE_VERSION_MAJOR EQUAL 2)
 	ADD_DEFINITIONS(-DHAVE_GUILE2)


Add compiler options [ci skip]

Add compiler options [ci skip]

--- tools/share/cmake/CxxFlags.cmake
+++ tools/share/cmake/CxxFlags.cmake
@@ -1,7 +1,9 @@
 ## RELEASE Flags
-SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
+SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -O3")

 ## DEBUG Flags
+### Forcing the compiler to work harder helps finding potential problems
+SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O")
 ### Show all warnings
 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall")
 ### Enable some extra warning flags


check for a given openfast executable when running ctest independently

--- ctest/steer.cmake
+++ ctest/steer.cmake
@@ -5,6 +5,15 @@
 set(MODEL "openfast")
 set(CTEST_SOURCE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
 set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/ctest-build")
+
+# verify that an openfast executable was given
+if( "${EXECUTABLE}" STREQUAL "")
+  message(FATAL_ERROR "
+    The -DEXECUTABLE flag is required to run CTest alone.
+    For example: ctest -S ctest/steer.cmake -V -DEXECUTABLE=/path/to/openfast.exe
+    CTest will exit.
+  ")
+endif( "${EXECUTABLE}" STREQUAL "")

 # -----------------------------------------------------------
 ## -- Set build name


Expand search paths for FindGLFW.cmake for Debian and other Linux architectures

PS: i have no access to a Debian release atm, so confirmation that this actually works
would be nice...

--- cmake/FindGLFW.cmake
+++ cmake/FindGLFW.cmake
@@ -129,8 +129,12 @@
                 $ENV{GLFW_LOCATION}/lib
                 ${GLFW_LOCATION}/lib/x11
                 $ENV{GLFW_LOCATION}/lib/x11
+                /usr/lib64
                 /usr/lib
+                /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
+                /usr/local/lib64
                 /usr/local/lib
+                /usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
                 /usr/openwin/lib
                 /usr/X11R6/lib
             DOC


save LLVM version to LLVM_VERSION cmake variable

--- cmake/FindLLVM.cmake
+++ cmake/FindLLVM.cmake
@@ -51,6 +51,12 @@
   OUTPUT_STRIP_TRAILING_WHITESPACE
 )

+execute_process(
+  COMMAND ${LLVM_CONFIG} --version
+  OUTPUT_VARIABLE LLVM_VERSION
+  OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+
 # Convert from whitespace-delimited words to a list
 string(REGEX MATCHALL "[a-zA-Z0-9]+" LLVM_TARGETS ${LLVM_TARGETS_STR})


build: Add ${RING_INCLUDE_DIR} to set the daemon header path

Refs #72463

--- cmake/FindRing.cmake
+++ cmake/FindRing.cmake
@@ -6,6 +6,8 @@

 IF(EXISTS ${CMAKE_INSTALL_PREFIX}/include/dring/dring.h)
    SET(ring_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include/dring)
+ELSEIF(EXISTS ${RING_INCLUDE_DIR}/dring.h)
+   SET(ring_INCLUDE_DIRS ${RING_INCLUDE_DIR})
 ELSEIF(EXISTS ${RING_BUILD_DIR}/dring/dring.h)
    SET(ring_INCLUDE_DIRS ${RING_BUILD_DIR}/dring)
 ELSE()


boost regex lib

boost regex lib

--- cmake/examples.cmake
+++ cmake/examples.cmake
@@ -1,5 +1,5 @@
 find_package(JsonCPP REQUIRED)
-find_package(Boost COMPONENTS system thread date_time chrono REQUIRED)
+find_package(Boost COMPONENTS system thread date_time chrono regex REQUIRED)

 set(CMAKE_THREAD_PREFER_PTHREAD ON)
 find_package(Threads REQUIRED)
@@ -22,6 +22,7 @@
         ${Boost_THREAD_LIBRARY}
         ${Boost_DATE_TIME_LIBRARY}
         ${Boost_CHRONO_LIBRARY}
+        ${Boost_REGEX_LIBRARY}
         ${CMAKE_THREAD_LIBS_INIT}
     )
     if(WIN32)


change possibilities for index_t (#310)

change possibilities for index_t (#310)

--- cmake/gsConfig.cmake
+++ cmake/gsConfig.cmake
@@ -48,9 +48,9 @@
    set (GISMO_INDEX_TYPE "int" CACHE STRING
    #math(EXPR BITSZ_VOID_P "8*${CMAKE_SIZEOF_VOID_P}")
    #set (GISMO_INDEX_TYPE "int${BITSZ_VOID_P}_t" CACHE STRING
-   "Index type(int, int32_t, int64_t, unsigned, size_t)" FORCE)
+   "Index type(int, int32_t, int64_t, long, long long)" FORCE)
    set_property(CACHE GISMO_INDEX_TYPE PROPERTY STRINGS
-   "int" "int32_t" "int64_t" "unsigned" "size_t" )
+   "int" "int32_t" "int64_t" "long" "long long" )
 endif()

 # Set a default build type if none was specified


fix for mingw

fix for mingw

git-svn-id: 6b1c4fe79111c0bc0cce83313250759594f8984b@5960 e128ff1e-fa79-4151-a8cb-522299a2c450

--- cmake/gsConfig.cmake
+++ cmake/gsConfig.cmake
@@ -140,7 +140,10 @@

 if (CMAKE_COMPILER_IS_GNUCXX)
   #-Wl,--no-allow-shlib-undefined
-  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,-z,defs")
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
+  if (NOT MINGW)
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
+  endif()
 endif()

 if (MINGW)


Get QuRT drivers out of the way, as we are using our own

--- cmake/configs/qurt_eagle_default.cmake
+++ cmake/configs/qurt_eagle_default.cmake
@@ -1,14 +1,14 @@
 include(qurt/px4_impl_qurt)

-if ("${HEXAGON_DRIVERS_ROOT}" STREQUAL "")
-	message(FATAL_ERROR "HEXAGON_DRIVERS_ROOT is not set")
-endif()
+#if ("${HEXAGON_DRIVERS_ROOT}" #STREQUAL "")
+#	message(FATAL_ERROR "HEXAGON_DRIVERS_ROOT is not set")
+#endif()

-if ("${EAGLE_DRIVERS_SRC}" STREQUAL "")
-	message(FATAL_ERROR "EAGLE_DRIVERS_SRC is not set")
-endif()
+#if ("${EAGLE_DRIVERS_SRC}" STREQUAL "")
+#	message(FATAL_ERROR "EAGLE_DRIVERS_SRC is not set")
+#endif()

-include_directories(${HEXAGON_DRIVERS_ROOT}/inc)
+#include_directories(${HEXAGON_DRIVERS_ROOT}/inc)

 # For Actual flight we need to link against the driver dynamic libraries
 set(target_libraries


Add testing note

Add testing note

[skip ci]

--- cmake/modules/hunter_find_helper.cmake
+++ cmake/modules/hunter_find_helper.cmake
@@ -7,6 +7,11 @@
 include(hunter_status_debug)
 include(hunter_user_error)

+# Test examples:
+# * android
+# * android_log
+# * egl
+# * gles2
 function(hunter_find_helper)
   set(optional "")
   set(one LIBRARY HEADER)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Fix issue CMAKE-18: FindPoppler implements QUIET

Change-Id: I974731f4ba94209ae2668019786526347fb62911

--- cmake/modules/FindPoppler.cmake
+++ cmake/modules/FindPoppler.cmake
@@ -40,7 +40,9 @@
 )

 IF( NOT(POPPLER_XPDF_INCLUDE_DIR) )
-  MESSAGE( STATUS "Could not find poppler-config.h, disabling support for Xpdf headers." )
+  IF ( NOT Poppler_FIND_QUIETLY )
+    MESSAGE( STATUS "Could not find poppler-config.h, disabling support for Xpdf headers." )
+  ENDIF ( NOT Poppler_FIND_QUIETLY )
   SET( POPPLER_HAS_XPDF false )
 ELSE( NOT(POPPLER_XPDF_INCLUDE_DIR) )
   SET( POPPLER_HAS_XPDF true )
@@ -58,55 +60,59 @@
     lib
 )
 IF ( NOT(POPPLER_LIBRARIES) )
-  MESSAGE(STATUS "Could not find libpoppler." )
-ENDIF ()
-
-# Scan poppler libraries for dependencies on Fontconfig
-INCLUDE(GetPrerequisites)
-MARK_AS_ADVANCED(gp_cmd)
-GET_PREREQUISITES("${POPPLER_LIBRARIES}" POPPLER_PREREQS 1 0 "" "")
-IF ("${POPPLER_PREREQS}" MATCHES "fontconfig")
-  SET(POPPLER_NEEDS_FONTCONFIG TRUE)
-ELSE ()
-  SET(POPPLER_NEEDS_FONTCONFIG FALSE)
-ENDIF ()
+  IF ( NOT Poppler_FIND_QUIETLY )
+    MESSAGE(STATUS "Could not find libpoppler." )
+  ENDIF ( NOT Poppler_FIND_QUIETLY )
+ELSE( NOT(POPPLER_LIBRARIES) )
+  # Scan poppler libraries for dependencies on Fontconfig
+  INCLUDE(GetPrerequisites)
+  MARK_AS_ADVANCED(gp_cmd)
+  GET_PREREQUISITES("${POPPLER_LIBRARIES}" POPPLER_PREREQS 1 0 "" "")
+  IF ("${POPPLER_PREREQS}" MATCHES "fontconfig")
+    SET(POPPLER_NEEDS_FONTCONFIG TRUE)
+  ELSE ()
+    SET(POPPLER_NEEDS_FONTCONFIG FALSE)
+  ENDIF ()

-FIND_PATH(POPPLER_QT_INCLUDE_DIR NAMES poppler-qt${QT_VERSION_MAJOR}.h poppler-link.h
-  PATHS
-    /usr/local/include
-    /usr/include
-  HINTS
-    ${POPPLER_QT_PKG_INCLUDE_DIRS} # Generated by pkg-config
-  PATH_SUFFIXES
-    poppler
-    qt${QT_VERSION_MAJOR}
-    poppler/qt${QT_VERSION_MAJOR}
-)
-IF ( NOT(POPPLER_QT_INCLUDE_DIR) )
-  MESSAGE(STATUS "Could not find Poppler-Qt${QT_VERSION_MAJOR} headers." )
-ENDIF ()
-FIND_LIBRARY(POPPLER_QT_LIBRARIES NAMES poppler-qt${QT_VERSION_MAJOR} ${POPPLER_QT_PKG_LIBRARIES}
-  PATHS
-    /usr/local
-    /usr
-  HINTS
-    ${POPPLER_PKG_LIBRARY_DIRS} # Generated by pkg-config
-  PATH_SUFFIXES
-    lib64
-    lib
-)
-MARK_AS_ADVANCED(POPPLER_QT_LIBRARIES)
-IF ( NOT(POPPLER_QT_LIBRARIES) )
-  MESSAGE(STATUS "Could not find libpoppler-qt${QT_VERSION_MAJOR}." )
-ENDIF ()
-LIST(INSERT POPPLER_LIBRARIES 0 ${POPPLER_QT_LIBRARIES})
-
+  FIND_PATH(POPPLER_QT_INCLUDE_DIR NAMES poppler-qt${QT_VERSION_MAJOR}.h poppler-link.h
+    PATHS
+      /usr/local/include
+      /usr/include
+    HINTS
+      ${POPPLER_QT_PKG_INCLUDE_DIRS} # Generated by pkg-config
+    PATH_SUFFIXES
+      poppler
+      qt${QT_VERSION_MAJOR}
+      poppler/qt${QT_VERSION_MAJOR}
+  )
+  IF ( NOT(POPPLER_QT_INCLUDE_DIR) )
+    IF ( NOT Poppler_FIND_QUIETLY )
+      MESSAGE(STATUS "Could not find Poppler-Qt${QT_VERSION_MAJOR} headers." )
+    ENDIF ( NOT Poppler_FIND_QUIETLY )
+  ENDIF ()
+  FIND_LIBRARY(POPPLER_QT_LIBRARIES NAMES poppler-qt${QT_VERSION_MAJOR} ${POPPLER_QT_PKG_LIBRARIES}
+    PATHS
+      /usr/local
+      /usr
+    HINTS
+      ${POPPLER_PKG_LIBRARY_DIRS} # Generated by pkg-config
+    PATH_SUFFIXES
+      lib64
+      lib
+  )
+  IF ( NOT(POPPLER_QT_LIBRARIES) )
+    IF ( NOT Poppler_FIND_QUIETLY )
+      MESSAGE(STATUS "Could not find libpoppler-qt${QT_VERSION_MAJOR}." )
+    ENDIF ( NOT Poppler_FIND_QUIETLY )
+  ENDIF ()
+  LIST(INSERT POPPLER_LIBRARIES 0 ${POPPLER_QT_LIBRARIES})
+ENDIF ( NOT(POPPLER_LIBRARIES) )

 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Poppler DEFAULT_MSG POPPLER_LIBRARIES POPPLER_QT_INCLUDE_DIR )

 # show the POPPLER_(XPDF/QT4)_INCLUDE_DIR and POPPLER_LIBRARIES variables only in the advanced view
-MARK_AS_ADVANCED(POPPLER_XPDF_INCLUDE_DIR POPPLER_QT_INCLUDE_DIR POPPLER_LIBRARIES)
+MARK_AS_ADVANCED(POPPLER_XPDF_INCLUDE_DIR POPPLER_QT_INCLUDE_DIR POPPLER_LIBRARIES POPPLER_QT_LIBRARIES)


Addition now has a method (what a sad state of things).

--- cmake/fp.cmake
+++ cmake/fp.cmake
@@ -7,6 +7,9 @@
 message("      FP_WIDTH=w        Width w in [2,6] of window processing for exponentiation methods.\n")

 message("   ** Available prime field arithmetic methods (default = COMBA;COMBA;MONTY;SLIDE):")
+message("      FP_METHD=BASIC    Schoolbook addition.")
+message("      FP_METHD=INTEG    Integrated modular addition.\n")
+
 message("      FP_METHD=BASIC    Schoolbook multiplication.\n")
 message("      FP_METHD=INTEG    Integrated modular multiplication.")
 message("      FP_METHD=COMBA    Comba multiplication.")
@@ -51,16 +54,17 @@

 # Choose the arithmetic methods.
 if (NOT FP_METHD)
-	set(FP_METHD "COMBA;COMBA;MONTY;SLIDE;MONTY")
+	set(FP_METHD "BASIC;COMBA;COMBA;MONTY;MONTY;SLIDE")
 endif(NOT FP_METHD)
 list(LENGTH FP_METHD FP_LEN)
-if (FP_LEN LESS 5)
+if (FP_LEN LESS 6)
 	message(FATAL_ERROR "Incomplete FP_METHD specification: ${FP_METHD}")
-endif(FP_LEN LESS 5)
+endif(FP_LEN LESS 6)

-list(GET FP_METHD 0 FP_MUL)
-list(GET FP_METHD 1 FP_SQR)
-list(GET FP_METHD 2 FP_RDC)
-list(GET FP_METHD 3 FP_INV)
-list(GET FP_METHD 4 FP_EXP)
+list(GET FP_METHD 0 FP_ADD)
+list(GET FP_METHD 1 FP_MUL)
+list(GET FP_METHD 2 FP_SQR)
+list(GET FP_METHD 3 FP_RDC)
+list(GET FP_METHD 4 FP_INV)
+list(GET FP_METHD 5 FP_EXP)
 set(FP_METHD ${FP_METHD} CACHE STRING "Prime field arithmetic method")


STYLE: Mark the Python module variables as advanced.

--- CMake/FindPythonLibs.cmake
+++ CMake/FindPythonLibs.cmake
@@ -113,6 +113,11 @@
   OPTION(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE)
   OPTION(PYTHON_MODULE_${_NAME}_BUILD_SHARED "Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS})

+  # Mark these options as advanced
+  MARK_AS_ADVANCED(
+    PYTHON_ENABLE_MODULE_${_NAME}
+    PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+
   IF(PYTHON_ENABLE_MODULE_${_NAME})
     IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
       SET(PY_MODULE_TYPE MODULE)


Let iree_cc_library mirror Bazel cc_library more faithfully. (#4453)

In Bazel, in cc_library, copts and linkopts apply only to the library
itself, not its dependents. In a header-only cc_library, copts and linkopts
are ignored.

--- build_tools/cmake/iree_cc_library.cmake
+++ build_tools/cmake/iree_cc_library.cmake
@@ -164,16 +164,6 @@
         "$<BUILD_INTERFACE:${IREE_SOURCE_DIR}>"
         "$<BUILD_INTERFACE:${IREE_BINARY_DIR}>"
     )
-    target_compile_options(${_NAME}
-      INTERFACE
-        ${IREE_DEFAULT_COPTS}
-        ${_RULE_COPTS}
-    )
-    target_link_options(${_NAME}
-      INTERFACE
-        ${IREE_DEFAULT_LINKOPTS}
-        ${_RULE_LINKOPTS}
-    )
     target_link_libraries(${_NAME}
       INTERFACE
         ${_RULE_DEPS}


Push ParaView forward

Push ParaView forward

To include numpy fix

--- versions.cmake
+++ versions.cmake
@@ -92,7 +92,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision with OpenGL2 rendering before updating, update often!
-  set(_paraview_revision "7db25af8b51995d2364254f21886cfa8a5e6f666")
+  set(_paraview_revision "0b442c68528129a61a0d4a34ba5f3dc9b9736a08")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


Fix lua missing when reimported

Fix lua missing when reimported

--- 3rd_party/lua/lua.cmake
+++ 3rd_party/lua/lua.cmake
@@ -10,22 +10,24 @@
         EchoWithColor(COLOR GREEN "-- Dependency: Lua found.(${LUA_INCLUDE_DIR}:${LUA_LIBRARIES})")
         if (LUA_INCLUDE_DIR)
             list(APPEND 3RD_PARTY_PUBLIC_INCLUDE_DIRS ${LUA_INCLUDE_DIR})
+            set(3RD_PARTY_LUA_INC_DIR ${LUA_INCLUDE_DIR})
         endif ()

-        if (3RD_PARTY_LUA_LINK_NAME)
-            list(APPEND 3RD_PARTY_PUBLIC_LINK_NAMES ${3RD_PARTY_LUA_LINK_NAME})
+        if (LUA_LIBRARIES)
+            list(APPEND 3RD_PARTY_PUBLIC_LINK_NAMES ${LUA_LIBRARIES})
+            set(3RD_PARTY_LUA_LINK_NAME ${LUA_LIBRARIES})
         endif ()
     endif ()
 endmacro()

-if (NOT TARGET lua AND NOT LUA_FOUND)
+if (NOT TARGET lua AND NOT (3RD_PARTY_LUA_INC_DIR AND 3RD_PARTY_LUA_LINK_NAME))
     if (VCPKG_TOOLCHAIN)
         find_package(Lua)
         PROJECT_3RD_PARTY_LUA_IMPORT()
     endif ()
 endif()

-if (NOT TARGET lua AND NOT LUA_FOUND)
+if (NOT TARGET lua AND NOT (3RD_PARTY_LUA_INC_DIR AND 3RD_PARTY_LUA_LINK_NAME))
     if (NOT 3RD_PARTY_LUA_BASE_DIR)
         set(3RD_PARTY_LUA_BASE_DIR ${CMAKE_CURRENT_LIST_DIR})
     endif ()
@@ -41,42 +43,39 @@
         set (3RD_PARTY_LUA_ROOT_DIR ${3RD_PARTY_LUA_REPO_DIR})
     endif()

+    find_path(3RD_PARTY_LUA_INC_DIR NAMES "lua.h" PATH_SUFFIXES include src PATHS ${3RD_PARTY_LUA_ROOT_DIR} NO_DEFAULT_PATH)
+    find_library(3RD_PARTY_LUA_LINK_NAME NAMES lua liblua PATH_SUFFIXES lib lib64 PATHS ${3RD_PARTY_LUA_ROOT_DIR} NO_DEFAULT_PATH)
     if (NOT 3RD_PARTY_LUA_INC_DIR OR NOT 3RD_PARTY_LUA_LINK_NAME)
-        find_path(3RD_PARTY_LUA_INC_DIR NAMES "lua.h" PATH_SUFFIXES include src PATHS ${3RD_PARTY_LUA_ROOT_DIR} NO_DEFAULT_PATH)
-        find_library(3RD_PARTY_LUA_LINK_NAME NAMES lua liblua PATH_SUFFIXES lib lib64 PATHS ${3RD_PARTY_LUA_ROOT_DIR} NO_DEFAULT_PATH)
-        if (NOT 3RD_PARTY_LUA_INC_DIR OR NOT 3RD_PARTY_LUA_LINK_NAME)
-            message(STATUS "Clone lua ${3RD_PARTY_LUA_VERSION}")
-            if (PROJECT_GIT_REMOTE_ORIGIN_USE_SSH AND NOT PROJECT_GIT_CLONE_REMOTE_ORIGIN_DISABLE_SSH)
-                set (3RD_PARTY_LUA_REPO_URL "git@git.code.oa.com:atframework/lua.git")
-            else ()
-                set (3RD_PARTY_LUA_REPO_URL "http://git.code.oa.com/atframework/lua.git")
+        if (PROJECT_GIT_REMOTE_ORIGIN_USE_SSH AND NOT PROJECT_GIT_CLONE_REMOTE_ORIGIN_DISABLE_SSH)
+            set (3RD_PARTY_LUA_REPO_URL "git@git.code.oa.com:atframework/lua.git")
+        else ()
+            set (3RD_PARTY_LUA_REPO_URL "http://git.code.oa.com/atframework/lua.git")
+        endif ()
+        project_git_clone_3rd_party(
+            URL ${3RD_PARTY_LUA_REPO_URL}
+            REPO_DIRECTORY ${3RD_PARTY_LUA_REPO_DIR}
+            DEPTH 200
+            TAG ${3RD_PARTY_LUA_VERSION}
+            WORKING_DIRECTORY ${3RD_PARTY_LUA_BASE_DIR}
+        )
+        set (3RD_PARTY_LUA_BUILD_DIR "${CMAKE_BINARY_DIR}/deps/lua-${3RD_PARTY_LUA_VERSION}")
+        find_path(3RD_PARTY_LUA_SRC_DIR NAMES "lua.h" "lauxlib.h" PATH_SUFFIXES src PATHS ${3RD_PARTY_LUA_ROOT_DIR} NO_DEFAULT_PATH)
+        if (3RD_PARTY_LUA_SRC_DIR)
+            set(3RD_PARTY_LUA_INC_DIR ${3RD_PARTY_LUA_SRC_DIR})
+            set(3RD_PARTY_LUA_LINK_NAME lua)
+
+            if (NOT EXISTS ${3RD_PARTY_LUA_BUILD_DIR})
+                file(MAKE_DIRECTORY ${3RD_PARTY_LUA_BUILD_DIR})
             endif ()
-            project_git_clone_3rd_party(
-                URL ${3RD_PARTY_LUA_REPO_URL}
-                REPO_DIRECTORY ${3RD_PARTY_LUA_REPO_DIR}
-                DEPTH 200
-                TAG ${3RD_PARTY_LUA_VERSION}
-                WORKING_DIRECTORY ${3RD_PARTY_LUA_BASE_DIR}
-            )
-            set (3RD_PARTY_LUA_BUILD_DIR "${CMAKE_BINARY_DIR}/deps/lua-${3RD_PARTY_LUA_VERSION}")
-            find_path(3RD_PARTY_LUA_SRC_DIR NAMES "lua.h" "lauxlib.h" PATH_SUFFIXES src PATHS ${3RD_PARTY_LUA_ROOT_DIR} NO_DEFAULT_PATH)
-            if (3RD_PARTY_LUA_SRC_DIR)
-                set(3RD_PARTY_LUA_INC_DIR ${3RD_PARTY_LUA_SRC_DIR})
-                set(3RD_PARTY_LUA_LINK_NAME lua)

-                if (NOT EXISTS ${3RD_PARTY_LUA_BUILD_DIR})
-                    file(MAKE_DIRECTORY ${3RD_PARTY_LUA_BUILD_DIR})
-                endif ()
-
-                # patch for ios SDK 11.0 or upper
-                if (CMAKE_HOST_APPLE OR APPLE)
-                    execute_process(COMMAND
-                        sed -E -i.bak "s/system[^;]+;/luaL_error(L, \"can not call this function on macOS or ios\");/g" loslib.c
-                        WORKING_DIRECTORY ${3RD_PARTY_LUA_SRC_DIR}
-                    )
-                endif ()
-                add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/build-script" ${3RD_PARTY_LUA_BUILD_DIR})
+            # patch for ios SDK 11.0 or upper
+            if (CMAKE_HOST_APPLE OR APPLE)
+                execute_process(COMMAND
+                    sed -E -i.bak "s/system[^;]+;/luaL_error(L, \"can not call this function on macOS or ios\");/g" loslib.c
+                    WORKING_DIRECTORY ${3RD_PARTY_LUA_SRC_DIR}
+                )
             endif ()
+            add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/build-script" ${3RD_PARTY_LUA_BUILD_DIR})
         endif ()
     endif ()


CMake: error if LIB_NAME is not set

CMake: error if LIB_NAME is not set

--- cmake/CMakeModules/OssimUtilities.cmake
+++ cmake/CMakeModules/OssimUtilities.cmake
@@ -179,10 +179,13 @@
         ADD_EXECUTABLE(${TARGET_TARGETNAME} ${PLATFORM_SPECIFIC_CONTROL} ${APPLICATION_SOURCE_FILES} ${APPLICATION_HEADERS})

       ENDIF(APPLICATION_COMMAND_LINE)
-
-      if(TARGET ${LIB_NAME})
-	ADD_DEPENDENCIES(${TARGET_TARGETNAME} ${LIB_NAME})
+
+      if(NOT LIB_NAME)
+	message(FATAL_ERROR "LIB_NAME must be set before calling OSSIM_SETUP_APPLICATION() macro")
       endif()
+      add_dependencies(${TARGET_TARGETNAME} ${LIB_NAME})
+      target_link_libraries(${TARGET_TARGETNAME} ${LIB_NAME})
+
     SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES PROJECT_LABEL "${TARGET_LABEL}")
     SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES OUTPUT_NAME ${TARGET_NAME})
     SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES DEBUG_OUTPUT_NAME "${TARGET_NAME}${CMAKE_DEBUG_POSTFIX}")


build: fix the clang-cl executable link command

ClangClCompileRules.cmake overrides CMAKE_C_LINK_EXECUTABLE to invoke the C
compiler, but clang-cl does not accept linker flags, so tests will fail to link.
The default is fine, so delete this line.

--- cmake/modules/ClangClCompileRules.cmake
+++ cmake/modules/ClangClCompileRules.cmake
@@ -3,6 +3,3 @@
 # put a -- before the input file path to force it to be treated as a path.
 string(REPLACE "-c <SOURCE>" "-c -- <SOURCE>" CMAKE_C_COMPILE_OBJECT "${CMAKE_C_COMPILE_OBJECT}")
 string(REPLACE "-c <SOURCE>" "-c -- <SOURCE>" CMAKE_CXX_COMPILE_OBJECT "${CMAKE_CXX_COMPILE_OBJECT}")
-
-set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-


Explicitly add a dependency on M4 targets via M4_EXECUTABLE

Change-Id: I4b49cc7f74002301b2f5591d43f71819625b903e
GitOrigin-RevId: 1a98e24a5aa0a75279d8a6df3bfc6d7a7c6da1e7

--- cmake/toolchain-arm-none-eabi-gcc.cmake
+++ cmake/toolchain-arm-none-eabi-gcc.cmake
@@ -171,6 +171,9 @@
         file(GENERATE OUTPUT ${ARGV0}.m4_executable CONTENT "${ADD_EXECUTABLE_M7_M4_EXECUTABLE}")
     endif ()
     add_executable(${ADD_EXECUTABLE_M7_UNPARSED_ARGUMENTS} ${M4_EXECUTABLE})
+    if (ADD_EXECUTABLE_M7_M4_EXECUTABLE)
+        add_dependencies(${ARGV0} ${ADD_EXECUTABLE_M7_M4_EXECUTABLE})
+    endif ()
     target_compile_options(${ARGV0} PUBLIC ${CM7_C_FLAGS})
     target_link_options(${ARGV0} PUBLIC ${CM7_LINK_FLAGS} ${LINKER_SCRIPT})
     add_custom_command(TARGET ${ARGV0} POST_BUILD


Update the tzdata url for the C++ build.

Fixes #421

Signed-off-by: Owen O'Malley <54ea18af6a9d2f71f251392755b45ef039a9facd@apache.org>

--- cmake_modules/ThirdpartyToolchain.cmake
+++ cmake_modules/ThirdpartyToolchain.cmake
@@ -228,8 +228,8 @@

 if (WIN32)
   ExternalProject_Add(tzdata_ep
-    URL "ftp://cygwin.osuosl.org/pub/cygwin/noarch/release/tzdata/tzdata-2018c-1.tar.xz"
-    URL_HASH MD5=F69FCA5C906FAFF02462D3D06F28267C
+    URL "ftp://cygwin.osuosl.org/pub/cygwin/noarch/release/tzdata/tzdata-2019b-1.tar.xz"
+    URL_HASH MD5=17D8AB346BB1009D4EB35BC08040E51D
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""
     INSTALL_COMMAND "")


BUG: --config comes after --build

BUG: --config comes after --build

--- Packaging/Files/build_examples.cmake
+++ Packaging/Files/build_examples.cmake
@@ -57,8 +57,8 @@
 # the code is written in a way that it is easy to stuff these two
 # into a cmake foreach
 execute_process(COMMAND ${CMAKE_COMMAND}
+  --build ${TEST_DIR}
   --config RelWithDebInfo
-  --build ${TEST_DIR}
   --target HelloWorldOTB
   WORKING_DIRECTORY ${TEST_DIR}
   RESULT_VARIABLE build_HelloWorldOTB_rv
@@ -74,8 +74,8 @@
 endif()

 execute_process(COMMAND ${CMAKE_COMMAND}
+  --build ${TEST_DIR}
   --config RelWithDebInfo
-  --build ${TEST_DIR}
   --target Pipeline
   WORKING_DIRECTORY ${TEST_DIR}
   RESULT_VARIABLE build_Pipeline_rv


some minor cleanups.

some minor cleanups.

--- Buildroot.cmake
+++ Buildroot.cmake
@@ -200,8 +200,7 @@
     find_artifact_file(device_tree_artifact_prebuilt "${BR_DEVICE_TREE_ARTIFACT_PREBUILT}")
     find_artifact_file(host_tools_artifact_prebuilt "${BR_HOST_TOOLS_ARTIFACT_PREBUILT}")

-    if(NOT artifact_prebuilt AND (device_tree_artifact_prebuilt OR
-            host_tools_artifact_prebuilt))
+    if(NOT artifact_prebuilt AND (device_tree_artifact_prebuilt OR host_tools_artifact_prebuilt))
         message(WARNING
                 "Some artifacts for ${name} were found but the main artifact "
                 "is missing, so ${name} will be built from source.")


back to c++98...

back to c++98...

--- scripts/common.cmake
+++ scripts/common.cmake
@@ -60,7 +60,7 @@

 if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
     add_compiler_flags(-Werror)
-    add_compiler_flags(-std=c++11)
+    add_compiler_flags(-std=c++98)
     add_compiler_flags(-pedantic)
     add_compiler_flags(-pedantic-errors)
     add_compiler_flags(-fvisibility=hidden)


ENH: new macro CHECK_AND_SET for setting compiler flags

--- CMake/CoreHelpers.cmake
+++ CMake/CoreHelpers.cmake
@@ -49,4 +49,15 @@
 ENDIF(MSVC80)
 ENDMACRO(SUPPRESS_VC8_DEPRECATED_WARNINGS)

+INCLUDE(${CMAKE_ROOT}/Modules/TestCXXAcceptsFlag.cmake)
+MACRO(CHECK_AND_SET flag sourcelist )
+  CHECK_CXX_ACCEPTS_FLAG(${flag} R)
+  IF(R)
+    SET_SOURCE_FILES_PROPERTIES(
+      ${${sourcelist}}
+       PROPERTIES
+       COMPILE_FLAGS ${flag}
+      )
+  ENDIF(R)
+ENDMACRO(CHECK_AND_SET)


fixed: no 64 libdir suffix on windows

fixed: no 64 libdir suffix on windows

--- CMake/ExternalProjectHelper.cmake
+++ CMake/ExternalProjectHelper.cmake
@@ -22,7 +22,9 @@
   IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
     SET(OSG_PLATFORM_64 1)
     SET(OSG_LIBDIR_SUFFIX "64")
-    SET(OSG_LIBDIR_BASE_SUFFIX "64")
+    IF(NOT WIN32)
+      SET(OSG_LIBDIR_BASE_SUFFIX "64")
+    ENDIF()
   ELSE()
     SET(OSG_PLATFORM_32 1)
   ENDIF()


Add freetype version 2.5.2

Add freetype version 2.5.2

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -31,7 +31,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype251 freetype2501 freetype250 freetype2412 freetype2411 freetype2410 freetype249 freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
+set(FREETYPE_LIBRARY_NAMES freetype252 freetype251 freetype2501 freetype250 freetype2412 freetype2411 freetype2410 freetype249 freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


Hide FREETYPE_FT2BUILD_INCLUDE_DIR variable

--HG--
branch : v1-7
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/branches/v1-7%401773

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -49,6 +49,7 @@
 make_library_set(FREETYPE_LIBRARY)

 findpkg_finish(FREETYPE)
+mark_as_advanced(FREETYPE_FT2BUILD_INCLUDE_DIR)
 if (NOT FREETYPE_FT2BUILD_INCLUDE_DIR STREQUAL FREETYPE_INCLUDE_DIR)
   set(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${FREETYPE_FT2BUILD_INCLUDE_DIR})
 endif ()


[FIX] Fixing contribs fallback.

[FIX] Fixing contribs fallback.

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

--- util/cmake/SeqAnContribs.cmake
+++ util/cmake/SeqAnContribs.cmake
@@ -69,8 +69,8 @@
 			set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
 		endif (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
 	endif (NOT DEFINED SEQAN_CONTRIB_BASE)
-    # Try to fall back to x86 on C:\ (MinGW is only available as 32 bit).
-    set (CONTRIB_ARCH "x86")
+    # Try to fall back to x64 on C:\ (MinGW is only available as 32 bit).
+    set (CONTRIB_ARCH "x64")
     if (NOT DEFINED SEQAN_CONTRIB_BASE)
         if (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
             set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")


broken setup

broken setup

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@1311 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/LibraryProjectSetup.cmake
+++ Numerics/cmake/LibraryProjectSetup.cmake
@@ -201,29 +201,27 @@
     SET(_install_include include)
     SET(${PROJECT_NAME}_INSTALL_INCLUDE_DIR ${_install_include})
   ENDIF(${PROJECT_NAME}_INSTALL_INCLUDE_DIR)
-
-INSTALL(FILES ${${PROJECT_NAME}_HDRS} DESTINATION ${_install_include})
-
-IF(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)
-  INSTALL(TARGETS
-    ${PROJECT_NAME}_static ${PROJECT_NAME}_shared
-    ARCHIVE DESTINATION ${_install_lib}
-    LIBRARY DESTINATION ${_install_lib})
-ELSEIF(BUILD_SHARED_LIBS)
+
+  INSTALL(FILES ${${PROJECT_NAME}_HDRS} DESTINATION ${_install_include})
+
+  IF(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)
     INSTALL(TARGETS
-    ${PROJECT_NAME}_shared
-    ARCHIVE DESTINATION ${_install_lib}
-    LIBRARY DESTINATION ${_install_lib})
-ELSEIF(BUILD_STATIC_LIBS)
+      ${PROJECT_NAME}_static ${PROJECT_NAME}_shared
+      ARCHIVE DESTINATION ${_install_lib}
+      LIBRARY DESTINATION ${_install_lib})
+  ELSEIF(BUILD_SHARED_LIBS)
     INSTALL(TARGETS
-    ${PROJECT_NAME}_static
-    ARCHIVE DESTINATION ${_install_lib}
-    LIBRARY DESTINATION ${_install_lib})
-ELSE(BUILD_STATIC_LIBS)
-  MESSAGE("ERROR:: BUILD_SHARED_LIBS and/or BUILD_SHARED_LIBS must be set")
-ENDIF(BUILD_STATIC_LIBS)
-ENDIF(BUILD_SHARED_LIBS)
-ENDIF(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)
+      ${PROJECT_NAME}_shared
+      ARCHIVE DESTINATION ${_install_lib}
+      LIBRARY DESTINATION ${_install_lib})
+  ELSEIF(BUILD_STATIC_LIBS)
+    INSTALL(TARGETS
+      ${PROJECT_NAME}_static
+      ARCHIVE DESTINATION ${_install_lib}
+      LIBRARY DESTINATION ${_install_lib})
+  ELSE(BUILD_STATIC_LIBS)
+    MESSAGE("ERROR:: BUILD_SHARED_LIBS and/or BUILD_SHARED_LIBS must be set")
+  ENDIF(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)

   MESSAGE(STATUS "${PROJECT_NAME} library setup done")


Windows builds default to /fp:strict

Windows builds default to /fp:strict

--- Source/cmake_core.cmake
+++ Source/cmake_core.cmake
@@ -95,6 +95,7 @@

             # MSVC compiler defines
             $<$<CXX_COMPILER_ID:MSVC>:/EHsc>
+            $<$<CXX_COMPILER_ID:MSVC>:/fp:strict>

             # G++ and Clang++ compiler defines
             $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall>


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/KWSys/vtksys/kwsysDateStamp.cmake
+++ Utilities/KWSys/vtksys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


Set compiler flags in a CMake-friendly way.

Also remove the default -march=native which causes so much agnst among
users. Explicit is better than implicit - -march=native will now be a
recommendation in the documentation, and users are then free to choose
whatever they want to do.

--- CMake/hoomd/HOOMDCFlagsSetup.cmake
+++ CMake/hoomd/HOOMDCFlagsSetup.cmake
@@ -1,75 +1,38 @@
-# Maintainer: joaander
+# Set a default build type if none was specified
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+  message(STATUS "Setting build type to 'Release' as none was specified.")
+  set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
+  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
+    "MinSizeRel" "RelWithDebInfo")
+endif()

-#################################
-## Setup default CXXFLAGS
-if(NOT PASSED_FIRST_CONFIGURE)
-    message(STATUS "Overriding CMake's default CFLAGS (this should appear only once)")
+# enable C++11
+if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.1.0)
+    # let cmake set the flags
+    set(CMAKE_CXX_STANDARD 11)
+    set(CMAKE_CXX_STANDARD_REQUIRED ON)
+    # findcuda needs to be told explicitly to use c++11 as CMAKE_CXX_STANDARD does not modify CMAKE_CXX_FLAGS
+    set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++11")
+else()
+    # manually enable flags
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+endif()

-    ## Allow GCC_ARCH flag to set the -march field
-    if(NOT GCC_ARCH AND "$ENV{GCC_ARCH}" STREQUAL "")
-        set(GCC_ARCH "native")
-        message(STATUS "GCC_ARCH env var not set, setting -march to ${GCC_ARCH}")
-    else()
-        set(GCC_ARCH $ENV{GCC_ARCH})
-        message(STATUS "Found GCC_ARCH env var, setting -march to ${GCC_ARCH}")
+if (CMAKE_VERSION VERSION_LESS 3.3.0)
+    # older versions of cmake don't handle C++11 in FindCUDA - attempt to work around this.
+    set(CUDA_NVCC_FLAGS_DEBUG "${CUDA_NVCC_FLAGS_DEBUG} -std=c++11")
+    set(CUDA_NVCC_FLAGS_MINSIZEREL "${CUDA_NVCC_FLAGS_MINSIZERE} -std=c++11")
+    set(CUDA_NVCC_FLAGS_RELEASE "${CUDA_NVCC_FLAGS_RELEASE} -std=c++11")
+    set(CUDA_NVCC_FLAGS_RELWITHDEBINFO "${CUDA_NVCC_FLAGS_RELWITHDEBINFO} -std=c++11")
+endif()
+
+# Enable compiler warnings on gcc and clang (common compilers used by developers)
+if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unknown-pragmas -Wno-deprecated-declarations")
+    set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unknown-pragmas")
+
+    # quiet some annoying warnings on apple clang
+    if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND APPLE)
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++14-extensions")
     endif()
-
-
-    # default build type is Release when compiling make files
-    if(NOT CMAKE_BUILD_TYPE)
-       if(${CMAKE_GENERATOR} STREQUAL "Xcode")
-
-       else(${CMAKE_GENERATOR} STREQUAL "Xcode")
-            set(CMAKE_BUILD_TYPE "Release" CACHE STRING  "Build type: options are None, Release, Debug, RelWithDebInfo" FORCE)
-        endif(${CMAKE_GENERATOR} STREQUAL "Xcode")
-    endif()
-
-    if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
-
-        set(_common_options "-march=${GCC_ARCH} -Wall -Wno-unknown-pragmas")
-        set(_common_cxx_options "-march=${GCC_ARCH} -Wall -Wno-unknown-pragmas")
-
-        if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND APPLE)
-            set(_common_cxx_options "${_common_cxx_options} -Wno-c++14-extensions")
-        endif()
-
-        # default flags for g++
-        set(CMAKE_C_FLAGS_DEBUG "${_common_options} -g" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
-        set(CMAKE_C_FLAGS_MINSIZEREL "${_common_options} -Os -DNDEBUG" CACHE STRING "Flags used by the compiler during minimum size release builds." FORCE)
-        set(CMAKE_C_FLAGS_RELEASE "${_common_options} -O3 -funroll-loops -DNDEBUG" CACHE STRING "Flags used by the compiler during release builds." FORCE)
-        set(CMAKE_C_FLAGS_RELWITHDEBINFO "${_common_options} -g -O3 -funroll-loops -DNDEBUG" CACHE STRING "Flags used by the compiler during release builds with debug info." FORCE)
-
-        set(CMAKE_CXX_FLAGS_DEBUG "${_common_cxx_options} -g" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
-        set(CMAKE_CXX_FLAGS_MINSIZEREL "${_common_cxx_options} -Os -DNDEBUG" CACHE STRING "Flags used by the compiler during minimum size release builds." FORCE)
-        set(CMAKE_CXX_FLAGS_RELEASE "${_common_cxx_options} -O3 -funroll-loops -DNDEBUG" CACHE STRING "Flags used by the compiler during release builds." FORCE)
-        set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${_common_cxx_options} -g -O3 -funroll-loops -DNDEBUG" CACHE STRING "Flags used by the compiler during release builds with debug info." FORCE)
-
-    elseif(CMAKE_CXX_COMPILER MATCHES "icpc")
-        # default flags for intel
-        set(CMAKE_C_FLAGS_DEBUG "-xHOST -O0 -g" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
-        set(CMAKE_C_FLAGS_MINSIZEREL "-xHOST -Os -DNDEBUG" CACHE STRING "Flags used by the compiler during minimum size release builds." FORCE)
-        set(CMAKE_C_FLAGS_RELEASE "-xHOST -O3 -DNDEBUG" CACHE STRING "Flags used by the compiler during release builds." FORCE)
-        set(CMAKE_C_FLAGS_RELWITHDEBINFO "-xHOST -g -O3 -DNDEBUG" CACHE STRING "Flags used by the compiler during release builds with debug info." FORCE)
-
-        set(CMAKE_CXX_FLAGS_DEBUG "-xHOST -O0 -g" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
-        set(CMAKE_CXX_FLAGS_MINSIZEREL "-xHOST -Os -DNDEBUG" CACHE STRING "Flags used by the compiler during minimum size release builds." FORCE)
-        set(CMAKE_CXX_FLAGS_RELEASE "-xHOST -O3 -DNDEBUG" CACHE STRING "Flags used by the compiler during release builds." FORCE)
-        set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-xHOST -g -O3 -DNDEBUG" CACHE STRING "Flags used by the compiler during release builds with debug info." FORCE)
-
-    else(CMAKE_COMPILER_IS_GNUCXX)
-        message(STATUS "No default CXXFLAGS for your compiler, set them manually")
-    endif()
-
-    if (CMAKE_VERSION VERSION_LESS 3.3.0)
-        # older versions of cmake don't handle C++11 in FindCUDA - attempt to work around this.
-        set(CUDA_NVCC_FLAGS_DEBUG "--std=c++11" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
-        set(CUDA_NVCC_FLAGS_MINSIZEREL "-std=c++11" CACHE STRING "Flags used by the compiler during minimum size release builds." FORCE)
-        set(CUDA_NVCC_FLAGS_RELEASE "-std=c++11" CACHE STRING "Flags used by the compiler during release builds." FORCE)
-        set(CUDA_NVCC_FLAGS_RELWITHDEBINFO "-std=c++11" CACHE STRING "Flags used by the compiler during release builds with debug info." FORCE)
-
-    endif()
-
-SET(PASSED_FIRST_CONFIGURE ON CACHE INTERNAL "First configure has run: CXX_FLAGS have had their defaults changed" FORCE)
-endif(NOT PASSED_FIRST_CONFIGURE)
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+endif()


Enable -march=native in OS X clang builds

--- CMake/hoomd/HOOMDCFlagsSetup.cmake
+++ CMake/hoomd/HOOMDCFlagsSetup.cmake
@@ -14,7 +14,7 @@
         endif(${CMAKE_GENERATOR} STREQUAL "Xcode")
     endif(NOT CMAKE_BUILD_TYPE AND NOT HONOR_GENTOO_FLAGS)

-    if(CMAKE_COMPILER_IS_GNUCXX)
+    if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
         # special handling to honor gentoo flags
         if (HONOR_GENTOO_FLAGS)
         set(CMAKE_CXX_FLAGS_DEBUG "-Wall" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
@@ -53,7 +53,7 @@

     else(CMAKE_COMPILER_IS_GNUCXX)
         message(STATUS "No default CXXFLAGS for your compiler, set them manually")
-    endif(CMAKE_COMPILER_IS_GNUCXX)
+    endif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")

 SET(PASSED_FIRST_CONFIGURE ON CACHE INTERNAL "First configure has run: CXX_FLAGS have had their defaults changed" FORCE)
 endif(NOT PASSED_FIRST_CONFIGURE)


Issue #12: Re-instate fixup_bundle.

Issue #12: Re-instate fixup_bundle.

--- CMake/mpCreateGuiApplication.cmake
+++ CMake/mpCreateGuiApplication.cmake
@@ -64,14 +64,14 @@
     endif()
   endif()

-#  install(CODE "
-#          file(GLOB_RECURSE QTPLUGINS
-#          \"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/platforms/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
-#          file(GLOB_RECURSE QMLPLUGINS
-#          \"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/qml/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
-#          list(APPEND QTPLUGINS \"\${QMLPLUGINS}\")
-#          include(BundleUtilities)
-#          fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${ADDITIONAL_SEARCH_PATHS}\")
-#          " COMPONENT Runtime)
+  install(CODE "
+          file(GLOB_RECURSE QTPLUGINS
+          \"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/platforms/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
+          file(GLOB_RECURSE QMLPLUGINS
+          \"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/qml/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
+          list(APPEND QTPLUGINS \"\${QMLPLUGINS}\")
+          include(BundleUtilities)
+          fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${ADDITIONAL_SEARCH_PATHS}\")
+          " COMPONENT Runtime)

 endmacro()


[CMake] Removing extra underscore.

[CMake] Removing extra underscore.

Fixing a typo.

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

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -361,7 +361,7 @@
   set(SOFT_FLOAT_FLAG -mfloat-abi=soft)
   set(HARD_FLOAT_FLAG -mfloat-abi=hard)

-  set(PIC_FLAG_ -fPIC)
+  set(PIC_FLAG -fPIC)
   set(STATIC_FLAG -static)

   darwin_test_archs(ios


Use the same order in check_functions.m4

--- config.h.cmake
+++ config.h.cmake
@@ -143,8 +143,8 @@
 #cmakedefine HAVE_FPCLASSIFY
 #cmakedefine HAVE_GMTIME_S
 #cmakedefine HAVE_GMTIME_R
+#cmakedefine HAVE_LOCALTIME_S
 #cmakedefine HAVE_LOCALTIME_R
-#cmakedefine HAVE_LOCALTIME_S
 #cmakedefine HAVE_MKOSTEMP
 #cmakedefine HAVE_OPEN
 #cmakedefine HAVE_READ


Update FW: disparity (U8) aligning to RGB works. TODO depth and subpixel (U16)

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "0f1ac77644d6fd0ce75485e9fa20d7e34ae23ce7")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "51da5cf23ce7f05ff8466193dbe76758c4668c69")

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


Properly handle debug/release builds of builtin TBB

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1199,6 +1199,13 @@
   endif()
   if(MSVC)
     set(TBB_LIBRARIES ${CMAKE_BINARY_DIR}/lib/tbb.lib)
+    if(winrtdebug)
+      set(config Debug)
+      set(suffix _debug)
+    else()
+      set(config Release)
+      set(suffix "")
+    endif()
     set(vsdir "vs2012")
     ExternalProject_Add(
       TBB
@@ -1206,16 +1213,16 @@
       URL_HASH SHA256=780baf0ad520f23b54dd20dc97bf5aae4bc562019e0a70f53bfc4c1afec6e545
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND devenv.exe /useenv /upgrade build/${vsdir}/makefile.sln
-      BUILD_COMMAND devenv.exe /useenv /build "$<CONFIG>|Win32" build/${vsdir}/makefile.sln
-      INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbb.dll ${CMAKE_BINARY_DIR}/bin/
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc.dll ${CMAKE_BINARY_DIR}/bin/
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc_proxy.dll ${CMAKE_BINARY_DIR}/bin/
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbb.lib ${CMAKE_BINARY_DIR}/lib/
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc.lib ${CMAKE_BINARY_DIR}/lib/
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc_proxy.lib ${CMAKE_BINARY_DIR}/lib/
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbb.pdb ${CMAKE_BINARY_DIR}/bin/
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc.pdb ${CMAKE_BINARY_DIR}/bin/
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc_proxy.pdb ${CMAKE_BINARY_DIR}/bin/
+      BUILD_COMMAND devenv.exe /useenv /build "${config}|Win32" build/${vsdir}/makefile.sln
+      INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbb${suffix}.dll ${CMAKE_BINARY_DIR}/bin/tbb.dll
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbbmalloc${suffix}.dll ${CMAKE_BINARY_DIR}/bin/tbbmalloc.dll
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbbmalloc_proxy${suffix}.dll ${CMAKE_BINARY_DIR}/bin/tbbmalloc_proxy.dll
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbb${suffix}.lib ${CMAKE_BINARY_DIR}/lib/tbb.lib
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbbmalloc${suffix}.lib ${CMAKE_BINARY_DIR}/lib/tbbmalloc.lib
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbbmalloc_proxy${suffix}.lib ${CMAKE_BINARY_DIR}/lib/tbbmalloc_proxy.lib
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbb${suffix}.pdb ${CMAKE_BINARY_DIR}/bin/tbb.pdb
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbbmalloc${suffix}.pdb ${CMAKE_BINARY_DIR}/bin/tbbmalloc.pdb
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbbmalloc_proxy${suffix}.pdb ${CMAKE_BINARY_DIR}/bin/tbbmalloc_proxy.pdb
               COMMAND ${CMAKE_COMMAND} -Dinstall_dir=<INSTALL_DIR> -Dsource_dir=<SOURCE_DIR>
                                        -P ${CMAKE_SOURCE_DIR}/cmake/scripts/InstallTBB.cmake
       BUILD_IN_SOURCE 1


Use PYTHON_EXECUTABLE to call virtualenv

If the default version of python was too old or not available
determining the version of virtualenv would fail. Now the standard
CMake variable PYTHON_EXECUTABLE is use to run the script.

Change-Id: I2a6e4a661146c8d608a748577ee6a15493ba8e2d

--- CMake/FindPythonVirtualEnv.cmake
+++ CMake/FindPythonVirtualEnv.cmake
@@ -15,9 +15,14 @@
   )

 if(PYTHON_VIRTUALENV_EXECUTABLE)
+
+  if ("${PYTHON_EXECUTABLE}" STREQUAL "")
+    find_package(PythonInterp REQUIRED)
+  endif()
+
   ### PYTHON_VIRTUALENV_VERSION
   execute_process(
-    COMMAND ${PYTHON_VIRTUALENV_EXECUTABLE} --version
+    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_VIRTUALENV_EXECUTABLE} --version
     OUTPUT_VARIABLE
       PYTHON_VIRTUALENV_VERSION_STRING
     ERROR_VARIABLE
@@ -27,7 +32,10 @@
     OUTPUT_STRIP_TRAILING_WHITESPACE
     ERROR_STRIP_TRAILING_WHITESPACE
     )
-  if (NOT PYTHON_VIRTUALENV_VERSION_RESULT_VARIABLE)
+  if (PYTHON_VIRTUALENV_VERSION_RESULT_VARIABLE)
+    message(ERROR "Unable to determing PythonVirtualEnv version!\n${PYTHON_VIRTUALENV_VERSION_STRING}")
+    set(PYTHON_VIRTUALENV_VERSION_STRING "")
+  else()
     string( REGEX MATCH "([0-9]*)([.])([0-9]*)([.]*)([0-9]*)"
       PYTHON_VIRTUALENV_VERSION
       ${PYTHON_VIRTUALENV_VERSION_STRING} )


COMP: Pass through CMAKE_SH for Eigen3 external

In CMake/itkExternal_Eigen3.cmake, multiple CMake args are passed, but CMAKE_SH should be as well, if defined. This is necessary when using MinGW because otherwise will get an error depending on your PATH configuration: sh.exe was found in your PATH. Thus, when building ITK, we pass -DCMAKE_SH:bool=OFF, but this then breaks on Eigen3. Related to #66.

--- CMake/itkExternal_Eigen3.cmake
+++ CMake/itkExternal_Eigen3.cmake
@@ -40,6 +40,7 @@
     "-DCMAKE_INSTALL_INCLUDEDIR=${_eigen3_cmake_install_includedir}"
     "-DCMAKE_INSTALL_DATADIR=${_eigen3_cmake_install_datadir}"
     "-DCMAKE_GENERATOR=${CMAKE_GENERATOR}"
+    "-DCMAKE_SH=${CMAKE_SH}"
     "-DCMAKE_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET}"
     "-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}"
     "-DCMAKE_GENERATOR_INSTANCE=${CMAKE_GENERATOR_INSTANCE}"


Update forge tag to staged branch

Update forge tag to staged branch

--- CMakeModules/build_forge.cmake
+++ CMakeModules/build_forge.cmake
@@ -22,7 +22,7 @@
 ExternalProject_Add(
     forge-ext
     GIT_REPOSITORY https://github.com/arrayfire/forge.git
-    GIT_TAG af3.2.2
+    GIT_TAG master
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""


CMake: Fix various bugs in check_01_cxx_features

This commit fixes a typo of the "-std=c++0x" fallback found by Chad Balen
(mailing list).

Furthermore, the fallback logic was also broken (as reported by Wolfgang).

--- cmake/checks/check_01_cxx_features.cmake
+++ cmake/checks/check_01_cxx_features.cmake
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -40,12 +40,12 @@
 IF(NOT DEFINED DEAL_II_WITH_CXX11 OR DEAL_II_WITH_CXX11)

   IF("${DEAL_II_CXX11_FLAG}" STREQUAL "")
+    CHECK_CXX_COMPILER_FLAG("-std=c++0x" DEAL_II_HAVE_FLAG_stdcxx0x)
     CHECK_CXX_COMPILER_FLAG("-std=c++11" DEAL_II_HAVE_FLAG_stdcxx11)
     IF(DEAL_II_HAVE_FLAG_stdcxx11)
       SET(DEAL_II_CXX11_FLAG "-std=c++11")
-    ELSEIF(DEAL_II_HAVE_FLAG_stdcxx11)
-      CHECK_CXX_COMPILER_FLAG("-std=c++0x" DEAL_II_HAVE_FLAG_stdcxx0x)
-      SET(DEAL_II_CXX11_FLAG "-std=x++0x")
+    ELSEIF(DEAL_II_HAVE_FLAG_stdcxx0x)
+      SET(DEAL_II_CXX11_FLAG "-std=c++0x")
     ENDIF()
   ENDIF()


libass: remove unused variable

libass: remove unused variable

--- packages/libass.cmake
+++ packages/libass.cmake
@@ -2,7 +2,6 @@
     DEPENDS
         harfbuzz
         freetype2
-        ${ASS_USE_FONTCONFIG}
         fribidi
         libiconv
     GIT_REPOSITORY "https://github.com/libass/libass.git"


nettle: update repo URL

nettle: update repo URL

--- packages/nettle.cmake
+++ packages/nettle.cmake
@@ -1,6 +1,6 @@
 ExternalProject_Add(nettle
     DEPENDS gmp
-    GIT_REPOSITORY "git://git.lysator.liu.se/nettle/nettle.git"
+    GIT_REPOSITORY "https://git.lysator.liu.se/nettle/nettle.git"
     GIT_TAG "nettle_2.7.1_release_20130528" # required due to API/ABI breakage
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ${EXEC} <SOURCE_DIR>/configure


update ffmpeg use script for cmake-built OpenH264

* see issue https://github.com/smanders/externpro/issues/155

--- projects/use/usexp-ffmpeg-config.cmake
+++ projects/use/usexp-ffmpeg-config.cmake
@@ -2,7 +2,7 @@
 # FFMPEG_INCLUDE_DIR - the FFmpeg include directories
 # FFMPEG_LIBRARIES - the FFmpeg libraries
 # FFMPEG_DLLS - the FFmpeg shared objects (dll, so)
-xpGetPkgVar(OpenH264 DLLS) # sets OPENH264_DLLS
+xpGetPkgVar(openh264 LIBRARIES) # sets OPENH264_LIBRARIES
 set(prj ffmpeg)
 # this file (-config) installed to share/cmake
 get_filename_component(XP_ROOTDIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)
@@ -46,11 +46,10 @@
     swscale${ver}
     z # TODO this shouldn't be hard-coded
     # https://stackoverflow.com/questions/27366433/linking-libavcodec-and-libavformat-undefined-references
-    ${OPENH264_DLLS}
+    ${OPENH264_LIBRARIES}
     )
   link_directories(${XP_ROOTDIR}/lib)
-  set(${PRJ}_DLLS ${OPENH264_DLLS})
-  list(APPEND reqVars ${PRJ}_LIBRARIES ${PRJ}_DLLS)
+  list(APPEND reqVars ${PRJ}_LIBRARIES)
 endif()
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(${prj} REQUIRED_VARS ${reqVars})


BUG: ITKIOGE has a public dependency on ITKIOIPL

Addresses: ITK/Modules/IO/GE/include/itkGEAdwImageIO.h:37:10: fatal
error: 'itkIPLCommonImageIO.h' file not found

Change-Id: I5aa090754475a779685bacc26689efe34ef8b7e5

--- Modules/IO/GE/itk-module.cmake
+++ Modules/IO/GE/itk-module.cmake
@@ -4,9 +4,10 @@

 itk_module(ITKIOGE
   ENABLE_SHARED
+  DEPENDS
+    ITKIOIPL
   PRIVATE_DEPENDS
     ITKIOImageBase
-    ITKIOIPL
   TEST_DEPENDS
     ITKTestKernel
     ITKIOIPL


[Flexible] python files in project

[Flexible] python files in project

Former-commit-id: 14c00f3b708c81382a5527d2456d311df5e8ddf4

--- applications/plugins/Flexible/python/python.cmake
+++ applications/plugins/Flexible/python/python.cmake
@@ -2,4 +2,6 @@
     python/Flexible/__init__.py
     python/Flexible/IO.py
     python/Flexible/StressVisu.py
+    python/Flexible/FlexibleAPI.py
+    python/Flexible/sml.py
 )


the target name can't match a custom target name

--- cmake/Modules/GObjectIntrospection.cmake
+++ cmake/Modules/GObjectIntrospection.cmake
@@ -194,7 +194,7 @@
 		VERBATIM
 	)

-	add_custom_target("${GIR_FILENAME}" ALL DEPENDS ${GIR_LIBRARY} ${GIR_FILENAME})
+	add_custom_target("gir ${GIR_FILENAME}" ALL DEPENDS ${GIR_LIBRARY} ${GIR_FILENAME})

 	install(
 		FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_FILENAME}
@@ -213,7 +213,7 @@
 		WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 	)

-	add_custom_target("${GIR_TYPELIB}" ALL DEPENDS ${GIR_LIBRARY} ${GIR_FILENAME} ${GIR_TYPELIB})
+	add_custom_target("typelib ${GIR_TYPELIB}" ALL DEPENDS ${GIR_LIBRARY} ${GIR_FILENAME} ${GIR_TYPELIB})
 	install(
 		FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_TYPELIB}
 		DESTINATION ${GIR_TYPELIBDIR}


Added Theora directory paths for full-build deps.

--- cmake/ConfigurePackages.cmake
+++ cmake/ConfigurePackages.cmake
@@ -376,6 +376,8 @@
     if (MSVC)
         include_directories(${ENV_TUNDRA_DEP_PATH}/libtheora/include) # For prebuilt VS2008/VS2010 deps.
         link_directories(${ENV_TUNDRA_DEP_PATH}/libtheora/lib) # For prebuilt VS2008/VS2010 deps.
+
+        include_directories(${ENV_TUNDRA_DEP_PATH}/theora/include) # For full-built deps.
     elseif (APPLE)
         include_directories(${ENV_TUNDRA_DEP_PATH}/include/theora)
         link_directories(${ENV_TUNDRA_DEP_PATH}/lib)
@@ -384,8 +386,13 @@

 macro(link_package_theora)
     if (MSVC)
-        target_link_libraries(${TARGET_NAME} optimized libtheora)
-        target_link_libraries(${TARGET_NAME} debug libtheorad)
+        if (IS_DIRECTORY $ENV{TUNDRA_DEP_PATH}/theora/win32/VS2008/Win32) # Using full-built deps.
+            target_link_libraries(${TARGET_NAME} optimized $ENV{TUNDRA_DEP_PATH}/theora/win32/VS2008/Win32/Release_SSE2/libtheora_static.lib)
+            target_link_libraries(${TARGET_NAME} debug $ENV{TUNDRA_DEP_PATH}/theora/win32/VS2008/Win32/Debug/libtheora_static.lib)
+        else() # Using pre-built VS2008/VS2010 deps.
+            target_link_libraries(${TARGET_NAME} optimized libtheora)
+            target_link_libraries(${TARGET_NAME} debug libtheorad)
+        endif()
     else()
         target_link_libraries(${TARGET_NAME} general theora)
     endif()


Fixes #2393

Fixes #2393

--- cmake/Modules/FindEigen.cmake
+++ cmake/Modules/FindEigen.cmake
@@ -11,16 +11,8 @@
 pkg_check_modules(PC_EIGEN eigen3)
 set(EIGEN_DEFINITIONS ${PC_EIGEN_CFLAGS_OTHER})

-if(CMAKE_SYSTEM_NAME STREQUAL Linux)
-    set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} /usr /usr/local)
-endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
-if(APPLE)
-  list(APPEND CMAKE_INCLUDE_PATH /opt/local)
-  set(CMAKE_FIND_FRAMEWORK NEVER)
-endif()
-
 find_path(EIGEN_INCLUDE_DIR Eigen/Core
-    HINTS ${PC_EIGEN_INCLUDEDIR} ${PC_EIGEN_INCLUDE_DIRS} "${EIGEN_ROOT}" "$ENV{EIGEN_ROOT}"
+    HINTS "${EIGEN_ROOT}" "$ENV{EIGEN_ROOT}" ${PC_EIGEN_INCLUDEDIR} ${PC_EIGEN_INCLUDE_DIRS}
     PATHS "$ENV{PROGRAMFILES}/Eigen" "$ENV{PROGRAMW6432}/Eigen"
           "$ENV{PROGRAMFILES}/Eigen3" "$ENV{PROGRAMW6432}/Eigen3"
     PATH_SUFFIXES eigen3 include/eigen3 include)
@@ -38,7 +30,6 @@
 endif(EIGEN_INCLUDE_DIR)

 set(EIGEN_INCLUDE_DIRS ${EIGEN_INCLUDE_DIR})
-set(CMAKE_FIND_FRAMEWORK)

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Eigen DEFAULT_MSG EIGEN_INCLUDE_DIR)


print MYSQL_INCLUDE_DIR when mysql is found, in addition to MYSQL_LIBRARY

--- cmake/Modules/FindMySQL.cmake
+++ cmake/Modules/FindMySQL.cmake
@@ -34,7 +34,7 @@

 IF (MYSQL_FOUND)
   IF (NOT MYSQL_FIND_QUIETLY)
-    MESSAGE(STATUS "Found MySQL: ${MYSQL_LIBRARY}")
+    MESSAGE(STATUS "Found MySQL: ${MYSQL_LIBRARY} ${MYSQL_INCLUDE_DIR}")
   ENDIF (NOT MYSQL_FIND_QUIETLY)
 ELSE (MYSQL_FOUND)
   IF (MYSQL_FIND_REQUIRED)


add better resource copy command

add better resource copy command

--- cmake/articated_android.cmake
+++ cmake/articated_android.cmake
@@ -65,10 +65,19 @@
 target_compile_options(articated_app PRIVATE -std=c++11 -Wall -Wextra)

 # copy over resource folder
-file(COPY ${CMAKE_SOURCE_DIR}/res DESTINATION ${CMAKE_BINARY_DIR})
+add_custom_command(
+        TARGET articated_app PRE_BUILD
+        COMMAND ${CMAKE_COMMAND} -E copy_directory
+                ${CMAKE_SOURCE_DIR}/res
+                ${CMAKE_BINARY_DIR}/res)
+
 # read manifest
 file(READ ${CMAKE_BINARY_DIR}/package/AndroidManifest.xml ANDROID_MANIFEST_TMP)
 # add icon
-STRING(REGEX REPLACE "<application" "<application android:icon=\"@mipmap/ic_launcher\"" ANDROID_MANIFEST_TMP ${ANDROID_MANIFEST_TMP})
+STRING(REGEX REPLACE
+        "<application"
+        "<application android:icon=\"@mipmap/ic_launcher\""
+        ANDROID_MANIFEST_TMP
+        ${ANDROID_MANIFEST_TMP})
 # write manifest
 file(WRITE ${CMAKE_BINARY_DIR}/package/AndroidManifest.xml ${ANDROID_MANIFEST_TMP})


Adapt old cmake

Adapt old cmake

--- cmake/external/openblas.cmake
+++ cmake/external/openblas.cmake
@@ -29,6 +29,10 @@

     IF(CMAKE_COMPILER_IS_GNUCC)
         ENABLE_LANGUAGE(Fortran)
+        if (NOT CMAKE_Fortran_COMPILER_VERSION)
+          # cmake version is too old, we cannot get fortran version, using CXX version instead.
+          set(CMAKE_Fortran_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION})
+        endif()
         string(REGEX MATCHALL "[0-9]+" Fortran_VERSION ${CMAKE_Fortran_COMPILER_VERSION})
         list(GET Fortran_VERSION 0 Fortran_MAJOR)
         list(GET Fortran_VERSION 1 Fortran_MINOR)


Set Protobuf 3.1 in FIND_PACKAGE

Set Protobuf 3.1 in FIND_PACKAGE

--- cmake/external/protobuf.cmake
+++ cmake/external/protobuf.cmake
@@ -14,7 +14,7 @@

 INCLUDE(ExternalProject)

-FIND_PACKAGE(Protobuf)
+FIND_PACKAGE(Protobuf 3.1)

 IF(NOT PROTOBUF_FOUND)
     SET(PROTOBUF_SOURCES_DIR ${THIRD_PARTY_PATH}/protobuf)


[cmake] add COMMON_HEADER and GRID_LIBS to tests

--- cmake/modules/DuneUtils.cmake
+++ cmake/modules/DuneUtils.cmake
@@ -117,9 +117,9 @@
 	file( GLOB test_sources "${CMAKE_CURRENT_SOURCE_DIR}/*.cc" )
 	foreach( source ${test_sources} )
 		get_filename_component(testname ${source} NAME_WE)
-		add_executable( test_${testname} ${source} )
+                add_executable( test_${testname} ${source} ${COMMON_HEADER} )
 		add_test( test_${testname} ${CMAKE_CURRENT_BINARY_DIR}/test_${testname} )
-		target_link_libraries( test_${testname} ${ARGN} ${COMMON_LIBS} gtest_dune_stuff )
+                target_link_libraries( test_${testname} ${ARGN} ${COMMON_LIBS} ${GRID_LIBS} gtest_dune_stuff )
 		list(APPEND testnames test_${testname} )
 	endforeach( source )
 endmacro(BEGIN_TESTCASES)


Sync GLibTools.cmake with Evolution-Data-Server

Receives latest improvements and fixes some compiler warnings from
the enum-generated code.

--- cmake/modules/GLibTools.cmake
+++ cmake/modules/GLibTools.cmake
@@ -3,6 +3,11 @@
 # Provides functions to run glib tools.
 #
 # Functions:
+#
+# glib_mkenums_multiple(_output_filename_noext _define_name _enums_header ...)
+#    runs glib-mkenums to generate enumtypes .h and .c files from multiple
+#    _enums_header. It searches for files in the current source directory and
+#    exports to the current binary directory.
 #
 # glib_mkenums(_output_filename_noext _enums_header _define_name)
 #    runs glib-mkenums to generate enumtypes .h and .c files from _enums_header.
@@ -52,18 +57,18 @@
 	message(FATAL_ERROR "Cannot find glib-mkenums, which is required to build ${PROJECT_NAME}")
 endif(NOT GLIB_MKENUMS)

-function(glib_mkenums _output_filename_noext _enums_header _define_name)
+function(glib_mkenums_multiple _output_filename_noext _define_name _enums_header0)
 	set(HEADER_TMPL "
 /*** BEGIN file-header ***/
 #ifndef ${_define_name}
 #define ${_define_name}
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
 /*** END file-header ***/

 /*** BEGIN file-production ***/
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS

 /* Enumerations from \"@basename@\" */

@@ -76,6 +81,7 @@
 /*** END enumeration-production ***/

 /*** BEGIN file-tail ***/
+
 G_END_DECLS

 #endif /* ${_define_name} */
@@ -83,10 +89,14 @@

 	file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/enumtypes-${_output_filename_noext}.h.tmpl" "${HEADER_TMPL}\n")

+	foreach(_enums_header ${_enums_header0} ${ARGN})
+		list(APPEND _enums_headers "${CMAKE_CURRENT_SOURCE_DIR}/${_enums_header}")
+	endforeach(_enums_header)
+
 	add_custom_command(
 		OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.h
-		COMMAND ${GLIB_MKENUMS} --template "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/enumtypes-${_output_filename_noext}.h.tmpl" "${CMAKE_CURRENT_SOURCE_DIR}/${_enums_header}" >${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.h
-		DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_enums_header}
+		COMMAND ${GLIB_MKENUMS} --template "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/enumtypes-${_output_filename_noext}.h.tmpl" ${_enums_headers} >${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.h
+		DEPENDS ${_enums_headers}
 	)

 set(SOURCE_TMPL "
@@ -104,7 +114,7 @@
 GType
 @enum_name@_get_type (void)
 {
-	static volatile gsize the_type__volatile = 0;
+	static gsize the_type__volatile = 0;

 	if (g_once_init_enter (&the_type__volatile)) {
 		static const G\@Type\@Value values[] = {
@@ -133,9 +143,13 @@

 	add_custom_command(
 		OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.c
-		COMMAND ${GLIB_MKENUMS} --template "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/enumtypes-${_output_filename_noext}.c.tmpl" "${CMAKE_CURRENT_SOURCE_DIR}/${_enums_header}" >${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.c
-		DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_enums_header}
-	)
+		COMMAND ${GLIB_MKENUMS} --template "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/enumtypes-${_output_filename_noext}.c.tmpl" ${_enums_headers} >${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.c
+		DEPENDS ${_enums_headers}
+	)
+endfunction(glib_mkenums_multiple)
+
+function(glib_mkenums _output_filename_noext _enums_header _define_name)
+	glib_mkenums_multiple (${_output_filename_noext} ${_define_name} ${_enums_header})
 endfunction(glib_mkenums)

 find_program(GLIB_GENMARSHAL glib-genmarshal)


The combination of WITH_FREETYPE=OFF and HAVE_AGG=ON generates build errors
for wxwidgets_agg.cpp so always avoid that combination of flags by
determining HAVE_AGG only when WITH_FREETYPE=ON.  (Note if HAVE_AGG is not
determined, then it is logically false or the equivalent of OFF.)

svn path=/trunk/; revision=10611

--- cmake/modules/wxwidgets.cmake
+++ cmake/modules/wxwidgets.cmake
@@ -81,19 +81,19 @@
   message(STATUS "wxWidgets found")
   message(STATUS "wxwidgets_COMPILE_FLAGS = ${wxwidgets_COMPILE_FLAGS}")
   message(STATUS "wxwidgets_LINK_FLAGS = ${wxwidgets_LINK_FLAGS}")
-  include(agg)
-  if(HAVE_AGG)
-    set(
-      wxwidgets_COMPILE_FLAGS
-      "${wxwidgets_COMPILE_FLAGS} -I${AGG_INCLUDE_DIRS}"
-      )
-    set(
-      wxwidgets_LINK_FLAGS
-      ${wxwidgets_LINK_FLAGS}
-      ${AGG_LIBRARIES}
-      )
-  endif(HAVE_AGG)
   if(WITH_FREETYPE)
+    include(agg)
+    if(HAVE_AGG)
+      set(
+	wxwidgets_COMPILE_FLAGS
+	"${wxwidgets_COMPILE_FLAGS} -I${AGG_INCLUDE_DIRS}"
+	)
+      set(
+	wxwidgets_LINK_FLAGS
+	${wxwidgets_LINK_FLAGS}
+	${AGG_LIBRARIES}
+	)
+    endif(HAVE_AGG)
     set(
       wxwidgets_COMPILE_FLAGS
       "${wxwidgets_COMPILE_FLAGS} -I${FREETYPE_INCLUDE_DIR}"


Build failed: missing cvd/config.h

Build failed: missing cvd/config.h

Fixes #730

--- cmakemodules/script_cvd.cmake
+++ cmakemodules/script_cvd.cmake
@@ -12,7 +12,7 @@
 )

 set(CVD_DIR "${MRPT_SOURCE_DIR}/otherlibs/libcvd")
-set(CVD_BIN_DIR "${MRPT_BINARY_DIR}/libs/vision/libcvd-prefix/src/libcvd-build")
+set(CVD_BIN_DIR "${MRPT_BINARY_DIR}/libcvd-prefix/src/libcvd-build")

 set(CVD_INCLUDE_DIRS "${CVD_DIR}" "${CVD_BIN_DIR}/include")


Added WORKING_DIRECTORY to add_unit_test CMake macro

--- cmake/Modules/MacroAddUnitTest.cmake
+++ cmake/Modules/MacroAddUnitTest.cmake
@@ -5,7 +5,7 @@
 #                      [TAG tag])
 include(MacroParseArguments)
 macro(add_unit_test)
-    parse_arguments(UNIT_TEST "NAME;SOURCES;LINK_LIBRARIES;ARGS;TAG" ${ARGN})
+    parse_arguments(UNIT_TEST "NAME;SOURCES;LINK_LIBRARIES;WORKING_DIRECTORY;ARGS;TAG" ${ARGN})
     list(GET UNIT_TEST_DEFAULT_ARGS 0 UNIT_TEST_NAME)

     if(NOT UNIT_TEST_NAME)
@@ -21,6 +21,8 @@
     else()
         set(testName "${UNIT_TEST_NAME}")
     endif()
-    add_test(NAME ${testName} COMMAND ${UNIT_TEST_NAME} ${UNIT_TEST_ARGS})
+    add_test(NAME ${testName}
+             WORKING_DIRECTORY ${UNIT_TEST_WORKING_DIRECTORY}
+             COMMAND ${UNIT_TEST_NAME} ${UNIT_TEST_ARGS})
     message(STATUS "  added test: ${testName}")
 endmacro()


cmake: lookup strip tool and set CMAKE_STRIP for host-gnu target

Fixes: #51821

Set CMAKE_STRIP using `find_program(CMAKE_STRIP strip)` to support
strip when building on native posix.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/bintools/host-gnu/target.cmake
+++ cmake/bintools/host-gnu/target.cmake
@@ -8,6 +8,7 @@
 find_program(CMAKE_RANLIB  ranlib )
 find_program(CMAKE_READELF readelf)
 find_program(CMAKE_NM      nm)
+find_program(CMAKE_STRIP   strip)

 find_program(CMAKE_GDB     gdb    )