avoid unnecessary compilation, already provided by the cpp typesupport

--- rosidl_typesupport_opensplice_c/cmake/rosidl_typesupport_opensplice_c_generate_interfaces.cmake
+++ rosidl_typesupport_opensplice_c/cmake/rosidl_typesupport_opensplice_c_generate_interfaces.cmake
@@ -93,23 +93,6 @@
   endif()
 endforeach()

-# 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")
-    set(_opensplice_compile_flags
-      "-Wno-unused-but-set-variable"
-    )
-  endif()
-  if(NOT _opensplice_compile_flags STREQUAL "")
-    string(REPLACE ";" " " _opensplice_compile_flags "${_opensplice_compile_flags}")
-    foreach(_gen_file ${_generated_external_msg_files} ${_generated_external_srv_files})
-      set_source_files_properties("${_gen_file}"
-        PROPERTIES COMPILE_FLAGS "${_opensplice_compile_flags}")
-    endforeach()
-  endif()
-endif()
-
 set(_dependency_files "")
 set(_dependencies "")
 foreach(_pkg_name ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES})
@@ -229,9 +212,7 @@

   if(
     NOT _generated_msg_files STREQUAL "" OR
-    NOT _generated_external_msg_files STREQUAL "" OR
-    NOT _generated_srv_files STREQUAL "" OR
-    NOT _generated_external_srv_files STREQUAL ""
+    NOT _generated_srv_files STREQUAL ""
   )
     ament_export_include_directories(include)
   endif()
@@ -240,9 +221,7 @@
 link_directories(${OpenSplice_LIBRARY_DIRS})
 add_library(${rosidl_generate_interfaces_TARGET}${_target_suffix} SHARED
   ${_generated_msg_files}
-  ${_generated_external_msg_files}
-  ${_generated_srv_files}
-  ${_generated_external_srv_files})
+  ${_generated_srv_files})
 if(rosidl_generate_interfaces_LIBRARY_NAME)
   set_target_properties(${rosidl_generate_interfaces_TARGET}${_target_suffix}
     PROPERTIES OUTPUT_NAME "${rosidl_generate_interfaces_LIBRARY_NAME}${_target_suffix}")


setting nightly time to 22:00 UTC

setting nightly time to 22:00 UTC

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -15,7 +15,7 @@
 ## ======================================================================== ##

 set(CTEST_PROJECT_NAME "Embree")
-set(CTEST_NIGHTLY_START_TIME "00:00:00 UTC")
+set(CTEST_NIGHTLY_START_TIME "22:00:00 UTC")

 IF (NOT CTEST_DROP_SITE)
   set(CTEST_DROP_METHOD "http")


Setup CPACK_DEBIAN_BUILD_DEPENDS from Buildyard config _DEBS

--- CommonCPack.cmake
+++ CommonCPack.cmake
@@ -141,6 +141,11 @@
       set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_CONTACT}")
     endif()

+    # setup'd by Buildyard config, same as for travis CI
+    if(NOT CPACK_DEBIAN_BUILD_DEPENDS AND ${UPPER_PROJECT_NAME}_BUILD_DEBS)
+      set(CPACK_DEBIAN_BUILD_DEPENDS ${${UPPER_PROJECT_NAME}_BUILD_DEBS})
+    endif()
+
     set(CPACK_DEBIAN_PACKAGE_CONFLICTS ${OLD_PACKAGES})
   endif()
 endif()


Remove vmsafe build from pre-commit suite

With all of the cross-compilation builds and now dynamorio_static, the
pre-commit suite is getting too long.  We remove the vmsafe build as it's
not really supported anymore.

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

--- suite/runsuite.cmake
+++ suite/runsuite.cmake
@@ -235,12 +235,12 @@
       ${install_path_cache}
       ")
   endif (DO_ALL_BUILDS)
-  # non-official-API builds but not all are in pre-commit suite on Windows
+  # Non-official-API builds but not all are in pre-commit suite, esp on Windows
   # where building is slow: we'll rely on bots to catch breakage in most of these
-  # builds on Windows
+  # builds.
   if (ARCH_IS_X86 AND NOT APPLE)
     # we do not bother to support these on ARM
-    if (UNIX OR DO_ALL_BUILDS)
+    if (DO_ALL_BUILDS)
       testbuild("vmsafe-debug-internal-32" OFF "
         VMAP:BOOL=OFF
         VMSAFE:BOOL=ON


Updated the CDATA sections.

Updated the CDATA sections.

--- test/fots/ImportFOTS.cmake
+++ test/fots/ImportFOTS.cmake
@@ -23,7 +23,7 @@

 # Change this to modify which elements in FOTS driver results are output
 # as CDATA
-SET (FOTS_CDATA_ELEMENTS "fots:query test assert-xml")
+SET (FOTS_CDATA_ELEMENTS "test assert-xml")

 # Download and unpack pre-created archive
 SET (_outdir "${BUILDDIR}/test/fots")


Added osgUI to Doxygen-generated documentation

--- doc/Doxyfiles/doxyfile.cmake
+++ doc/Doxyfiles/doxyfile.cmake
@@ -84,21 +84,22 @@
 # configuration options related to the input files
 #---------------------------------------------------------------------------
 INPUT                  = "${OpenSceneGraph_SOURCE_DIR}/include/osg" \
+                         "${OpenSceneGraph_SOURCE_DIR}/include/osgAnimation" \
                          "${OpenSceneGraph_SOURCE_DIR}/include/osgDB" \
                          "${OpenSceneGraph_SOURCE_DIR}/include/osgFX" \
                          "${OpenSceneGraph_SOURCE_DIR}/include/osgGA" \
                          "${OpenSceneGraph_SOURCE_DIR}/include/osgManipulator" \
                          "${OpenSceneGraph_SOURCE_DIR}/include/osgParticle" \
+                         "${OpenSceneGraph_SOURCE_DIR}/include/osgQt" \
                          "${OpenSceneGraph_SOURCE_DIR}/include/osgShadow" \
                          "${OpenSceneGraph_SOURCE_DIR}/include/osgSim" \
                          "${OpenSceneGraph_SOURCE_DIR}/include/osgTerrain" \
                          "${OpenSceneGraph_SOURCE_DIR}/include/osgText" \
+                         "${OpenSceneGraph_SOURCE_DIR}/include/osgUI" \
                          "${OpenSceneGraph_SOURCE_DIR}/include/osgUtil" \
                          "${OpenSceneGraph_SOURCE_DIR}/include/osgViewer" \
                          "${OpenSceneGraph_SOURCE_DIR}/include/osgVolume" \
-                         "${OpenSceneGraph_SOURCE_DIR}/include/osgWidget" \
-                         "${OpenSceneGraph_SOURCE_DIR}/include/osgQt" \
-                         "${OpenSceneGraph_SOURCE_DIR}/include/osgAnimation"
+                         "${OpenSceneGraph_SOURCE_DIR}/include/osgWidget"
 INPUT_ENCODING         = UTF-8
 FILE_PATTERNS          = *include* \
                          *.cpp


freetype2: fix install error with CMake 3.x

--- packages/freetype2.cmake
+++ packages/freetype2.cmake
@@ -12,7 +12,7 @@
         --with-sysroot=${MINGW_INSTALL_PREFIX}
     BUILD_COMMAND ${MAKE}
     INSTALL_COMMAND ${MAKE} install
-        COMMAND ${CMAKE_COMMAND} -E create_symlink ${MINGW_INSTALL_PREFIX}/bin/freetype-config ${CMAKE_INSTALL_PREFIX}/bin
+        COMMAND ${CMAKE_COMMAND} -E create_symlink ${MINGW_INSTALL_PREFIX}/bin/freetype-config ${CMAKE_INSTALL_PREFIX}/bin/freetype-config
     LOG_DOWNLOAD 1 LOG_UPDATE 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
 )


Fix FindPythonModule to avoid warnings

Fix FindPythonModule to avoid warnings

Not sure what the purpose of all the find_python_module directives is,
since we only check for presence of standard library stuff. We also
use find_python_module to "find" the "re" module, and the
find_python_module implementation itself imports "re" :)

Fixes #2095

--- cmake/FindPythonModule.cmake
+++ cmake/FindPythonModule.cmake
@@ -7,7 +7,7 @@
     # A module's location is usually a directory, but for binary modules
     # it's a .so file.
     execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
-      "import re, ${module}; print re.compile('/__init__.py.*').sub('',${module}.__file__)"
+      "import re, ${module}; print(re.compile('/__init__.py.*').sub('',${module}.__file__))"
       RESULT_VARIABLE _${module}_status
       OUTPUT_VARIABLE _${module}_location
       ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)


Update FindHDF5 based on Brad King comments

--- cmake/Modules/FindHDF5.cmake
+++ cmake/Modules/FindHDF5.cmake
@@ -103,51 +103,38 @@
     endforeach()
 endif()

+# Determine whether to search for serial or parallel executable first
 if(HDF5_PREFER_PARALLEL)
-  # try to find the HDF5 wrapper compilers
-  find_program( HDF5_C_COMPILER_EXECUTABLE
-    NAMES h5pcc h5cc
-    HINTS ENV HDF5_ROOT
-    PATH_SUFFIXES bin Bin
-    DOC "HDF5 Wrapper compiler.  Used only to detect HDF5 compile flags." )
-  mark_as_advanced( HDF5_C_COMPILER_EXECUTABLE )
-
-  find_program( HDF5_CXX_COMPILER_EXECUTABLE
-    NAMES h5pc++ h5c++
-    HINTS ENV HDF5_ROOT
-    PATH_SUFFIXES bin Bin
-    DOC "HDF5 C++ Wrapper compiler.  Used only to detect HDF5 compile flags." )
-  mark_as_advanced( HDF5_CXX_COMPILER_EXECUTABLE )
-
-  find_program( HDF5_Fortran_COMPILER_EXECUTABLE
-    NAMES h5pfc h5fc
-    HINTS ENV HDF5_ROOT
-    PATH_SUFFIXES bin Bin
-    DOC "HDF5 Fortran Wrapper compiler.  Used only to detect HDF5 compile flags." )
-  mark_as_advanced( HDF5_Fortran_COMPILER_EXECUTABLE )
+  set(HDF5_C_COMPILER_NAMES h5pcc h5cc)
+  set(HDF5_CXX_COMPILER_NAMES h5pc++ h5c++)
+  set(HDF5_Fortran_COMPILER_NAMES h5pfc h5fc)
 else()
-  # try to find the HDF5 wrapper compilers
-  find_program( HDF5_C_COMPILER_EXECUTABLE
-    NAMES h5cc h5pcc
-    HINTS ENV HDF5_ROOT
-    PATH_SUFFIXES bin Bin
-    DOC "HDF5 Wrapper compiler.  Used only to detect HDF5 compile flags." )
-  mark_as_advanced( HDF5_C_COMPILER_EXECUTABLE )
-
-  find_program( HDF5_CXX_COMPILER_EXECUTABLE
-    NAMES h5c++ h5pc++
-    HINTS ENV HDF5_ROOT
-    PATH_SUFFIXES bin Bin
-    DOC "HDF5 C++ Wrapper compiler.  Used only to detect HDF5 compile flags." )
-  mark_as_advanced( HDF5_CXX_COMPILER_EXECUTABLE )
-
-  find_program( HDF5_Fortran_COMPILER_EXECUTABLE
-    NAMES h5fc h5pfc
-    HINTS ENV HDF5_ROOT
-    PATH_SUFFIXES bin Bin
-    DOC "HDF5 Fortran Wrapper compiler.  Used only to detect HDF5 compile flags." )
-  mark_as_advanced( HDF5_Fortran_COMPILER_EXECUTABLE )
+  set(HDF5_C_COMPILER_NAMES h5cc h5pcc)
+  set(HDF5_CXX_COMPILER_NAMES h5c++ h5pc++)
+  set(HDF5_Fortran_COMPILER_NAMES h5fc h5pfc)
 endif()
+
+# try to find the HDF5 wrapper compilers
+find_program( HDF5_C_COMPILER_EXECUTABLE
+  NAMES ${HDF5_C_COMPILER_NAMES}
+  HINTS ENV HDF5_ROOT
+  PATH_SUFFIXES bin Bin
+  DOC "HDF5 Wrapper compiler.  Used only to detect HDF5 compile flags." )
+mark_as_advanced( HDF5_C_COMPILER_EXECUTABLE )
+
+find_program( HDF5_CXX_COMPILER_EXECUTABLE
+  NAMES ${HDF5_CXX_COMPILER_NAMES}
+  HINTS ENV HDF5_ROOT
+  PATH_SUFFIXES bin Bin
+  DOC "HDF5 C++ Wrapper compiler.  Used only to detect HDF5 compile flags." )
+mark_as_advanced( HDF5_CXX_COMPILER_EXECUTABLE )
+
+find_program( HDF5_Fortran_COMPILER_EXECUTABLE
+  NAMES ${HDF5_Fortran_COMPILER_NAMES}
+  HINTS ENV HDF5_ROOT
+  PATH_SUFFIXES bin Bin
+  DOC "HDF5 Fortran Wrapper compiler.  Used only to detect HDF5 compile flags." )
+mark_as_advanced( HDF5_Fortran_COMPILER_EXECUTABLE )

 find_program( HDF5_DIFF_EXECUTABLE
     NAMES h5diff
@@ -359,9 +346,6 @@
     if( HDF5_LIBRARY_DIRS )
         _remove_duplicates_from_beginning( HDF5_LIBRARY_DIRS )
     endif()
-    if( HDF5_LIBRARIES )
-      _remove_duplicates_from_beginning( HDF5_LIBRARIES )
-    endif()

     # If the HDF5 include directory was found, open H5pubconf.h to determine if
     # HDF5 was compiled with parallel IO support


Add the directory to load-path for guile tests

The directory is the one where ADD_GUILE_MODULE copies scheme files to.
It has the same structure as the installation directory

--- cmake/OpenCogFunctions.cmake
+++ cmake/OpenCogFunctions.cmake
@@ -164,7 +164,9 @@
                 ${CMAKE_CURRENT_SOURCE_DIR})
         ENDIF()

-        ADD_TEST(${TEST_NAME} guile --use-srfi=64 ${FILE_PATH}
+        ADD_TEST(NAME ${TEST_NAME}
+            COMMAND guile -L ${PROJECT_BINARY_DIR}/opencog/scm
+                      --use-srfi=64 ${FILE_PATH}
             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

     ENDIF()


fixed linking error in clang - libc++ is not wroking aparently...

--- cmake/toolchains/clang.cmake
+++ cmake/toolchains/clang.cmake
@@ -5,5 +5,5 @@
 add_compile_options(-fstack-protector-all)

 # use LLVM's libc++ instead of GNU's libstdc++
-add_compile_options(-stdlib=libc++)
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
+#add_compile_options(-stdlib=libc++)
+#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")


Fix for PHP library search

Fix for PHP library search

--- cmake_modules/FindPHP5.cmake
+++ cmake_modules/FindPHP5.cmake
@@ -57,6 +57,17 @@
   ${PHP5_BINARY_DIR}
   )
 MESSAGE(STATUS "Executable: " ${PHP5_EXECUTABLE})
+
+
+FIND_LIBRARY(PHP5_LIBRARY
+  NAMES php5ts php5
+  PATHS
+  /usr/bin
+  /usr/local/bin
+  ${PHP5_BINARY_DIR}
+  )
+
+MESSAGE(STATUS "Library: " ${PHP5_LIBRARY})

 MARK_AS_ADVANCED(
   PHP5_EXECUTABLE


Added catch for simulated compiler

Added catch for simulated compiler

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -90,7 +90,7 @@
      message(STATUS "Using clang compiler.")

      # set default cmake c flags for clang
-     set(CMAKE_C_FLAGS "-Wall -std=c11 ${CFLAGS}")
+     set(CMAKE_C_FLAGS "-Wall -std=c11")
      set(CMAKE_C_FLAGS_DEBUG "-g")
      set(CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG")
      set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
@@ -144,77 +144,76 @@
          string(CONCAT CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})

          # if the clang msvc-like command line interface is being used
-         #if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
-         set(CMAKE_CXX_FLAGS
-                 "${CMAKE_CXX_FLAGS}"
-                 " /MD"
-                 " /EHsc"
-                 " /W3"
-                 " /FC"
-                 " /Ox"
-                 " -D_SCL_SECURE_NO_WARNINGS"
-                 " ${CXXFLAGS}"
-                 )
-         string(CONCAT CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
-
-         # clang-cl 9 doesn't properly implement an alternative for -isystem <dir>
-         # for system headers, all warnings incurred by eigen must be silenced to
-         # make the build log readable.
-         if (CMAKE_CXX_COMPILER_VERSION LESS_EQUAL 12.0.0)
+         if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
              set(CMAKE_CXX_FLAGS
                      "${CMAKE_CXX_FLAGS}"
-                     " -Wno-float-conversion"
-                     " -Wno-unreachable-code-return"
-                     " -Wno-unused-template"
-                     " -Wno-sign-conversion"
-                     " -Wno-undef"
-                     " -Wno-unused-result"
-                     " -Wno-documentation-unknown-command"
-                     " -Wno-missing-prototypes"
-                     " -Wno-missing-noreturn"
-                     " -Wno-deprecated-declarations"
-                     " -Wno-implicit-int-conversion"
-                     " -Wno-shadow-field-in-constructor"
-                     " -Wno-shadow-field"
-                     " -Wno-switch-enum"
-                     " -Wno-cast-align"
-                     " -Wno-float-equal"
-                     " -Wno-deprecated-dynamic-exception-spec"
-                     " -Wno-header-hygiene"
-                     " -Wno-zero-as-null-pointer-constant"
-                     " -Wno-vla-extension"
-                     " -Wno-old-style-cast"
-                     " -Wno-disabled-macro-expansion"
-                     " -Wno-covered-switch-default"
-                     " -Wno-range-loop-analysis"
-                     " -Wno-shadow"
-                     " -Wno-reserved-id-macro"
-                     " -Wno-float-overflow-conversion"
-                     " -Wno-unknown-argument"
-                     " -Wno-extra-semi"
-                     " -Wno-global-constructors"
-                     " -Wno-extra-semi-stmt"
-                     " -Wno-documentation-deprecated-sync"
-                     " -Wno-unused-variable"
-                     " -Wno-shadow-uncaptured-local"
-                     " -Wno-documentation"
-                     " -Wno-deprecated"
-                     " -Wno-unused-macros"
-                     " -Wno-vla"
-                     " -Wno-unreachable-code-break"
-                     " -Wno-implicit-fallthrough"
-                     " -Wno-conditional-uninitialized"
-                     " -Wno-exit-time-destructors"
-                     " -Wno-undefined-func-template"
-                     " -Wno-c++98-compat"
-                     " -Wno-shorten-64-to-32"
-                     " -Wno-c++98-compat-pedantic"
-                     " -Wno-used-but-marked-unused" # : boost unit tests. should be reinabled and sorted out.
-                     " -Wno-newline-eof" # : end of line newline. should be reinabled and so.
-                     " -Wno-return-std-move-in-c++11" # :
+                     " /MD"
+                     " /EHsc"
+                     " /W3"
+                     " /FC"
+                     " /Ox"
+                     " -D_SCL_SECURE_NO_WARNINGS"
                      )
              string(CONCAT CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
-             #endif ()
+
+             # clang-cl 9 doesn't properly implement an alternative for -isystem <dir>
+             # for system headers, all warnings incurred by eigen must be silenced to
+             # make the build log readable.
+             if (CMAKE_CXX_COMPILER_VERSION LESS_EQUAL 12.0.0)
+                 set(CMAKE_CXX_FLAGS
+                         "${CMAKE_CXX_FLAGS}"
+                         " -Wno-float-conversion"
+                         " -Wno-unreachable-code-return"
+                         " -Wno-unused-template"
+                         " -Wno-sign-conversion"
+                         " -Wno-undef"
+                         " -Wno-unused-result"
+                         " -Wno-documentation-unknown-command"
+                         " -Wno-missing-prototypes"
+                         " -Wno-missing-noreturn"
+                         " -Wno-deprecated-declarations"
+                         " -Wno-implicit-int-conversion"
+                         " -Wno-shadow-field-in-constructor"
+                         " -Wno-shadow-field"
+                         " -Wno-switch-enum"
+                         " -Wno-cast-align"
+                         " -Wno-float-equal"
+                         " -Wno-deprecated-dynamic-exception-spec"
+                         " -Wno-header-hygiene"
+                         " -Wno-zero-as-null-pointer-constant"
+                         " -Wno-vla-extension"
+                         " -Wno-old-style-cast"
+                         " -Wno-disabled-macro-expansion"
+                         " -Wno-covered-switch-default"
+                         " -Wno-range-loop-analysis"
+                         " -Wno-shadow"
+                         " -Wno-reserved-id-macro"
+                         " -Wno-float-overflow-conversion"
+                         " -Wno-unknown-argument"
+                         " -Wno-extra-semi"
+                         " -Wno-global-constructors"
+                         " -Wno-extra-semi-stmt"
+                         " -Wno-documentation-deprecated-sync"
+                         " -Wno-unused-variable"
+                         " -Wno-shadow-uncaptured-local"
+                         " -Wno-documentation"
+                         " -Wno-deprecated"
+                         " -Wno-unused-macros"
+                         " -Wno-vla"
+                         " -Wno-unreachable-code-break"
+                         " -Wno-implicit-fallthrough"
+                         " -Wno-conditional-uninitialized"
+                         " -Wno-exit-time-destructors"
+                         " -Wno-undefined-func-template"
+                         " -Wno-c++98-compat"
+                         " -Wno-shorten-64-to-32"
+                         " -Wno-c++98-compat-pedantic"
+                         " -Wno-used-but-marked-unused" # : boost unit tests. should be reinabled and sorted out.
+                         " -Wno-newline-eof" # : end of line newline. should be reinabled and so.
+                         " -Wno-return-std-move-in-c++11" # :
+                         )
+                 string(CONCAT CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+             endif ()
          endif ()
          set(CMAKE_CXX_FLAGS_DEBUG "-g")
          set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")


Fixes to linux cmake

Fixes to linux cmake

--- cmake-scripts/Findwxwidgets3.cmake
+++ cmake-scripts/Findwxwidgets3.cmake
@@ -30,21 +30,22 @@
     SET(WXWIDGETS_INCLUDE_DIR ${WXWIDGETS_INCLUDE_DIR} ${WXWIDGETS_SETUP_PATH})
 ELSE(MINGW)
     FIND_PROGRAM(WX_CONFIG
-        NAMES wx-config3.0 wx-config2.9
+        NAMES wx-config-3.0 wx-config-2.9
         PATHS
             /usr/bin
             /usr/local/bin
     )

     EXECUTE_PROCESS(
-        COMMAND WX_CONFIG "--cflags"
+        COMMAND ${WX_CONFIG} "--cflags"
         OUTPUT_VARIABLE WXWIDGETS_INCLUDE_DIR
     )

     EXECUTE_PROCESS(
-        COMMAND WX_CONFIG "--libs"
+        COMMAND ${WX_CONFIG} "--libs"
         OUTPUT_VARIABLE WXWIDGETS_LIBRARY
     )
+	MESSAGE("wx lib ${WXWIDGETS_LIBRARY}")
 ENDIF(MINGW)

@@ -56,4 +57,4 @@
     MESSAGE(STATUS "Found wxWidgets: ${WXWIDGETS_LIBRARY}")
 ELSE(WXWIDGETS_FOUND)
     MESSAGE(WARNING "Could not find wxWidgets")
-ENDIF(WXWIDGETS_FOUND)+ENDIF(WXWIDGETS_FOUND)


cmake: Change version to 1.1.0

cmake: Change version to 1.1.0

Version 1.0.1 will be skipped because not only bug fixes have been merged into the develop branch. No need for a separate bug fix release.

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -52,7 +52,7 @@
   # --------------------------------------------------------------------------
   # meta-data
   NAME         "MIRTK"
-  VERSION      "1.0.1" # Version of core (+ external) modules
+  VERSION      "1.1.0" # Version of core (+ external) modules
   SOVERSION    "0"     # API yet unstable
   AUTHORS      "Andreas Schuh"
   DESCRIPTION  "Medical Image Registration ToolKit"


some fixes for the version-tracking

some fixes for the version-tracking

Some variables were still set first before introducing the cached
variables. In CMake, that means that the first ones are local
and override the cached variable, in effect disabling them.

I've also introduced SIRF_URL, just in case somebody wants to point
to a fork.

--- version_config.cmake
+++ version_config.cmake
@@ -47,22 +47,6 @@
 set(FFTW3double_URL ${FFTW3_URL})
 set(FFTW3double_MD5 ${FFTW3_MD5})

-
-
-## STIR
-
-set(STIR_URL https://github.com/CCPPETMR/STIR )
-set(STIR_TAG 8bf37d9d7fdde7cb3a98a6f848d93827dbd98a18)
-
-## Gadgetron
-set(Gadgetron_URL https://github.com/CCPPETMR/gadgetron )
-set(Gadgetron_TAG f03829ef45e57466829e6ec46da7a7cf61db1c8a)
-
-## ISMRMRD
-set(ISMRMRD_URL https://github.com/CCPPETMR/ismrmrd )
-set(ISMRMRD_TAG 35012c6c8000616546c2d6b1757eba0c5b21b2d4)
-
-
 ## HDF5
 set(HDF5_URL https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0-patch1/src/CMake-hdf5-1.10.0-patch1.tar.gz )
 set(HDF5_MD5 6fb456d03a60f358f3c077288a6d1cd8 )
@@ -87,10 +71,9 @@
 # with devel build it uses latest version of upstream packages
 # otherwise uses the versions for SIRF 0.9

-#SIRF
-set(SIRF_URL https://github.com/CCPPETMR/SIRF )
+set(DEFAULT_SIRF_URL https://github.com/CCPPETMR/SIRF )
 if (DEVEL_BUILD)
-  set (SIRF_TAG master)
+  set (DEFAULT_SIRF_TAG master)
   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
   set(DEFAULT_STIR_TAG master)
@@ -105,6 +88,7 @@

 else()
   set(DEFAULT_SIRF_TAG v0.9.0)
+
   ## STIR
   set(DEFAULT_STIR_URL https://github.com/CCPPETMR/STIR )
   set(DEFAULT_STIR_TAG 8bf37d9d7fdde7cb3a98a6f848d93827dbd98a18)
@@ -122,6 +106,7 @@

 # Set the tags for SIRF, STIR, Gadgetron and ISMRMRD
 # these can be overridden by the user
+SET(SIRF_URL ${DEFAULT_SIRF_URL} CACHE STRING ON)
 SET(SIRF_TAG ${DEFAULT_SIRF_TAG} CACHE STRING ON)

 SET(STIR_TAG ${DEFAULT_STIR_TAG} CACHE STRING ON)
@@ -133,4 +118,4 @@
 SET(ISMRMRD_TAG ${DEFAULT_ISMRMRD_TAG} CACHE STRING ON)
 SET(ISMRMRD_URL ${DEFAULT_ISMRMRD_URL} CACHE STRING ON)

-mark_as_advanced(SIRF_TAG STIR_URL STIR_TAG Gadgetron_URL Gadgetron_TAG ISMRMRD_URL ISMRMRD_TAG)
+mark_as_advanced(SIRF_URL SIRF_TAG STIR_URL STIR_TAG Gadgetron_URL Gadgetron_TAG ISMRMRD_URL ISMRMRD_TAG)


Pass OSX related flags when compiling zlib w/ExternalProject

--- cmake/FindSkia.cmake
+++ cmake/FindSkia.cmake
@@ -104,7 +104,10 @@
     CMAKE_CACHE_ARGS
       -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
       -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-      -DCMAKE_INSTALL_LIBDIR:PATH=<INSTALL_DIR>)
+      -DCMAKE_INSTALL_LIBDIR:PATH=<INSTALL_DIR>
+      -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
+      -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
+      -DCMAKE_OSX_SYSROOT:PATH=${CMAKE_OSX_SYSROOT})

   ExternalProject_Get_Property(zlib-project install_dir)
   set(ZLIB_INCLUDE_DIRS ${install_dir})


cmake fix

cmake fix

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

--- cmake/gsConfig.cmake
+++ cmake/gsConfig.cmake
@@ -91,7 +91,46 @@
 set(CMAKE_CXX_STANDARD_REQUIRED OFF)
 set(CMAKE_CXX_EXTENSIONS OFF)

-include(AddCXXCompileOptions)
+#include(AddCXXCompileOptions)
+if(NOT DEFINED CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION)
+  if((CMAKE_SYSTEM_NAME STREQUAL "Darwin") AND (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
+    # set(CMAKE_CXX_FLAGS "-stdlib=libc++")
+    set(CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION "-std=c++${CMAKE_CXX_STANDARD}")
+    set(CMAKE_CXX${CMAKE_CXX_STANDARD}_EXTENSION_COMPILE_OPTION "-std=gnu++${CMAKE_CXX_STANDARD}")
+  elseif((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND MSVC)
+    set(CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION "")
+    set(CMAKE_CXX${CMAKE_CXX_STANDARD}_EXTENSION_COMPILE_OPTION "")
+  endif()
+endif()
+
+if (CMAKE_VERSION VERSION_LESS "3.1" AND CMAKE_COMPILER_IS_GNUCC)
+  if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1)
+    CHECK_CXX_COMPILER_FLAG("-std=c++${CMAKE_CXX_STANDARD}"
+      COMPILER_SUPPORTS_CXX${CMAKE_CXX_STANDARD})
+    if(COMPILER_SUPPORTS_CXX${CMAKE_CXX_STANDARD})
+      if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++${CMAKE_CXX_STANDARD} -stdlib=libc++")
+      else()
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++${CMAKE_CXX_STANDARD}")
+      endif()
+    else()
+      CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
+      if(COMPILER_SUPPORTS_CXX0X)
+        if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+          set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -stdlib=libc++")
+        else()
+          set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+        endif()
+      else()
+        message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++${CMAKE_CXX_STANDARD}.")
+      endif()
+    endif()
+  else() #gcc 6.1
+    if(CMAKE_CXX_STANDARD EQUAL "98")
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
+    endif()
+  endif()
+endif()#cmake<3.1

 if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel")
   # message(STATUS "Using Boost for smart pointers")


small fix

small fix

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

--- cmake/gsConfig.cmake
+++ cmake/gsConfig.cmake
@@ -139,7 +139,8 @@
 endif()

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

 if (MINGW)


group L151 and L152 n RAM handling as they are from same family

--- cmake/stm32/l1.cmake
+++ cmake/stm32/l1.cmake
@@ -49,7 +49,7 @@
         elseif(SIZE_CODE STREQUAL "B")
             set(RAM "16K")
         endif()
-    elseif((TYPE STREQUAL "L151xB"))
+    elseif((TYPE STREQUAL "L151xB") OR (TYPE STREQUAL "L152xB"))
         if(SIZE_CODE STREQUAL "6")
             set(RAM "10K")
         elseif(SIZE_CODE STREQUAL "8")
@@ -57,23 +57,7 @@
         elseif(SIZE_CODE STREQUAL "B")
             set(RAM "16K")
         endif()
-    elseif((TYPE STREQUAL "L151xBA"))
-        if(SIZE_CODE STREQUAL "6")
-            set(RAM "16K")
-        elseif(SIZE_CODE STREQUAL "8")
-            set(RAM "32K")
-        elseif(SIZE_CODE STREQUAL "B")
-            set(RAM "32K")
-        endif()
-    elseif((TYPE STREQUAL "L152xB"))
-        if(SIZE_CODE STREQUAL "6")
-            set(RAM "10K")
-        elseif(SIZE_CODE STREQUAL "8")
-            set(RAM "10K")
-        elseif(SIZE_CODE STREQUAL "B")
-            set(RAM "16K")
-        endif()
-    elseif((TYPE STREQUAL "L152xBA"))
+    elseif((TYPE STREQUAL "L151xBA") OR (TYPE STREQUAL "L152xBA"))
         if(SIZE_CODE STREQUAL "6")
             set(RAM "16K")
         elseif(SIZE_CODE STREQUAL "8")


-updated Integrate.cmake to the newest version

--- code/Integrate.cmake
+++ code/Integrate.cmake
@@ -3,10 +3,12 @@
 # http://www.radonframework.org/projects/rf/wiki/UserManualCMakeFramework
 # http://www.radonframework.org/projects/rf/wiki/DeveloperManualCMakeFramework
 #
-if (NOT DEFINED ${CMAKE_PROJECT_NAME}_INCLUDED)
+if (RCF_INCLUDED)
+    return()
+endif()

-set(${CMAKE_PROJECT_NAME}_INCLUDED "")
-set(${CMAKE_PROJECT_NAME}_INTEGRATED "" CACHE INTERNAL "Integrated projects")
+set(RCF_INCLUDED true)
+set(RCF_INTEGRATED "" CACHE INTERNAL "Integrated projects")

 find_package(Git REQUIRED)
 set(repo "https://github.com/tak2004/RadonCMakeFramework.git")
@@ -16,6 +18,4 @@
 	execute_process(COMMAND "${GIT_EXECUTABLE}" "clone" "${repo}" "${outdir}")
 endif()
 include("${outdir}/extern/ConfigurationHook.cmake")
-include("${outdir}/extern/Generate.cmake")
-
-endif()+include("${outdir}/extern/Generate.cmake")


Fix syntax errors in configure.cmake

Fix syntax errors in configure.cmake

--- configure.cmake
+++ configure.cmake
@@ -148,41 +148,6 @@
     ENDIF()
   ENDIF()
 ENDIF()
-
-# System check macros that do nothing on Windows.
-# Very often, it is known that some function is not available
-# on Windows. In such cases it makes sense to use these macros
-# as build  with Visual Studio is considerably faster if irrelevant
-# checks are omitted.
-MACRO(CHECK_INCLUDE_FILES INCLUDES VAR)
-IF(UNIX)
-  CHECK_INCLUDE_FILES ("${INCLUDES}" ${VAR})
-ENDIF()
-ENDMACRO()
-
-MACRO(CHECK_C_SOURCE_COMPILES_UNIX SRC VAR)
-IF(UNIX)
-  CHECK_C_SOURCE_COMPILES("${SRC}" ${VAR})
-ENDIF()
-ENDMACRO()
-
-MACRO(CHECK_CXX_SOURCE_COMPILES SRC VAR)
-IF(UNIX)
-  CHECK_CXX_SOURCE_COMPILES("${SRC}" ${VAR})
-ENDIF()
-ENDMACRO()
-
-MACRO(CHECK_FUNCTION_EXISTS FUNC VAR)
-IF(UNIX)
-  CHECK_FUNCTION_EXISTS("${FUNC}" ${VAR})
-ENDIF()
-ENDMACRO()
-
-MACRO (CHECK_SYMBOL_EXISTS SYM HEADER VAR)
-IF(UNIX)
-  CHECK_SYMBOL_EXISTS("${SYM}" "${HEADER}" ${VAR})
-ENDIF()
-ENDMACRO()

 #
 # Tests for header files
@@ -582,7 +547,7 @@
 # Check if timespec has ts_sec and ts_nsec fields
 #

-CHECK_C_SOURCE_COMPILES_UNIX("
+CHECK_C_SOURCE_COMPILES("
 #include <pthread.h>

 int main(int ac, char **av)
@@ -760,7 +725,7 @@
 #
 # Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
 #
-CHECK_C_SOURCE_COMPILES_UNIX("
+CHECK_C_SOURCE_COMPILES("
   #include <signal.h>
   int main(int ac, char **av)
   {
@@ -773,7 +738,7 @@
   HAVE_POSIX_SIGNALS)

 IF(NOT HAVE_POSIX_SIGNALS)
- CHECK_C_SOURCE_COMPILES_UNIX("
+ CHECK_C_SOURCE_COMPILES("
   #include <signal.h>
   int main(int ac, char **av)
   {
@@ -782,7 +747,7 @@
   }"
   HAVE_BSD_SIGNALS)
   IF (NOT HAVE_BSD_SIGNALS)
-    CHECK_C_SOURCE_COMPILES_UNIX("
+    CHECK_C_SOURCE_COMPILES("
     #include <signal.h>
     void foo() { }
     int main(int ac, char **av)
@@ -816,7 +781,7 @@
 ENDIF()
 ENDIF()

-CHECK_C_SOURCE_COMPILES_UNIX("
+CHECK_C_SOURCE_COMPILES("
   int main(int argc, char **argv)
   {
     extern char *__bss_start;
@@ -824,7 +789,7 @@
   }"
 HAVE_BSS_START)

-CHECK_C_SOURCE_COMPILES_UNIX("
+CHECK_C_SOURCE_COMPILES("
     int main()
     {
       extern void __attribute__((weak)) foo(void);


update basholeveldb hash for revised include

--- basholeveldb.cmake
+++ basholeveldb.cmake
@@ -13,7 +13,7 @@
 external_source (basholeveldb
     2.0.29
     basholeveldb-2.0.29.tar.gz
-    3e5bb0bea1260d8a60f9049fb0bc5ead)
+    e591680823020d495b1d2fab98f08b4a)

 message ("Installing ${basholeveldb_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
 if (${APPLE})


cmake: Fix cpp build

cmake: Fix cpp build

--- cmake/cpp.cmake
+++ cmake/cpp.cmake
@@ -21,6 +21,7 @@
   )
 if(USE_SCIP)
   list(APPEND OR_TOOLS_COMPILE_DEFINITIONS "USE_SCIP")
+  set(GSCIP_DIR gscip)
 endif()
 if(USE_COINOR)
   list(APPEND OR_TOOLS_COMPILE_DEFINITIONS


cmake: dts: getting realpath for system includes for dts.

Fixes: #28893

Now using get_filename_component(REALPATH) to ensure full path with
symlinks and `..` resolved.

Having `..` in path causes the gcc generated dependency file to contain
`\` in path on windows. This confuses ninja.
The result is that ninja consider the file missing, and thus invokes a
CMake run to create the file, resulting in endless loop.

By ensuring that full path (containing `/` which is already ensured)
when calling gcc, then all paths will be posix style, making ninja
happy.

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

--- cmake/dts.cmake
+++ cmake/dts.cmake
@@ -95,7 +95,7 @@
         dts/${ARCH}
         dts
         )
-      set(full_path ${dts_root}/${dts_root_path})
+      get_filename_component(full_path ${dts_root}/${dts_root_path} REALPATH)
       if(EXISTS ${full_path})
         list(APPEND
           DTS_ROOT_SYSTEM_INCLUDE_DIRS


fixed ethcrypto includes

fixed ethcrypto includes

--- cmake/lib.cmake
+++ cmake/lib.cmake
@@ -7,17 +7,19 @@

 CopyHeaders()

-if(${ENABLE_DEBUG})
-    add_definitions(-D__DEBUG__)
-endif()
+#add_definitions(-D__DEBUG__)
+
+include_directories(${Boost_INCLUDE_DIRS} ${CRYPTOPP_INCLUDE_DIR} ${JSONCPP_INCLUDE_DIR} ${ETHCRYPTO_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/src)
+

 file(GLOB SOURCES
     "src/*.cpp"
 )

+
+
 add_library(ethstealth STATIC ${SOURCES})
-
-target_include_directories(ethstealth PUBLIC ${Boost_INCLUDE_DIRS} ${CRYPTOPP_INCLUDE_DIR} ${JSONCPP_INCLUDE_DIR} ${ETHCRYPTO_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src)
+add_dependencies(ethstealth ethcrypto)

 if(NOT SKIP_LIBRARY_INSTALL)
     install(FILES ${HEADERS} DESTINATION include/ethstealth OPTIONAL)


fixed CMake version matching

fixed CMake version matching

--- src/version.cmake
+++ src/version.cmake
@@ -68,7 +68,7 @@
 			message(STATUS "The most recent tag was at ${TAGGEDCOMMIT}")

 			# Check if we're building that tagged commit or a different one
-			if(COMMIT MATCHES TAGGEDCOMMIT)
+			if(COMMIT STREQUAL TAGGEDCOMMIT)
 				message(STATUS "You are building a tagged release")
 				set(VERSIONTAG "release")
 			else()


Partly revert change to "FindFreetype.cmake" made by commit "9f273b4" so as not to break builds that use the old version.

--HG--
branch : android

--- cmake/FindFreetype.cmake
+++ cmake/FindFreetype.cmake
@@ -3,7 +3,7 @@
 ################################################################################
 include(FindPackageHandleStandardArgs)

-find_path(FREETYPE_H_PATH_ft2build NAMES ft2build.h PATH_SUFFIXES freetype2)
+find_path(FREETYPE_H_PATH_ft2build NAMES ft2build.h PATH_SUFFIXES include/freetype2 include freetype2)
 find_path(FREETYPE_H_PATH_ftconfig NAMES freetype/config/ftconfig.h PATH_SUFFIXES freetype2)
 if (NOT FREETYPE_H_PATH_ftconfig)
     find_path(FREETYPE_H_PATH_ftconfig NAMES config/ftconfig.h PATH_SUFFIXES freetype2)


mark some cmake variables as advanced

mark some cmake variables as advanced

--- cmake/FindREADLINE.cmake
+++ cmake/FindREADLINE.cmake
@@ -84,3 +84,5 @@
 # handle the QUIETLY and REQUIRED arguments and set READLINE_FOUND to TRUE
 # if all listed variables are TRUE
 find_package_handle_standard_args ( readline DEFAULT_MSG READLINE_LIBRARY READLINE_INCLUDE_DIR )
+
+mark_as_advanced ( READLINE_INCLUDE_DIR READLINE_LIBRARY )


Redundant FindTinyXML2.cmake lines removed

--- cmake/FindTinyXML2.cmake
+++ cmake/FindTinyXML2.cmake
@@ -1,9 +1,6 @@
 ################################################################################
 # Custom cmake module for CEGUI to find tinyxml2
 ################################################################################
-include(FindPackageHandleStandardArgs)
-include(CheckCXXSourceCompiles)
-
 find_path(TINYXML2_H_PATH NAMES tinyxml2.h)
 find_library(TINYXML2_LIB NAMES tinyxml2 libtinyxml2 PATH_SUFFIXES dynamic)
 find_library(TINYXML2_LIB_DBG NAMES tinyxml2_d libtinyxml2_d PATH_SUFFIXES dynamic)
@@ -18,10 +15,6 @@
 cegui_find_package_handle_standard_args(TINYXML2 TINYXML2_LIB TINYXML2_H_PATH)

 if (TINYXML2_FOUND)
-    # what API version do we have here?
-    set(CMAKE_REQUIRED_INCLUDES ${TINYXML2_H_PATH})
-    set(CMAKE_REQUIRED_LIBRARIES ${TINYXML2_LIB})
-
     set (TINYXML2_INCLUDE_DIR ${TINYXML2_H_PATH})
     set (TINYXML2_LIBRARIES ${TINYXML2_LIB})
     if (TINYXML2_LIB_DBG)


Fixes after vpm_framework change

Fixes after vpm_framework change

--- configure.cmake
+++ configure.cmake
@@ -1,7 +1,7 @@
 # Copyright (c) 2011, Christian Rorvik
 # Distributed under the Simplified BSD License (See accompanying file LICENSE.txt)

-vpm_add_dependencies(boost)
+vpm_depend(boost)

 add_definitions(-DBOOST_TEST_ALTERNATIVE_INIT_API)


Finally came up with a 'nice' solution to our Qt Creator + CMake on OS X.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -78,11 +78,17 @@
     # Required packages

     IF(APPLE)
-        # Note: when calling CMake from Qt Creator, on OS X, the PATH is not the
-        #       we get from the terminal. This means that CMake cannot find Qt,
-        #       so we have no choice but to hard-code qmake's path...
-
-        SET(QT_QMAKE_EXECUTABLE /Applications/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake)
+        # Note: when calling CMake from Qt Creator, on OS X, our PATH is not
+        #       passed to CMake, meaning that CMake cannot find Qt. So, we have
+        #       no choice but to set QT_QMAKE_EXECUTABLE, so that CMake can find
+        #       Qt and we do this assuming that Qt's path is set in /etc/profile
+        #       (as recommended in our developer's documentation)...
+
+        EXECUTE_PROCESS(
+            COMMAND sh -c ". /etc/profile && which qmake"
+            OUTPUT_STRIP_TRAILING_WHITESPACE
+            OUTPUT_VARIABLE QT_QMAKE_EXECUTABLE
+        )
     ENDIF()

     FIND_PACKAGE(Qt4 4.8.1 REQUIRED)


Some minor cleaning up [ci skip].

Some minor cleaning up [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -483,17 +483,15 @@
                        ${I18N_QRC_FILENAME})

         LIST(APPEND RESOURCES ${I18N_QRC_FILENAME})
+
+        # Update the translation (.ts) files and generate the language (.qm)
+        # files, which will later on be embedded in the plugin
+
+        UPDATE_LANGUAGE_FILES(${PLUGIN_NAME} ${SOURCES} ${HEADERS_MOC} ${UIS})
     ENDIF()

     IF(EXISTS ${UI_QRC_FILENAME})
         LIST(APPEND RESOURCES ${UI_QRC_FILENAME})
-    ENDIF()
-
-    # Update the translation (.ts) files and generate the language (.qm) files,
-    # which will later on be embedded in the plugin
-
-    IF(NOT "${RESOURCES}" STREQUAL "")
-        UPDATE_LANGUAGE_FILES(${PLUGIN_NAME} ${SOURCES} ${HEADERS_MOC} ${UIS})
     ENDIF()

     # Definition to make sure that the plugin can be used by other plugins


Typo fix

Typo fix

--- cmake/lapack.cmake
+++ cmake/lapack.cmake
@@ -419,7 +419,7 @@
    zhbev_2stage.f zhbevx_2stage.f zhbevd_2stage.f zhegv_2stage.f
    zgesvdq.f zlaunhr_col_getrfnp.f zlaunhr_col_getrfnp2.f
    zungtsqr.f zungtsqr_row.f zunhr_col.f
-   zlarts3.f ztrsyl3.f)
+   zlatrs3.f ztrsyl3.f)

 set(ZXLASRC zgesvxx.f zgerfsx.f zla_gerfsx_extended.f zla_geamv.f
    zla_gercond_c.f zla_gercond_x.f zla_gerpvgrw.f zsysvxx.f zsyrfsx.f


compiler flags

compiler flags

--- cmake/shared.cmake
+++ cmake/shared.cmake
@@ -62,6 +62,10 @@
 # compiler config ======================================================================================================

 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+
+	set(CMAKE_CXX_STANDARD 14)
+    set(CMAKE_CXX_STANDARD_REQUIRED on)
+    set(CMAKE_CXX_EXTENSIONS ON)

     if(MSVC)
         message("Using clang-cl")
@@ -78,11 +82,7 @@
         endif()
         add_definitions(-DNOMINMAX -D_USE_MATH_DEFINES)
     else()
-        message("Using clang")
-
-        set(CMAKE_CXX_STANDARD 14)
-        set(CMAKE_CXX_STANDARD_REQUIRED on)
-        set(CMAKE_CXX_EXTENSIONS OFF)
+        message("Using clang")

         if(BUILD_SANITIZE_MEMORY)
             set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=alignment")
@@ -102,7 +102,7 @@

     set(CMAKE_CXX_STANDARD 14)
     set(CMAKE_CXX_STANDARD_REQUIRED on)
-    set(CMAKE_CXX_EXTENSIONS OFF)
+    set(CMAKE_CXX_EXTENSIONS ON)

     # GCC fails to retain attributes while passing as template arg. hide warnings
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-ignored-attributes")
@@ -111,13 +111,13 @@

     set(CMAKE_CXX_STANDARD 14)
     set(CMAKE_CXX_STANDARD_REQUIRED on)
-    set(CMAKE_CXX_EXTENSIONS OFF)
+    set(CMAKE_CXX_EXTENSIONS ON)
 elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
     message("Using Visual Studio C++")

     set(CMAKE_CXX_STANDARD 14)
     set(CMAKE_CXX_STANDARD_REQUIRED on)
-    set(CMAKE_CXX_EXTENSIONS OFF)
+    set(CMAKE_CXX_EXTENSIONS ON)

     add_definitions(-DNOMINMAX -D_USE_MATH_DEFINES)


SuperBuild: shark 3.1.3 tag uses more boost components

--- SuperBuild/CMake/External_boost.cmake
+++ SuperBuild/CMake/External_boost.cmake
@@ -18,7 +18,7 @@
   ${BOOST_SB_CONFIG}
   variant=release
   link=shared
-  threading=single
+  threading=multi
   runtime-link=shared
   --prefix=${SB_INSTALL_PREFIX}
   --includedir=${_SB_Boost_INCLUDE_DIR}
@@ -28,6 +28,9 @@
   --with-serialization
   --with-filesystem
   --with-test
+  --with-date_time
+  --with-program_options
+  --with-thread
   -d0
   )

@@ -49,12 +52,6 @@
   -E chdir ${BOOST_SB_SRC}
   ${BOOST_B2_EXE}
   ${BOOST_SB_CONFIG}
-  )
-
-set(BOOST_INSTALL_COMMAND ${CMAKE_COMMAND}
-  -E chdir ${BOOST_SB_SRC}
-  ${BOOST_B2_EXE}
-  ${BOOST_SB_CONFIG}
   install
   )

@@ -67,6 +64,6 @@
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
   CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
   BUILD_COMMAND ${BOOST_BUILD_COMMAND}
-  INSTALL_COMMAND ${BOOST_INSTALL_COMMAND}
+  INSTALL_COMMAND ""
   )


Delete CTestTestfile.cmake

Delete CTestTestfile.cmake

--- CTestTestfile.cmake
+++ CTestTestfile.cmake
@@ -1,8 +0,0 @@
-# CMake generated Testfile for
-# Source directory: /home/msca8h/projects/Quine-Mccluskey
-# Build directory: /home/msca8h/projects/Quine-Mccluskey
-#
-# This file includes the relevant testing commands required for
-# testing this directory and lists subdirectories to be tested as well.
-add_test(QuineMccluskeyTest "QuineMccluskeyTest")
-subdirs("googletest/googletest")


macos: support Apple Universal 2 builds (#1086)

fixes #970

--- absl/copts/AbseilConfigureCopts.cmake
+++ absl/copts/AbseilConfigureCopts.cmake
@@ -12,7 +12,49 @@
   set(ABSL_BUILD_DLL FALSE)
 endif()

-if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
+if(APPLE AND CMAKE_CXX_COMPILER_ID MATCHES [[Clang]])
+  # Some CMake targets (not known at the moment of processing) could be set to
+  # compile for multiple architectures as specified by the OSX_ARCHITECTURES
+  # property, which is target-specific.  We should neither inspect nor rely on
+  # any CMake property or variable to detect an architecture, in particular:
+  #
+  #   - CMAKE_OSX_ARCHITECTURES
+  #     is just an initial value for OSX_ARCHITECTURES; set too early.
+  #
+  #   - OSX_ARCHITECTURES
+  #     is a per-target property; targets could be defined later, and their
+  #     properties could be modified any time later.
+  #
+  #   - CMAKE_SYSTEM_PROCESSOR
+  #     does not reflect multiple architectures at all.
+  #
+  # When compiling for multiple architectures, a build system can invoke a
+  # compiler either
+  #
+  #   - once: a single command line for multiple architectures (Ninja build)
+  #   - twice: two command lines per each architecture (Xcode build system)
+  #
+  # If case of Xcode, it would be possible to set an Xcode-specific attributes
+  # like XCODE_ATTRIBUTE_OTHER_CPLUSPLUSFLAGS[arch=arm64] or similar.
+  #
+  # In both cases, the viable strategy is to pass all arguments at once, allowing
+  # the compiler to dispatch arch-specific arguments to a designated backend.
+  set(ABSL_RANDOM_RANDEN_COPTS "")
+  foreach(_arch IN ITEMS "x86_64" "arm64")
+    string(TOUPPER "${_arch}" _arch_uppercase)
+    string(REPLACE "X86_64" "X64" _arch_uppercase ${_arch_uppercase})
+    foreach(_flag IN LISTS ABSL_RANDOM_HWAES_${_arch_uppercase}_FLAGS)
+      list(APPEND ABSL_RANDOM_RANDEN_COPTS "-Xarch_${_arch}" "${_flag}")
+    endforeach()
+  endforeach()
+  # If a compiler happens to deal with an argument for a currently unused
+  # architecture, it will warn about an unused command line argument.
+  option(ABSL_RANDOM_RANDEN_COPTS_WARNING OFF
+         "Warn if one of ABSL_RANDOM_RANDEN_COPTS is unused")
+  if(ABSL_RANDOM_RANDEN_COPTS AND NOT ABSL_RANDOM_RANDEN_COPTS_WARNING)
+    list(APPEND ABSL_RANDOM_RANDEN_COPTS "-Wno-unused-command-line-argument")
+  endif()
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
   if (MSVC)
     set(ABSL_RANDOM_RANDEN_COPTS "${ABSL_RANDOM_HWAES_MSVC_X64_FLAGS}")
   else()


FindSodium.cmake MAKE VS FOLDER SELECTION GENERIC (#471)

--- contrib/Findsodium.cmake
+++ contrib/Findsodium.cmake
@@ -104,18 +104,14 @@
             message(FATAL_ERROR "the ${_TARGET_ARCH} architecture is not supported by Findsodium.cmake.")
         endif()
         string(APPEND _PLATFORM_PATH "/$$CONFIG$$")
-        # this will need to be maintained manually -.-'
-        if (MSVC_VERSION EQUAL 1600)
-            string(APPEND _PLATFORM_PATH "/v100")
-        elseif (MSVC_VERSION EQUAL 1700)
-            string(APPEND _PLATFORM_PATH "/v110")
-        elseif (MSVC_VERSION EQUAL 1800)
-            string(APPEND _PLATFORM_PATH "/v120")
-        elseif (MSVC_VERSION EQUAL 1900)
-            string(APPEND _PLATFORM_PATH "/v140")
-        else()
-            message(FATAL_ERROR "msvc version ${MSVC_VERSION} is not supported by Findsodium.cmake.")
-        endif()
+
+        if (MSVC_VERSION LESS 1900)
+            math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 60")
+        else()
+            math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 50")
+        endif()
+        string(APPEND _PLATFORM_PATH "/v${_VS_VERSION}")
+
         if (sodium_USE_STATIC_LIBS)
             string(APPEND _PLATFORM_PATH "/static")
         else()


javascript_tests_init: Update CMake function to check if directory exists

If the input parameter is a relative directory, it is prepended with
the expected working directory.

See girder/covalic#93

--- tests/JavascriptTests.cmake
+++ tests/JavascriptTests.cmake
@@ -21,14 +21,20 @@
 endfunction()

 function(add_javascript_style_test name input)
+  set(working_dir "${PROJECT_SOURCE_DIR}/clients/web")
+  if(NOT IS_ABSOLUTE ${input})
+    set(input ${working_dir}/${input})
+  endif()
+  if(NOT EXISTS ${input})
+    message(FATAL_ERROR "Failed to add javascript style tests."
+                        "Directory '${input}' does not exist.")
+  endif()
   add_test(
     NAME "jshint_${name}"
-    WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/clients/web"
     COMMAND "${JSHINT_EXECUTABLE}" --config "${PROJECT_SOURCE_DIR}/tests/jshint.cfg" "${input}"
   )
   add_test(
     NAME "jsstyle_${name}"
-    WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/clients/web"
     COMMAND "${JSSTYLE_EXECUTABLE}" --config "${PROJECT_SOURCE_DIR}/tests/jsstyle.cfg" "${input}"
   )
 endfunction()


boards: qemu_cortex_r5: Enable QEMU icount emulation

This commit enables the QEMU icount emulation mode for improved timing
stability.

In normal emulation mode (without icount), the emulation timing of the
TTC system timer is particularly unstable and this results in a high CI
failure rate.

For more details, refer to the issues #14173 and #22904.

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

--- boards/arm/qemu_cortex_r5/board.cmake
+++ boards/arm/qemu_cortex_r5/board.cmake
@@ -9,6 +9,7 @@
 set(QEMU_FLAGS_${ARCH}
   -nographic
   -machine arm-generic-fdt
+  -icount shift=3,align=off,sleep=off -rtc clock=vm
   -dtb ${ZEPHYR_BASE}/boards/${ARCH}/${BOARD}/fdt-single_arch-zcu102-arm.dtb
   )


Re-add generic tag target

Re-add generic tag target

--- GitTargets.cmake
+++ GitTargets.cmake
@@ -114,6 +114,11 @@
   WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
   )

+if(NOT TARGET tag)
+  add_custom_target(tag)
+endif()
+add_dependencies(tag tag_${PROJECT_NAME})
+
 # remove tag
 add_custom_target(erase_${PROJECT_NAME}
   COMMAND ${GIT_EXECUTABLE} tag -d ${VERSION}


Fixed yaml-cpp.pc file (with prefix)

Fixed yaml-cpp.pc file (with prefix)

git-svn-id: 81c7e36bba88e1c415c184412f72132ebfb74002@206 de72303c-5753-0410-9a76-25d1066b02d0

--- yaml-cpp.pc.cmake
+++ yaml-cpp.pc.cmake
@@ -1,7 +1,7 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_INSTALL_DIR@
-includedir=@INCLUDE_INSTALL_DIR@
+libdir=${prefix}/@LIB_INSTALL_DIR@
+includedir=${prefix}/@INCLUDE_INSTALL_DIR@

 Name: Yaml-cpp
 Description: A YAML parser and emitter for C++


Add tcamprop to Libs list

Add tcamprop to Libs list

--- data/tcam.pc.cmake
+++ data/tcam.pc.cmake
@@ -7,5 +7,5 @@
 Description: Camera control and image acquisition library
 Version: @TCAM_VERSION@
 Requires: @tcam_pkgconfig_dependencies@
-Libs: -L${libdir} -ltcam
+Libs: -L${libdir} -ltcam -ltcamprop
 Cflags: -I${includedir}/


BUILDEM_ENV_STRING: Add CC and CXX environment variables, based on CMAKE compiler vars.

--- BuildSupport.cmake
+++ BuildSupport.cmake
@@ -64,7 +64,7 @@
 # Initialize environment variables string to use for commands.
 set (BUILDEM_BIN_PATH     ${BUILDEM_BIN_DIR}:$ENV{PATH})
 set (BUILDEM_LIB_PATH     ${BUILDEM_LIB_DIR}:$ENV{${BUILDEM_LD_LIBRARY_VAR}})
-set (BUILDEM_ENV_STRING   env PATH=${BUILDEM_BIN_PATH} ${BUILDEM_LD_LIBRARY_VAR}=${BUILDEM_LIB_PATH} ${BUILDEM_PLATFORM_SPECIFIC_ENV})
+set (BUILDEM_ENV_STRING   env PATH=${BUILDEM_BIN_PATH} ${BUILDEM_LD_LIBRARY_VAR}=${BUILDEM_LIB_PATH} ${BUILDEM_PLATFORM_SPECIFIC_ENV} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER})
 set (BUILDEM_LDFLAGS      "-Wl,-rpath,${BUILDEM_LIB_DIR} -L${BUILDEM_LIB_DIR}")

 # All library builds should go to BPD/lib


COMP: Update GROUPS to fix "dirent.h" not found windows build error

List of changes:

$ git shortlog b2bd60084..388eacafb --no-merges
Jean-Christophe Fillion-Robin (4):
      COMP: Add options to toggle building of each CLI and Scripted modules
      COMP: Support customization of RigidAlignmentModule title and category
      [Backport PR-32] COMP: Fix -Wcatch-value warnings in Groups CLI
      [SPHARM-PDM] COMP: Update RigidAlignment to fix "dirent.h" not found windows build error

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -38,8 +38,8 @@
 set(${extension_name}_SOURCE_DIR "${CMAKE_BINARY_DIR}/${extension_name}")
 FetchContent_Populate(${extension_name}
   SOURCE_DIR     ${${extension_name}_SOURCE_DIR}
-  GIT_REPOSITORY ${EP_GIT_PROTOCOL}://github.com/NIRALUser/GROUPS.git
-  GIT_TAG        b2bd6008416711a133fd30182f1c4a49bd0bdc46
+  GIT_REPOSITORY ${EP_GIT_PROTOCOL}://github.com/SlicerSALT/GROUPS.git
+  GIT_TAG        388eacafbd09441a09f7bb072bf5b44594fd2395 # spharmpdm-2021-05-43e7eef5f
   GIT_PROGRESS   1
   QUIET
   )


minor fix for required include path

minor fix for required include path

--- vtkIncludeDirectories.cmake
+++ vtkIncludeDirectories.cmake
@@ -121,11 +121,9 @@
 )

 IF(VTK_RENDERING_NEED_TK_INTERNAL)
-  IF(TK_INTERNAL_PATH)
-    # Need access to internal Tk headers for the vtkTk... widget .cxx files.
-    SET(VTK_INCLUDE_DIRS_BUILD_TREE_CXX ${VTK_INCLUDE_DIRS_BUILD_TREE_CXX}
-        ${TK_INTERNAL_PATH})
-  ENDIF(TK_INTERNAL_PATH)
+  # Need access to internal Tk headers for the vtkTk... widget .cxx files.
+  SET(VTK_INCLUDE_DIRS_BUILD_TREE_CXX ${VTK_INCLUDE_DIRS_BUILD_TREE_CXX}
+      ${TK_INTERNAL_PATH})
 ENDIF(VTK_RENDERING_NEED_TK_INTERNAL)

 IF (VTK_USE_MATROX_IMAGING)


CMake quickfix: Linux debug builds put plugins.cfg to the wrong location

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -100,7 +100,7 @@
   set(OGRE_PLUGIN_DIR_DBG ".")
 elseif (UNIX)
   set(OGRE_PLUGIN_DIR_REL "../lib")
-  set(OGRE_PLUGIN_DIR_DBG "../../lib/OGRE")
+  set(OGRE_PLUGIN_DIR_DBG "../lib")
 endif ()
 if (WIN32)
   # create resources.cfg


compat MAINTENANCE remove duplicate definition

--- CMakeModules/UseCompat.cmake
+++ CMakeModules/UseCompat.cmake
@@ -13,7 +13,6 @@

     check_symbol_exists(get_current_dir_name "unistd.h" HAVE_GET_CURRENT_DIR_NAME)

-    list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_POSIX_C_SOURCE=200809L)
     check_symbol_exists(strndup "string.h" HAVE_STRNDUP)
     check_symbol_exists(getline "stdio.h" HAVE_GETLINE)


Disable test vc-swizzles_avx for Xcode 7.

--- test/CTestCustom.cmake
+++ test/CTestCustom.cmake
@@ -15,8 +15,10 @@
       vc-math_VC_LOG_ILP2_sse
       vc-math_VC_LOG_ILP_sse
       stressVdt)
+elseif(CTEST_BUILD_NAME MATCHES clang7)
+  set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE}
+      vc-swizzles_avx)
 endif()
-

 if(CTEST_BUILD_NAME MATCHES mac107)  #  sse tests of vc fail for mac107 compiler
   set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE}


disabled dataflow sanitizer

disabled dataflow sanitizer

--- toolchains/clang.cmake
+++ toolchains/clang.cmake
@@ -18,7 +18,7 @@
 # http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
 # http://clang.llvm.org/docs/AddressSanitizer.html
 # http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
-    set( TNUN_linker_runtime_sanity_checks -fsanitize=undefined -fsanitize=address -fsanitize=safe-stack -fsanitize=dataflow )
+    set( TNUN_linker_runtime_sanity_checks -fsanitize=undefined -fsanitize=address -fsanitize=safe-stack )
     # -fsanitize=cfi disabled because of error:
     # clang-3.9: error: invalid argument '-fsanitize=cfi' only allowed with '-flto'


New version: 0.3.4

New version: 0.3.4

--- hawkey/VERSION.cmake
+++ hawkey/VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "3")
-SET(HAWKEY_PATCH "3")
+SET(HAWKEY_PATCH "4")


Native: Disables a warning for clang v3.6. While building with clang36 on FreeBSD (`./build native clang3.6`), I was getting this warning: `macro name is a reserved identifier`.

--- src/Native/configure.cmake
+++ src/Native/configure.cmake
@@ -6,7 +6,7 @@

 #CMake does not include /usr/local/include into the include search path
 #thus add it manually. This is required on FreeBSD.
-include_directories(/usr/local/include)
+include_directories(SYSTEM /usr/local/include)

 check_function_exists(
     stat64


Ported the fix from Soprano.

Ported the fix from Soprano.

svn path=/trunk/kdesupport/strigi/; revision=729553

--- cmake/FindCLucene.cmake
+++ cmake/FindCLucene.cmake
@@ -52,7 +52,7 @@
   ENDIF(WIN32)

   FIND_PATH(CLUCENE_LIBRARY_DIR
-      NAMES CLucene/clucene-config.h PATHS ${TRIAL_LIBRARY_PATHS})
+      NAMES CLucene/clucene-config.h PATHS ${TRIAL_LIBRARY_PATHS} ${TRIAL_INCLUDE_PATHS})
   IF (CLUCENE_LIBRARY_DIR)
     MESSAGE(STATUS "Found CLucene library dir: ${CLUCENE_LIBRARY_DIR}")
     FILE(READ ${CLUCENE_LIBRARY_DIR}/CLucene/clucene-config.h CLCONTENT)


Bump PDL::Graphics::PLplot version from 0.42 to 0.44.

svn path=/trunk/; revision=9055

--- cmake/modules/pdl.cmake
+++ cmake/modules/pdl.cmake
@@ -61,17 +61,17 @@
           ERROR_VARIABLE PDL_PLPLOT_VERSION
           )
         #message("PDL_PLPLOT_VERSION = ${PDL_PLPLOT_VERSION}")
-        transform_version(NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION "0.42.0")
+        transform_version(NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION "0.44.0")
         transform_version(NUMERICAL_PDL_PLPLOT_VERSION "${PDL_PLPLOT_VERSION}.0")
 	#message("NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION = ${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}")
 	#message("NUMERICAL_PDL_PLPLOT_VERSION = ${NUMERICAL_PDL_PLPLOT_VERSION}")
         if(NUMERICAL_PDL_PLPLOT_VERSION LESS "${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}")
           message(STATUS "WARNING: "
-          "perl PDL PLplot version < 0.42 "
+          "perl PDL PLplot version < 0.44 "
           "Using more limited set of Perl/PDL examples that work with old versions")
-          set(HAVE_PDL_GRAPHICS_PLPLOT_40 OFF CACHE BOOL "PDL-Graphics-PLplot version is 0.42 or higher" FORCE)
+          set(HAVE_PDL_GRAPHICS_PLPLOT_40 OFF CACHE BOOL "PDL-Graphics-PLplot version is 0.44 or higher" FORCE)
         else(NUMERICAL_PDL_PLPLOT_VERSION LESS "${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}")
-          set(HAVE_PDL_GRAPHICS_PLPLOT_40 ON CACHE BOOL "PDL-Graphics-PLplot version is 0.42 or higher" FORCE)
+          set(HAVE_PDL_GRAPHICS_PLPLOT_40 ON CACHE BOOL "PDL-Graphics-PLplot version is 0.44 or higher" FORCE)
         endif(NUMERICAL_PDL_PLPLOT_VERSION LESS "${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}")
       endif(NUMERICAL_PDL_VERSION LESS "${NUMERICAL_PDL_MINIMUM_VERSION}")
     else(NOT PDL_RETURNCODE)


Even in shared build Windows requires to find static libraries, issue #636

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

--- cmake/pcl_options.cmake
+++ cmake/pcl_options.cmake
@@ -6,7 +6,10 @@
   set(PCL_LIB_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
   set(PCL_LIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
   set(PCL_LIB_TYPE "SHARED")
-  set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX})
+#  set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX})
+  if(WIN32)
+    set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_IMPORT_LIBRARY_SUFFIX})
+  endif(WIN32)
 else(PCL_SHARED_LIBS)
   set(PCL_LIB_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX})
   set(PCL_LIB_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})


emscripten: default-enable BINARYEN_TRAP_MODE=clamp

see: https://groups.google.com/forum/#!topic/emscripten-discuss/IJr4ApiW_zU

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -58,6 +58,7 @@
 option(FIPS_EMSCRIPTEN_USE_CLOSURE "emscripten: run closure compiler on JS code" OFF)
 option(FIPS_EMSCRIPTEN_USE_EMMALLOC "emscripten: use emmalloc allocator" OFF)
 option(FIPS_EMSCRIPTEN_ALLOW_MEMORY_GROWTH "emscripten: allow memory growth" OFF)
+option(FIPS_EMSCRIPTEN_USE_WASM_TRAP_MODE_CLAMP "emscripten: use trap-mode clamp for wasm" ON)
 set(FIPS_EMSCRIPTEN_TOTAL_MEMORY 134217728 CACHE STRING "emscripten: total heap size in bytes")
 set(FIPS_EMSCRIPTEN_LTO_LEVEL 1 CACHE STRING "emscripten: Link-time-optimization level (0..3)")
 set(FIPS_EMSCRIPTEN_OUTLINING_LIMIT 60000 CACHE STRING "emscripten: outlining limit")
@@ -89,6 +90,9 @@

 if (FIPS_EMSCRIPTEN_USE_CWRAP)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s \"EXTRA_EXPORTED_RUNTIME_METHODS=['cwrap','ccall']\"")
+endif()
+if (FIPS_EMSCRIPTEN_USE_WASM_TRAP_MODE_CLAMP)
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s \"BINARYEN_TRAP_MODE='clamp'\"")
 endif()
 if (FIPS_PROFILING)
     set(EMSC_TRACING 1)


emscripten: always use -Wno-warn-absolute-paths

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -196,13 +196,13 @@
 set(CMAKE_SYSTEM_INCLUDE_PATH "${EMSCRIPTEN_ROOT_PATH}/system/include")

 # c++ compiler flags
-set(CMAKE_CXX_FLAGS "${EMSCRIPTEN_CONFIG_OPTION} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} -std=c++11 -stdlib=libc++ ${FIPS_EMSC_EXCEPTION_FLAGS} ${FIPS_EMSC_RTTI_FLAGS} -fstrict-aliasing -Wall -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-inconsistent-missing-override")
+set(CMAKE_CXX_FLAGS "${EMSCRIPTEN_CONFIG_OPTION} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} -std=c++11 -stdlib=libc++ ${FIPS_EMSC_EXCEPTION_FLAGS} ${FIPS_EMSC_RTTI_FLAGS} -fstrict-aliasing -Wall -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-inconsistent-missing-override -Wno-warn-absolute-paths")
 set(CMAKE_CXX_FLAGS_RELEASE "${EMSCRIPTEN_OPT} -DNDEBUG")
 set(CMAKE_CXX_FLAGS_DEBUG "${EMSCRIPTEN_OPT} -g -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1")
 set(CMAKE_CXX_FLAGS_PROFILING "${EMSCRIPTEN_OPT} --profiling")

 # c compiler flags
-set(CMAKE_C_FLAGS "${EMSCRIPTEN_CONFIG_OPTION} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} -fstrict-aliasing -Wall -Wextra -Wno-multichar -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue")
+set(CMAKE_C_FLAGS "${EMSCRIPTEN_CONFIG_OPTION} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} -fstrict-aliasing -Wall -Wextra -Wno-multichar -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-warn-absolute-paths")
 set(CMAKE_C_FLAGS_RELEASE "${EMSCRIPTEN_OPT} -DNDEBUG")
 set(CMAKE_C_FLAGS_DEBUG "${EMSCRIPTEN_OPT} -g -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1")
 set(CMAKE_C_FLAGS_PROFILING "${EMSCRIPTEN_OPT} --profiling")


Updated FW with scripting improvements

Updated FW with scripting improvements

--- 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 "cda4f8b601a555bd6a6726f1b1388dc72dfa8c9e")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "7699a5479cd35532e5c6443301491541088d5549")

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


Updated FW with device time reset on boot

--- 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 "e71909589f2e3c3eba87e28d2e2ef0b05523eb1c")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "6d514c337c5f893f0a63bfd1781af6bcffb72bca")

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


Hotfix for bounding box mapping

Hotfix for bounding box mapping

--- 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 "563f668041c5dd1d462a15ce1174a368ded1fbb8")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "8d27dfe16cbb72fa2649b87385a5a726127c4cfa")

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


Remove unused system command for FMUv2 config and re-enable MPU9250 driver

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -18,7 +18,7 @@
 	drivers/boards/px4fmu-v2
 	drivers/rgbled
 	drivers/mpu6000
-	#drivers/mpu9250
+	drivers/mpu9250
 	drivers/lsm303d
 	drivers/l3gd20
 	drivers/hmc5883
@@ -54,7 +54,7 @@
 	#
 	systemcmds/bl_update
 	systemcmds/config
-	systemcmds/dumpfile
+	#systemcmds/dumpfile
 	#systemcmds/esc_calib
 	systemcmds/mixer
 	#systemcmds/motor_ramp


From Pere:
CMake: put liblzma.dll into bin directory, so we can run root.exe from the build (F5).

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@40351 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -74,9 +74,9 @@
 	  PREFIX LZMA
 	  INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND "" BUILD_COMMAND ""
-	  INSTALL_COMMAND cmake -E copy lib/liblzma.dll <INSTALL_DIR>/bin
+	  INSTALL_COMMAND cmake -E copy lib/liblzma.dll <INSTALL_DIR>/bin/${CMAKE_CFG_INTDIR}
 	  BUILD_IN_SOURCE 1)
-    install(FILES ${CMAKE_BINARY_DIR}/bin/liblzma.dll DESTINATION bin)
+    install(FILES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.dll DESTINATION bin)
     set(LZMA_LIBRARIES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.lib)
     set(LZMA_INCLUDE_DIR ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/include)
   else()


[cmake] Handle missing CUDA gracefully

[cmake] Handle missing CUDA gracefully

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1371,13 +1371,18 @@
 #---Check for CUDA-----------------------------------------------------------------------

 if(cuda OR tmva-gpu)
-  find_package(CUDA REQUIRED)
-
-  if(NOT DEFINED CMAKE_CUDA_STANDARD)
-    set(CMAKE_CUDA_STANDARD ${CMAKE_CXX_STANDARD})
-  endif()
-
-  enable_language(CUDA)
+  find_package(CUDA)
+
+  if(CUDA_FOUND)
+    if(NOT DEFINED CMAKE_CUDA_STANDARD)
+      set(CMAKE_CUDA_STANDARD ${CMAKE_CXX_STANDARD})
+    endif()
+
+    enable_language(CUDA)
+  elseif(fail-on-missing)
+    message(FATAL_ERROR "CUDA not found. Ensure that the installation of CUDA is in the CMAKE_PREFIX_PATH")
+  endif()
+
 endif()

 #---TMVA and its dependencies------------------------------------------------------------


Drop unnecessary workaround, since headers still need to be copied

Since Vc and VecCore headers still need to be copied to the build
directory, it is not necessary to add the specific include paths
to rootcling.

Closes: https://sft.its.cern.ch/jira/browse/ROOT-9208

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1376,9 +1376,6 @@
   target_include_directories(Vc SYSTEM BEFORE INTERFACE $<BUILD_INTERFACE:${Vc_INCLUDE_DIR}>)
   target_link_libraries(Vc INTERFACE VcExt)

-  # propagate build-time include directories to rootcling
-  set_property(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES ${Vc_INCLUDE_DIR})
-
   find_package_handle_standard_args(Vc
     FOUND_VAR Vc_FOUND
     REQUIRED_VARS Vc_INCLUDE_DIR Vc_LIBRARIES Vc_CMAKE_MODULES_DIR
@@ -1452,9 +1449,6 @@
   add_library(VecCore INTERFACE)
   target_include_directories(VecCore SYSTEM INTERFACE $<BUILD_INTERFACE:${VecCore_ROOTDIR}/include>)
   add_dependencies(VecCore VECCORE)
-
-  # propagate build-time include directories to rootcling
-  set_property(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES ${VecCore_ROOTDIR}/include)

   if (Vc_FOUND)
     set(VecCore_Vc_FOUND True)


Added Boost threading library dependency for pyMTF2 in Examples.cmake;

--- Examples/Examples.cmake
+++ Examples/Examples.cmake
@@ -187,6 +187,8 @@
 			endif()
 			set(EX_TARGET_NAMES ${EX_TARGET_NAMES} pyMTF)

+
+			find_package(Boost REQUIRED COMPONENTS thread)
 			add_library(pyMTF2 MODULE Examples/cpp/pyMTF2.cc)
 			set_target_properties(pyMTF2 PROPERTIES PREFIX "")
 			if(WIN32)
@@ -197,7 +199,7 @@
 			target_include_directories(pyMTF2 PUBLIC ${MTF_INCLUDE_DIRS} ${MTF_EXT_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${PYTHON_NUMPY_INCLUDE_DIR})
 			message(STATUS "PYTHON_INCLUDE_DIRS: ${PYTHON_INCLUDE_DIRS}")
 			message(STATUS "PYTHON_LIBRARIES: ${PYTHON_LIBRARIES}")
-			target_link_libraries(pyMTF2 mtf ${MTF_LIBS} ${PYTHON_LIBRARIES} ${PYTHON_LIBS})
+			target_link_libraries(pyMTF2 mtf ${MTF_LIBS} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ${PYTHON_LIBS})
 			install(TARGETS pyMTF2 LIBRARY DESTINATION ${MTF_PY_INSTALL_DIR} COMPONENT py2)
 			add_custom_target(py2 DEPENDS pyMTF2)
 			if(NOT WIN32)


Mac frameworks only needed on Mac.

Mac frameworks only needed on Mac.


Apple: disabled the integer sanitizer (as it is still failing to link on Sierra and Xcode 8.3).

--- toolchains/clang.cmake
+++ toolchains/clang.cmake
@@ -27,8 +27,10 @@
     # clang-3.9: error: invalid argument '-fsanitize=address' not allowed with '-fsanitize=memory'
     set( TNUN_compiler_runtime_sanity_checks ${TNUN_linker_runtime_sanity_checks} -fno-omit-frame-pointer )
 endif()
-set( TNUN_compiler_runtime_integer_checks -fsanitize=integer )
-set( TNUN_linker_runtime_integer_checks   ${TNUN_compiler_runtime_integer_checks} )
+if( NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" ) # Tested with XCode 8.3
+    set( TNUN_compiler_runtime_integer_checks -fsanitize=integer )
+    set( TNUN_linker_runtime_integer_checks   ${TNUN_compiler_runtime_integer_checks} )
+endif()

 # Leak sanitizer is available only on Clang on Linux x64.
 # http://clang.llvm.org/docs/LeakSanitizer.html


remove useless comment

remove useless comment

--- project/cmake/CompilerOption.cmake
+++ project/cmake/CompilerOption.cmake
@@ -55,7 +55,6 @@

 elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
     add_definitions(-Wall -Werror -fPIC)
-    # 苹果系统会误判，不过问题不大，反正也是用最高的标准
     if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "3.4" OR CMAKE_CXX_COMPILER_VERSION  VERSION_EQUAL "3.4" )
         set(CMAKE_C_STANDARD 11)
         set(CMAKE_CXX_STANDARD 14)
@@ -77,7 +76,6 @@

 elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang")
     add_definitions(-Wall -Werror -fPIC)
-    # 苹果系统会误判，不过问题不大，反正也是用最高的标准
     if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "6.0")
         set(CMAKE_C_STANDARD 11)
         set(CMAKE_CXX_STANDARD 14)


try again

try again

--- project/cmake/CompilerOption.cmake
+++ project/cmake/CompilerOption.cmake
@@ -153,7 +153,7 @@
             message(STATUS "AppleClang use stdlib=default(libstdc++)")
         endif()
     elseif(MSVC)
-        list(APPEND COMPILER_STRICT_CFLAGS /W4 /wd"4100" /wd"4125" /wd"4566" /WX)
+        list(APPEND COMPILER_STRICT_CFLAGS /W4 /wd"4100" /wd"4125" /wd"C4566" /WX)
         add_definitions(/MP /EHsc)
         if (MSVC_VERSION GREATER_EQUAL 1910)
             add_definitions(/std:c++17)


fix cuda9, volta, turing compile error (#23730)

--- cmake/cuda.cmake
+++ cmake/cuda.cmake
@@ -101,10 +101,14 @@
   elseif(${CUDA_ARCH_NAME} STREQUAL "Pascal")
     set(cuda_arch_bin "60 61")
   elseif(${CUDA_ARCH_NAME} STREQUAL "Volta")
-    add_definitions("-DSUPPORTS_CUDA_FP16")
+    if (NOT ${CUDA_VERSION} LESS 10.0)
+      add_definitions("-DSUPPORTS_CUDA_FP16")
+    endif()
     set(cuda_arch_bin "70")
   elseif(${CUDA_ARCH_NAME} STREQUAL "Turing")
-    add_definitions("-DSUPPORTS_CUDA_FP16")
+    if (NOT ${CUDA_VERSION} LESS 10.0)
+      add_definitions("-DSUPPORTS_CUDA_FP16")
+    endif()
     set(cuda_arch_bin "75")
   elseif(${CUDA_ARCH_NAME} STREQUAL "All")
     set(cuda_arch_bin ${paddle_known_gpu_archs})


Nagios monitoring 6.4.0-1 Gold

Nagios monitoring 6.4.0-1 Gold

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

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


Split off 7.6.x

Split off 7.6.x

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

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


Fix HDF5 path specification for h5py

Fix HDF5 path specification for h5py

--- h5py.cmake
+++ h5py.cmake
@@ -29,7 +29,8 @@
     UPDATE_COMMAND      ""
     PATCH_COMMAND       ""
     CONFIGURE_COMMAND   ""
-    BUILD_COMMAND       ${FLYEM_ENV_STRING} ${PYTHON_EXE} setup.py build --hdf5=${hdf5_SRC_DIR}
+    BUILD_COMMAND       ${FLYEM_ENV_STRING} ${PYTHON_EXE} setup.py build
+        --hdf5=${FLYEM_BUILD_DIR}
     BUILD_IN_SOURCE     1
     TEST_COMMAND        ${FLYEM_ENV_STRING} ${PYTHON_EXE} setup.py test
     INSTALL_COMMAND     ${FLYEM_ENV_STRING} ${PYTHON_EXE} setup.py install


Remove obsolete compiler opts

Remove obsolete compiler opts

--- Source/cmake_core.cmake
+++ Source/cmake_core.cmake
@@ -1,6 +1,6 @@
 #  SPDX-License-Identifier: Apache-2.0
 #  ----------------------------------------------------------------------------
-#  Copyright 2020 Arm Limited
+#  Copyright 2020-2021 Arm Limited
 #
 #  Licensed under the Apache License, Version 2.0 (the "License"); you may not
 #  use this file except in compliance with the License. You may obtain a copy
@@ -115,12 +115,6 @@
             ASTCENC_AVX=0
             ASTCENC_POPCNT=0)

-    if (${ARCH} MATCHES x64)
-        target_compile_options(astcenc-${ISA_SIMD}
-            PRIVATE
-                $<$<CXX_COMPILER_ID:${GNU_LIKE}>:-mfpmath=sse -msse2>)
-    endif()
-
 elseif(${ISA_SIMD} MATCHES "neon")
     target_compile_definitions(astcenc-${ISA_SIMD}
         PRIVATE
@@ -137,10 +131,6 @@
             ASTCENC_AVX=0
             ASTCENC_POPCNT=0)

-    target_compile_options(astcenc-${ISA_SIMD}
-        PRIVATE
-        $<$<CXX_COMPILER_ID:${GNU_LIKE}>:-mfpmath=sse -msse2>)
-
 elseif(${ISA_SIMD} MATCHES "sse4.1")
     target_compile_definitions(astcenc-${ISA_SIMD}
         PRIVATE
@@ -151,7 +141,7 @@

     target_compile_options(astcenc-${ISA_SIMD}
         PRIVATE
-            $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-mfpmath=sse -msse4.1 -mpopcnt>)
+            $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-msse4.1 -mpopcnt>)

 elseif(${ISA_SIMD} MATCHES "avx2")
     target_compile_definitions(astcenc-${ISA_SIMD}
@@ -163,7 +153,7 @@

     target_compile_options(astcenc-${ISA_SIMD}
         PRIVATE
-            $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-mfpmath=sse -mavx2 -mpopcnt>
+            $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-mavx2 -mpopcnt>
             $<$<CXX_COMPILER_ID:MSVC>:/arch:AVX2>)
 endif()


Remove file requirement

Remove file requirement

File that is removed is no longer necessary and it not being there
breaks the compilation process

--- add-sources.cmake
+++ add-sources.cmake
@@ -195,15 +195,9 @@
     ${LOMSE_PKG_DIR}/pugixml/pugixml.cpp
 )

-if(WIN32)
-    set(PLATFORM_FILES
-        ${LOMSE_SRC_DIR}/agg/src/platform/win32/agg_win32_bmp.cpp
-    )
-elseif(UNIX)
-    set(PLATFORM_FILES
-
-    )
-endif()
+set(PLATFORM_FILES
+
+)

 set(ALL_LOMSE_SOURCES
     ${AGG_FILES} ${DOCUMENT_FILES} ${EXPORTERS_FILES} ${FILE_SYSTEM_FILES}


ENH: Skip generating export headers if module does not contain a target

If a module contains only header files, it does not have a ${itk-module}
target. Trying to generate export headers would result in a cmake
error.

Change-Id: I4ceb5d2d6f71de095c2b09ec7df3175876a39f84

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -210,43 +210,46 @@

   if( ITK_MODULE_${itk-module}_ENABLE_SHARED )
-    if(ITK_SOURCE_DIR)
-      set(_export_header_file "${ITKCommon_BINARY_DIR}/${itk-module}Export.h")
-    else()
-      set(_export_header_file "${${itk-module}_BINARY_DIR}/include/${itk-module}Export.h")
-    endif()
-
-    # Generate the export macro header for symbol visibility/Windows DLL declspec
-    generate_export_header(${itk-module}
-      EXPORT_FILE_NAME ${_export_header_file}
-      EXPORT_MACRO_NAME ${itk-module}_EXPORT
-      TEMPLATE_EXPORT_MACRO_NAME ${itk-module}_TEMPLATE_EXPORT
-      NO_EXPORT_MACRO_NAME ${itk-module}_HIDDEN
-      STATIC_DEFINE ITK_STATIC )
-    install(FILES
-      ${_export_header_file}
-      DESTINATION ${${itk-module}_INSTALL_INCLUDE_DIR}
-      COMPONENT Development
-      )
-
-    if (BUILD_SHARED_LIBS)
-      # export flags are only added when building shared libs, they cause
-      # mismatched visibility warnings when building statically.
-      if(CMAKE_VERSION VERSION_LESS 2.8.12)
-        # future DEPRECATION notice from cmake:
-        #      "The add_compiler_export_flags function is obsolete.
-        #       Use the CXX_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN
-        #       target properties instead."
-        add_compiler_export_flags(my_abi_flags)
-        set_property(TARGET ${itk-module} APPEND
-          PROPERTY COMPILE_FLAGS "${my_abi_flags}")
+    # Target ${itk-module} may not exist if the module only contains header files
+    if(TARGET ${itk-module})
+      if(ITK_SOURCE_DIR)
+        set(_export_header_file "${ITKCommon_BINARY_DIR}/${itk-module}Export.h")
       else()
-        if (USE_COMPILER_HIDDEN_VISIBILITY)
-          # Prefer to use target properties supported by newer cmake
-          set_target_properties(${itk-module} PROPERTIES CXX_VISIBILITY_PRESET hidden)
-          set_target_properties(${itk-module} PROPERTIES C_VISIBILITY_PRESET hidden)
-          set_target_properties(${itk-module} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
+        set(_export_header_file "${${itk-module}_BINARY_DIR}/include/${itk-module}Export.h")
+      endif()
+
+      # Generate the export macro header for symbol visibility/Windows DLL declspec
+      generate_export_header(${itk-module}
+        EXPORT_FILE_NAME ${_export_header_file}
+        EXPORT_MACRO_NAME ${itk-module}_EXPORT
+        TEMPLATE_EXPORT_MACRO_NAME ${itk-module}_TEMPLATE_EXPORT
+        NO_EXPORT_MACRO_NAME ${itk-module}_HIDDEN
+        STATIC_DEFINE ITK_STATIC )
+      install(FILES
+        ${_export_header_file}
+        DESTINATION ${${itk-module}_INSTALL_INCLUDE_DIR}
+        COMPONENT Development
+        )
+
+      if (BUILD_SHARED_LIBS)
+        # export flags are only added when building shared libs, they cause
+        # mismatched visibility warnings when building statically.
+        if(CMAKE_VERSION VERSION_LESS 2.8.12)
+          # future DEPRECATION notice from cmake:
+          #      "The add_compiler_export_flags function is obsolete.
+          #       Use the CXX_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN
+          #       target properties instead."
+          add_compiler_export_flags(my_abi_flags)
+          set_property(TARGET ${itk-module} APPEND
+            PROPERTY COMPILE_FLAGS "${my_abi_flags}")
+        else()
+          if (USE_COMPILER_HIDDEN_VISIBILITY)
+            # Prefer to use target properties supported by newer cmake
+            set_target_properties(${itk-module} PROPERTIES CXX_VISIBILITY_PRESET hidden)
+            set_target_properties(${itk-module} PROPERTIES C_VISIBILITY_PRESET hidden)
+            set_target_properties(${itk-module} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
           endif()
+        endif()
       endif()
     endif()
   endif()


fixes for CMakeModules/FindJPEG.cmake

fixes for CMakeModules/FindJPEG.cmake

libjpeg.h does not include stdio.h, so we need to help it on
some systems.

also fix a discrepancy between HAVE_LIBJPEG_H and HAVE_JPEGLIB_H.

--- CMakeModules/FindJPEG.cmake
+++ CMakeModules/FindJPEG.cmake
@@ -9,7 +9,7 @@
 # to locate include and library files
 #
 include(CheckLibraryExists)
-include(CheckIncludeFile)
+include(CheckIncludeFiles)

 set(JPEG_INCLUDE_DIR CACHE STRING "Location of JPEG include files")
 set(JPEG_LIBRARY_DIR CACHE STRING "Location of JPEG library files")
@@ -18,7 +18,7 @@
   set(CMAKE_REQUIRED_INCLUDES ${JPEG_INCLUDE_DIR})
 endif(JPEG_INCLUDE_DIR)

-check_include_file(jpeglib.h HAVE_JPEGLIB_H)
+check_include_files("stdio.h;jpeglib.h" HAVE_JPEGLIB_H)

 find_library(JPEG_LIBRARY NAMES jpeg libjpeg PATHS ${JPEG_LIBRARY_DIR})
 if(JPEG_LIBRARY)
@@ -37,4 +37,4 @@
 endif(WIN32 AND HAVE_JPEG_LIBRARY)

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(JPEG DEFAULT_MSG HAVE_JPEG_LIBRARY HAVE_LIBJPEG_H)
+find_package_handle_standard_args(JPEG DEFAULT_MSG HAVE_JPEG_LIBRARY HAVE_JPEGLIB_H)


SVN_SILENT made messages (.desktop file)

--- xine/xine.desktop.cmake
+++ xine/xine.desktop.cmake
@@ -33,6 +33,7 @@
 Name[is]=Xine
 Name[it]=Xine
 Name[ja]=Xine
+Name[kk]=Xine
 Name[ko]=Xine
 Name[ku]=Xine
 Name[lt]=Xine
@@ -87,6 +88,7 @@
 Comment[is]=Phonon Xine bakendi
 Comment[it]=Motore Xine di Phonon
 Comment[ja]=Phonon Xine バックエンド
+Comment[kk]=Phonon Xine тетігі
 Comment[ko]=Phonon Xine 백엔드
 Comment[ku]=Binesaza Phonon Xine
 Comment[lt]=Phonon Xine galinė sąsaja


ilastik.cmake: Fixed misformed shell command when ILASTIK_VERSION=master

--- ilastik.cmake
+++ ilastik.cmake
@@ -47,7 +47,7 @@

 if("${ILASTIK_VERSION}" STREQUAL "master")

-    set(ILASTIK_UPDATE_COMMAND git checkout master && git pull && git submodule update --init --recursive
+    set(ILASTIK_UPDATE_COMMAND git checkout master && git pull && git submodule update --init --recursive &&
                                cd lazyflow && git checkout master && git pull && git submodule update && cd .. &&
                                cd volumina && git checkout master && git pull && cd .. &&
                                cd ilastik && git checkout master && git pull && cd ..)


CMake: Enable LLVM_COMPILER_JOBS on all MS IDEs. We don't support older environments than VS9.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -112,9 +112,7 @@

 # On Win32 using MS tools, provide an option to set the number of parallel jobs
 # to use.
-if( MSVC_IDE AND ( MSVC90 OR MSVC10 ) )
-  # Only Visual Studio 2008 and 2010 officially supports /MP.
-  # Visual Studio 2005 do support it but it's experimental there.
+if( MSVC_IDE )
   set(LLVM_COMPILER_JOBS "0" CACHE STRING
     "Number of parallel compiler jobs. 0 means use all processors. Default is 0.")
   if( NOT LLVM_COMPILER_JOBS STREQUAL "1" )


Do not add -gsplit-dwarf to LLVM_DEFINITIONS.

This would cause the flag to appear in the output of "llvm-config --cppflags",
which should contain only preprocessor flags. The -gsplit-dwarf flag in
particular can cause problems with certain downstream users such as cgo.

Differential Revision: http://reviews.llvm.org/D5895

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -393,7 +393,7 @@

 # Turn on -gsplit-dwarf if requested
 if(LLVM_USE_SPLIT_DWARF)
-  add_llvm_definitions("-gsplit-dwarf")
+  add_definitions("-gsplit-dwarf")
 endif()

 add_llvm_definitions( -D__STDC_CONSTANT_MACROS )


Enable colored diagnostics in ninja builds when building with gcc 4.9+.

GCC has supported -fdiagnostics-color since 4.9.

https://reviews.llvm.org/D47083

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -720,11 +720,13 @@
 add_definitions( -D__STDC_FORMAT_MACROS )
 add_definitions( -D__STDC_LIMIT_MACROS )

-# clang doesn't print colored diagnostics when invoked from Ninja
+# clang and gcc don't default-print colored diagnostics when invoked from Ninja.
 if (UNIX AND
-    CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND
-    CMAKE_GENERATOR STREQUAL "Ninja")
-  append("-fcolor-diagnostics" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+    CMAKE_GENERATOR STREQUAL "Ninja" AND
+    (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
+     (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
+      NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9))))
+  append("-fdiagnostics-color" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
 endif()

 # lld doesn't print colored diagnostics when invoked from Ninja


[CMake] Remove Xcode effective platform name check

The CMake function `get_effective_platform_for_triple` appears to only
be used in one location: from within `escape_path_for_xcode`.
The `get_effective_platform_for_triple` function's only purpose appears to be
to check whether `SWIFT_HOST_TRIPLE` contains the string "macos", and if not,
it emits an error.

However, because on macOS hosts the build-script-impl is responsible
for setting the `SWIFT_HOST_TRIPLE` variable, when `cmake -G Xcode` is invoked
directly to configure the Swift project, this variable is unset, and so
`get_effective_platform_for_triple` emits an error.

I considered two solutions:

1. Have `swift/CMakeLists.txt` set a default `SWIFT_HOST_TRIPLE`, as it
   does for Linux. This would prevent `get_effective_platform_for_triple`
   from emitting an error.
2. Remove `get_effective_platform_for_triple` altogether.

I chose (2) here. `get_effective_platform_for_triple` doesn't appear to
do anything besides restrict the host platform arbitrarily. If users
are somehow able to configure the project using `cmake -G Xcode` on
Linux, shouldn't the Swift's CMake allow them to do so?

Test plan:
1. Configure and build using Xcode and an in-tree Swift checkout.
2. Configure and build using `utils/build-script --xcode`.

--- cmake/modules/SwiftXcodeSupport.cmake
+++ cmake/modules/SwiftXcodeSupport.cmake
@@ -1,14 +1,5 @@
 # This file contains cmake configuration specifically related to support for the
 # Xcode generator in CMake.
-
-function(get_effective_platform_for_triple triple output)
-  string(FIND "${triple}" "macos" IS_MACOS)
-  if (NOT IS_MACOS EQUAL -1)
-    set(${output} "" PARENT_SCOPE)
-    return()
-  endif()
-  message(FATAL_ERROR "Can not create an effective platform name for triple: ${triple}")
-endfunction()

 function(escape_path_for_xcode config path result_var_name)
   # If we are not using the Xcode generator, be defensive and early exit.
@@ -17,11 +8,10 @@
     return()
   endif()

-  get_effective_platform_for_triple("${SWIFT_HOST_TRIPLE}" SWIFT_EFFECTIVE_PLATFORM_NAME)
   # Hack to deal with the fact that paths contain the build-time
   # variables. Note that this fix is Xcode-specific.
   string(REPLACE "$(CONFIGURATION)" "${config}" result "${path}")
-  string(REPLACE "$(EFFECTIVE_PLATFORM_NAME)" "${SWIFT_EFFECTIVE_PLATFORM_NAME}" result "${result}")
+  string(REPLACE "$(EFFECTIVE_PLATFORM_NAME)" "" result "${result}")
   set("${result_var_name}" "${result}" PARENT_SCOPE)
 endfunction()


Include used modules

Include used modules

--- cmake/modules/hunter_setup_msvc.cmake
+++ cmake/modules/hunter_setup_msvc.cmake
@@ -4,6 +4,7 @@
 cmake_minimum_required(VERSION 3.0)

 include(hunter_internal_error)
+include(hunter_status_print)

 # Detect architecture, year and version by MSVC name generator.
 # Sets HUNTER_MSVC_ARCH, HUNTER_MSVC_VERSION, HUNTER_MSVC_YEAR


From J.P. Delport, fix of GDAL location search

git-svn-id: 23b6355f2bb369032457de4eb5f713ee134f73a8@7226 16af8721-9629-0410-8352-f15c8da7e697

--- CMakeModules/FindGDAL.cmake
+++ CMakeModules/FindGDAL.cmake
@@ -9,8 +9,8 @@
 #
 # Created by Robert Osfield.

-FIND_PATH(GDAL_INCLUDE_DIR gdal.h gdal/gdal.h
-        ${GDAL_DIR}/include
+FIND_PATH(GDAL_INCLUDE_DIR gdal.h
+    ${GDAL_DIR}/include
     $ENV{GDAL_DIR}/include
     $ENV{GDAL_DIR}
     $ENV{OSGDIR}/include
@@ -20,6 +20,7 @@
     /Library/Frameworks
     /usr/local/include
     /usr/include
+    /usr/include/gdal
     /sw/include # Fink
     /opt/local/include # DarwinPorts
     /opt/csw/include # Blastwave
@@ -29,7 +30,7 @@
 )

 FIND_LIBRARY(GDAL_LIBRARY
-    NAMES gdal gdal_i gdal1.4.0 gdal1.4.1 gdal1.3.2
+    NAMES gdal gdal_i gdal1.4.0 gdal1.3.2
     PATHS
     ${GDAL_DIR}/lib
     $ENV{GDAL_DIR}/lib


Handle package files that failed to download

--- cmake-d/UseDub.cmake
+++ cmake-d/UseDub.cmake
@@ -50,7 +50,13 @@

 function(DubProject_Add name)
 	if(NOT EXISTS ${DUB_DIRECTORY}/${name}.json)
-		file(DOWNLOAD ${DUB_REGISTRY}/${name}.json ${DUB_DIRECTORY}/${name}.json)
+		file(DOWNLOAD ${DUB_REGISTRY}/${name}.json ${DUB_DIRECTORY}/${name}.json STATUS status)
+		list(GET status 0 statusCode)
+
+		if(NOT statusCode EQUAL 0)
+			file(REMOVE ${DUB_DIRECTORY}/${name}.json)
+			message(FATAL_ERROR "Failed to download ${DUB_REGISTRY}/${name}.json")
+		endif(NOT statusCode EQUAL 0)
 	endif(NOT EXISTS ${DUB_DIRECTORY}/${name}.json)

 	if(${ARGC} GREATER 1)


port of aarch64 cuda changes from 2.4

port of aarch64 cuda changes from 2.4

--- cmake/FindCUDA.cmake
+++ cmake/FindCUDA.cmake
@@ -619,6 +619,8 @@
   set(_cuda_target_cpu_arch_initial "${CUDA_TARGET_CPU_ARCH}")
 elseif(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|ARM)")
   set(_cuda_target_cpu_arch_initial "ARM")
+elseif(CUDA_VERSION VERSION_GREATER "6.5" AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|AARCH64)")
+  set(_cuda_target_cpu_arch_initial "AARCH64")
 else()
   set(_cuda_target_cpu_arch_initial "")
 endif()
@@ -642,6 +644,12 @@
     set(_cuda_target_triplet_initial "armv7-linux-androideabi")
   elseif(EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
     set(_cuda_target_triplet_initial "armv7-linux-gnueabihf")
+  endif()
+elseif(CUDA_VERSION VERSION_GREATER "6.5" AND CMAKE_CROSSCOMPILING AND "${CUDA_TARGET_CPU_ARCH}" STREQUAL "AARCH64")
+  if("${CUDA_TARGET_OS_VARIANT}" STREQUAL "Android" AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/aarch64-linux-androideabi")
+    set(_cuda_target_triplet_initial "aarch64-linux-androideabi")
+  elseif(EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/aarch64-linux-gnueabihf")
+    set(_cuda_target_triplet_initial "aarch64-linux-gnueabihf")
   endif()
 endif()
 set(CUDA_TARGET_TRIPLET "${_cuda_target_triplet_initial}" CACHE STRING "Specify the target triplet for which the input files must be compiled.")
@@ -1094,8 +1102,10 @@
     set(nvcc_flags ${nvcc_flags} -m32)
   endif()

-  if(CUDA_TARGET_CPU_ARCH)
-    set(nvcc_flags ${nvcc_flags} "--target-cpu-architecture=${CUDA_TARGET_CPU_ARCH}")
+  if(CUDA_TARGET_CPU_ARCH AND CUDA_VERSION VERSION_LESS "7.0")
+    # CPU architecture is either ARM or X86. Patch AARCH64 to be ARM
+    string(REPLACE "AARCH64" "ARM" CUDA_TARGET_CPU_ARCH_patched ${CUDA_TARGET_CPU_ARCH})
+    set(nvcc_flags ${nvcc_flags} "--target-cpu-architecture=${CUDA_TARGET_CPU_ARCH_patched}")
   endif()

   if(CUDA_TARGET_OS_VARIANT AND CUDA_VERSION VERSION_LESS "7.0")


CMake: FindROOT returns etcdir

CMake: FindROOT returns etcdir

--- cmake/FindROOT.cmake
+++ cmake/FindROOT.cmake
@@ -25,6 +25,7 @@
 # - ROOT_LIBMAP - path to rlibmap executable
 # - ROOT_FEATURES - list of build features for ROOT
 # - ROOT_LIBDIR - full path to ROOT library folder
+# - ROOT_ETCDIR - full path to the ROOT's configuration directory
 # - ROOT_LIBRARIES - libraries needed for the package to be used
 # - ROOT_GLIBRARIES - regular + GUI ROOT libraries + path to be used during linking
 # - ROOT_INCLUDE_DIR - full path to ROOT include folder
@@ -93,6 +94,13 @@
         message(FATAL_ERROR "Error retrieving ROOT libdir: ${error}")
     endif(error)
     string(STRIP "${ROOT_LIBDIR}" ROOT_LIBDIR)
+
+    # Checking for ROOT etcdir
+    execute_process(COMMAND ${ROOT_CONFIG} --etcdir OUTPUT_VARIABLE ROOT_ETCDIR ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE)
+    if(error)
+        message(FATAL_ERROR "Error retrieving ROOT etcdir: ${error}")
+    endif(error)
+    string(STRIP "${ROOT_ETCDIR}" ROOT_ETCDIR)

     # Checking for ROOT libs
     execute_process(COMMAND ${ROOT_CONFIG} --noldflags --libs OUTPUT_VARIABLE ROOT_LIBS ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )


cmake: use a different variable name

cmake: use a different variable name

the _flags variable was already set by the calling macro to communicate
extra flags set by the caller of the macro

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

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -362,12 +362,12 @@
    if(${_disabled_index} EQUAL -1 AND (NOT _only_targets OR ${_only_index} GREATER -1))
       set(_extra_flags)
       set(_ok FALSE)
-      foreach(_flags ${ARGN})
-         if(_flags STREQUAL "NO_FLAG")
+      foreach(_flags_it ${ARGN})
+         if(_flags_it STREQUAL "NO_FLAG")
             set(_ok TRUE)
             break()
          endif()
-         string(REPLACE " " ";" _flag_list "${_flags}")
+         string(REPLACE " " ";" _flag_list "${_flags_it}")
          foreach(_f ${_flag_list})
             AddCompilerFlag(${_f} CXX_RESULT _ok)
             if(NOT _ok)
@@ -375,7 +375,7 @@
             endif()
          endforeach()
          if(_ok)
-            set(_extra_flags ${_flags})
+            set(_extra_flags ${_flags_it})
             break()
          endif()
       endforeach()


fpta: save initial CMake's flags.

fpta: save initial CMake's flags.

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -200,27 +200,24 @@
 #

 macro(setup_compile_flags)
+  # LY: save initial C/CXX flags
+  if(NOT INITIAL_CMAKE_FLAGS_SAVED)
+    set(INITIAL_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
+    set(INITIAL_CMAKE_C_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
+    set(INITIAL_CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
+    set(INITIAL_CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
+    set(INITIAL_CMAKE_STATIC_LINKER_FLAGS ${CMAKE_STATIC_LINKER_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
+    set(INITIAL_CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
+    set(INITIAL_CMAKE_FLAGS_SAVED TRUE CACHE INTERNAL "State of initial CMake's flags" FORCE)
+  endif()
+
   # LY: reset C/CXX flags
-  set(CXX_FLAGS "")
-  set(C_FLAGS "")
-
-  # For CI enable optimization for Debug builds to avoid tests timeout.
-  if(NOT "${CI}" STREQUAL "")
-    if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
-      #string(CONCAT CMAKE_C_FLAGS_DEBUG "")
-      #string(CONCAT CMAKE_CXX_FLAGS_DEBUG "")
-    elseif(CC_HAS_DEBUG_FRENDLY_OPTIMIZATION)
-      #string(CONCAT CMAKE_C_FLAGS_DEBUG " -Og")
-      #string(CONCAT CMAKE_CXX_FLAGS_DEBUG " -Og")
-      set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Og")
-      set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")
-    else()
-      #string(CONCAT CMAKE_C_FLAGS_DEBUG " -O")
-      #string(CONCAT CMAKE_CXX_FLAGS_DEBUG " -O")
-      set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O")
-      set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O")
-    endif()
-  endif()
+  set(CXX_FLAGS ${INITIAL_CMAKE_CXX_FLAGS})
+  set(C_FLAGS ${INITIAL_CMAKE_C_FLAGS})
+  set(EXE_LINKER_FLAGS ${INITIAL_CMAKE_EXE_LINKER_FLAGS})
+  set(SHARED_LINKER_FLAGS ${INITIAL_CMAKE_SHARED_LINKER_FLAGS})
+  set(STATIC_LINKER_FLAGS ${INITIAL_CMAKE_STATIC_LINKER_FLAGS})
+  set(MODULE_LINKER_FLAGS ${INITIAL_CMAKE_MODULE_LINKER_FLAGS})

   if(CC_HAS_FNO_COMMON)
     add_compile_flags("C;CXX" "-fno-common")
@@ -300,10 +297,10 @@
     endif()

     add_compile_flags("C;CXX" "-fprofile-arcs" "-ftest-coverage")
-    set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs")
-    set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ftest-coverage")
-    set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs")
-    set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ftest-coverage")
+    set(EXE_LINKER_FLAGS "${EXE_LINKER_FLAGS} -fprofile-arcs")
+    set(EXE_LINKER_FLAGS "${EXE_LINKER_FLAGS} -ftest-coverage")
+    set(SHARED_LINKER_FLAGS "${SHARED_LINKER_FLAGS} -fprofile-arcs")
+    set(SHARED_LINKER_FLAGS "${SHARED_LINKER_FLAGS} -ftest-coverage")

     # add_library(gcov SHARED IMPORTED)
   endif()
@@ -315,8 +312,16 @@
   # LY: push C/CXX flags into the cache
   set(CMAKE_CXX_FLAGS ${CXX_FLAGS} CACHE STRING "Flags used by the C++ compiler during all build types" FORCE)
   set(CMAKE_C_FLAGS ${C_FLAGS} CACHE STRING "Flags used by the C compiler during all build types" FORCE)
+  set(CMAKE_EXE_LINKER_FLAGS ${EXE_LINKER_FLAGS} CACHE STRING "Flags used by the linker" FORCE)
+  set(CMAKE_SHARED_LINKER_FLAGS ${SHARED_LINKER_FLAGS} CACHE STRING "Flags used by the linker during the creation of dll's" FORCE)
+  set(CMAKE_STATIC_LINKER_FLAGS ${STATIC_LINKER_FLAGS} CACHE STRING "Flags used by the linker during the creation of static libraries" FORCE)
+  set(CMAKE_MODULE_LINKER_FLAGS ${MODULE_LINKER_FLAGS} CACHE STRING "Flags used by the linker during the creation of modules" FORCE)
   unset(CXX_FLAGS)
   unset(C_FLAGS)
+  unset(EXE_LINKER_FLAGS)
+  unset(SHARED_LINKER_FLAGS)
+  unset(STATIC_LINKER_FLAGS)
+  unset(MODULE_LINKER_FLAGS)
 endmacro(setup_compile_flags)

 if(CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCC)


Fixed capitalization error in the debug suggestions for mac. (#133)

--- Targets/Mac-python2.cmake
+++ Targets/Mac-python2.cmake
@@ -16,4 +16,4 @@
 # Debug suggestions
 set(CXX_TOOLCHAINFLAGS_DEBUG "-O0")
 set(F_TOOLCHAINFLAGS_DEBUG
-  "-fcheck=ALL -O0 -fexternal-blas -cpp -Wall -DPURE=")
+  "-fcheck=all -O0 -fexternal-blas -cpp -Wall -DPURE=")


Revert "MSVC: don't force /W4 onto the compiler."

This reverts commit eeba377707a9c3b6903ad298e313d86e86d2909f.

This means that if we try to build libCellML using Qt Creator on Windows then we get a lot of warnings that read:

cl : Command line warning D9025 : overriding '/W3' with '/W4'

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -20,7 +20,7 @@
   if(${_INDEX} GREATER -1)
     set(_COMPILER_WAE -Wall -W -Werror)
   elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
-    set(_COMPILER_WAE /WX)
+    set(_COMPILER_WAE /W4 /WX)
   endif()

   if(_COMPILER_WAE)


Use generic codes for shamax and shcopy

Use generic codes for shamax and shcopy

--- cmake/kernel.cmake
+++ cmake/kernel.cmake
@@ -114,7 +114,7 @@
   set(QSUMKERNEL sum.S)
   set(XSUMKERNEL zsum.S)
   set(SHAMINKERNEL ../arm/amin.c)
-  set(SHAMAXKERNEL amax.S)
+  set(SHAMAXKERNEL ../arm/amax.c)
   set(SHMAXKERNEL ../arm/max.c)
   set(SHMINKERNEL ../arm/min.c)
   set(ISHAMAXKERNEL iamax.S)
@@ -124,7 +124,7 @@
   set(SHASUMKERNEL asum.S)
   set(SHAXPYKERNEL ../arm/axpy.c)
   set(SHAXPBYKERNEL ../arm/axpby.c)
-  set(SHCOPYKERNEL copy.S)
+  set(SHCOPYKERNEL ../arm/copy.c)
   set(SHDOTKERNEL dot.S)
   set(SHROTKERNEL rot.S)
   set(SHSCALKERNEL scal.S)


more playing with the warnings

more playing with the warnings

--- scripts/common.cmake
+++ scripts/common.cmake
@@ -63,11 +63,9 @@
 endif()

 if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
-    #add_compiler_flags(-fstack-protector-all)
-    #add_compiler_flags(-funsafe-loop-optimizations)
-
-    add_compiler_flags(-ggdb) # temp - to see valgrind issues
-
+    add_compiler_flags(-fstack-protector-all)
+    add_compiler_flags(-funsafe-loop-optimizations)
+    add_compiler_flags(-fdiagnostics-show-option)
     add_compiler_flags(-ansi)
     add_compiler_flags(-Wall)
     add_compiler_flags(-Wextra)


Try to get output from execute_command.

Try to get output from execute_command.

--- tests/runtime_test.cmake
+++ tests/runtime_test.cmake
@@ -33,8 +33,7 @@

 execute_process(COMMAND "${CMAKE_COMMAND}" --build ../.. --target "${test_name}"
                 RESULT_VARIABLE exit_code
-                ERROR_VARIABLE stderr
-                OUTPUT_QUIET)
+                ERROR_VARIABLE stderr)

 if(NOT 0 EQUAL ${exit_code})
   message(FATAL_ERROR "Could not compile ${test_component}/${test_name}${CMAKE_EXECUTABLE_SUFFIX}:\n${stderr}")