refs #5291 add -g -fuse-linker-plugin for link time optimization

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

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -85,6 +85,8 @@
   -Wmissing-format-attribute
   -Wno-error=missing-format-attribute
   -Wpacked
+  -fno-rtti
+  -fno-exceptions
   )
 ## set_cflags_if_supported_named("-Weffc++" -Weffcpp)
 set_ldflags_if_supported(
@@ -108,14 +110,18 @@
   check_c_compiler_flag(-flto HAVE_C_FLAG_FLTO)
   check_c_compiler_flag(-ipo HAVE_C_FLAG_IPO)
   if (HAVE_C_FLAG_FLTO)
-    set(CMAKE_C_FLAGS_RELEASE "-O3 -flto")# -fuse-linker-plugin")
+    set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto -fuse-linker-plugin")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -g -fuse-linker-plugin")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -g -fuse-linker-plugin")
   elseif (HAVE_C_FLAG_IPO)
     set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ip -ipo1")
   endif ()
   check_cxx_compiler_flag(-flto HAVE_CXX_FLAG_FLTO)
   check_cxx_compiler_flag(-ipo HAVE_CXX_FLAG_IPO)
   if (HAVE_CXX_FLAG_FLTO)
-    set(CMAKE_CXX_FLAGS_RELEASE "-O3 -flto")# -fuse-linker-plugin")
+    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto -fuse-linker-plugin")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -g -fuse-linker-plugin")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -g -fuse-linker-plugin")
   elseif (HAVE_CXX_FLAG_IPO)
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ip -ipo1")
   endif ()


removed stupid file

removed stupid file

--- config/FindOpenMP.cmake
+++ config/FindOpenMP.cmake
@@ -1,239 +0,0 @@
-#.rst:
-# FindOpenMP
-# ----------
-#
-# Finds OpenMP support
-#
-# This module can be used to detect OpenMP support in a compiler.  If
-# the compiler supports OpenMP, the flags required to compile with
-# OpenMP support are returned in variables for the different languages.
-# The variables may be empty if the compiler does not need a special
-# flag to support OpenMP.
-#
-# The following variables are set:
-#
-# ::
-#
-#    OpenMP_C_FLAGS - flags to add to the C compiler for OpenMP support
-#    OpenMP_CXX_FLAGS - flags to add to the CXX compiler for OpenMP support
-#    OpenMP_Fortran_FLAGS - flags to add to the Fortran compiler for OpenMP support
-#    OPENMP_FOUND - true if openmp is detected
-#
-#
-#
-# Supported compilers can be found at
-# http://openmp.org/wp/openmp-compilers/
-
-#=============================================================================
-# Copyright 2009 Kitware, Inc.
-# Copyright 2008-2009 André Rigland Brodtkorb <Andre.Brodtkorb@ifi.uio.no>
-# Copyright 2012 Rolf Eike Beer <eike@sf-mail.de>
-# Copyright 2014 Nicolas Bock <nicolasbock@gmail.com>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-set(_OPENMP_REQUIRED_VARS)
-set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET})
-set(CMAKE_REQUIRED_QUIET ${OpenMP_FIND_QUIETLY})
-
-function(_OPENMP_FLAG_CANDIDATES LANG)
-  set(OpenMP_FLAG_CANDIDATES
-    #Empty, if compiler automatically accepts openmp
-    " "
-    #GNU
-    "-fopenmp"
-    #Microsoft Visual Studio
-    "/openmp"
-    #Intel windows
-    "-Qopenmp"
-    #PathScale, Intel
-    "-openmp"
-    #Sun
-    "-xopenmp"
-    #HP
-    "+Oopenmp"
-    #IBM XL C/c++
-    "-qsmp"
-    #Portland Group, MIPSpro
-    "-mp"
-  )
-
-  set(OMP_FLAG_GNU "-fopenmp")
-  set(OMP_FLAG_HP "+Oopenmp")
-  if(WIN32)
-    set(OMP_FLAG_Intel "-Qopenmp")
-  elseif(CMAKE_${LANG}_COMPILER_ID STREQUAL "Intel" AND
-         "${CMAKE_${LANG}_COMPILER_VERSION}" VERSION_LESS "15.0.0.20140528")
-    set(OMP_FLAG_Intel "-openmp")
-  else()
-    set(OMP_FLAG_Intel "-qopenmp")
-  endif()
-  set(OMP_FLAG_MIPSpro "-mp")
-  set(OMP_FLAG_MSVC "/openmp")
-  set(OMP_FLAG_PathScale "-openmp")
-  set(OMP_FLAG_PGI "-mp")
-  set(OMP_FLAG_SunPro "-xopenmp")
-  set(OMP_FLAG_XL "-qsmp")
-  set(OMP_FLAG_Cray " ")
-
-  # Move the flag that matches the compiler to the head of the list,
-  # this is faster and doesn't clutter the output that much. If that
-  # flag doesn't work we will still try all.
-  if(OMP_FLAG_${CMAKE_${LANG}_COMPILER_ID})
-    list(REMOVE_ITEM OpenMP_FLAG_CANDIDATES "${OMP_FLAG_${CMAKE_${LANG}_COMPILER_ID}}")
-    list(INSERT OpenMP_FLAG_CANDIDATES 0 "${OMP_FLAG_${CMAKE_${LANG}_COMPILER_ID}}")
-  endif()
-
-  set(OpenMP_${LANG}_FLAG_CANDIDATES "${OpenMP_FLAG_CANDIDATES}" PARENT_SCOPE)
-endfunction()
-
-# sample openmp source code to test
-set(OpenMP_C_TEST_SOURCE
-"
-#include <omp.h>
-int main() {
-#ifdef _OPENMP
-  return 0;
-#else
-  breaks_on_purpose
-#endif
-}
-")
-
-# same in Fortran
-set(OpenMP_Fortran_TEST_SOURCE
-  "
-program test
-use omp_lib
-integer :: n
-n = omp_get_num_threads()
-end program test
-  "
-  )
-
-# check c compiler
-if(CMAKE_C_COMPILER_LOADED)
-  # if these are set then do not try to find them again,
-  # by avoiding any try_compiles for the flags
-  if(OpenMP_C_FLAGS)
-    unset(OpenMP_C_FLAG_CANDIDATES)
-  else()
-    _OPENMP_FLAG_CANDIDATES("C")
-    include(${CMAKE_CURRENT_LIST_DIR}/CheckCSourceCompiles.cmake)
-  endif()
-
-  foreach(FLAG IN LISTS OpenMP_C_FLAG_CANDIDATES)
-    set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
-    set(CMAKE_REQUIRED_FLAGS "${FLAG}")
-    unset(OpenMP_FLAG_DETECTED CACHE)
-    if(NOT CMAKE_REQUIRED_QUIET)
-      message(STATUS "Try OpenMP C flag = [${FLAG}]")
-    endif()
-    check_c_source_compiles("${OpenMP_C_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
-    set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
-    if(OpenMP_FLAG_DETECTED)
-      set(OpenMP_C_FLAGS_INTERNAL "${FLAG}")
-      break()
-    endif()
-  endforeach()
-
-  set(OpenMP_C_FLAGS "${OpenMP_C_FLAGS_INTERNAL}"
-    CACHE STRING "C compiler flags for OpenMP parallization")
-
-  list(APPEND _OPENMP_REQUIRED_VARS OpenMP_C_FLAGS)
-  unset(OpenMP_C_FLAG_CANDIDATES)
-endif()
-
-# check cxx compiler
-if(CMAKE_CXX_COMPILER_LOADED)
-  # if these are set then do not try to find them again,
-  # by avoiding any try_compiles for the flags
-  if(OpenMP_CXX_FLAGS)
-    unset(OpenMP_CXX_FLAG_CANDIDATES)
-  else()
-    _OPENMP_FLAG_CANDIDATES("CXX")
-    include(${CMAKE_CURRENT_LIST_DIR}/CheckCXXSourceCompiles.cmake)
-
-    # use the same source for CXX as C for now
-    set(OpenMP_CXX_TEST_SOURCE ${OpenMP_C_TEST_SOURCE})
-  endif()
-
-  foreach(FLAG IN LISTS OpenMP_CXX_FLAG_CANDIDATES)
-    set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
-    set(CMAKE_REQUIRED_FLAGS "${FLAG}")
-    unset(OpenMP_FLAG_DETECTED CACHE)
-    if(NOT CMAKE_REQUIRED_QUIET)
-      message(STATUS "Try OpenMP CXX flag = [${FLAG}]")
-    endif()
-    check_cxx_source_compiles("${OpenMP_CXX_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
-    set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
-    if(OpenMP_FLAG_DETECTED)
-      set(OpenMP_CXX_FLAGS_INTERNAL "${FLAG}")
-      break()
-    endif()
-  endforeach()
-
-  set(OpenMP_CXX_FLAGS "${OpenMP_CXX_FLAGS_INTERNAL}"
-    CACHE STRING "C++ compiler flags for OpenMP parallization")
-
-  list(APPEND _OPENMP_REQUIRED_VARS OpenMP_CXX_FLAGS)
-  unset(OpenMP_CXX_FLAG_CANDIDATES)
-  unset(OpenMP_CXX_TEST_SOURCE)
-endif()
-
-# check Fortran compiler
-if(CMAKE_Fortran_COMPILER_LOADED)
-  # if these are set then do not try to find them again,
-  # by avoiding any try_compiles for the flags
-  if(OpenMP_Fortran_FLAGS)
-    unset(OpenMP_Fortran_FLAG_CANDIDATES)
-  else()
-    _OPENMP_FLAG_CANDIDATES("Fortran")
-    include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranSourceCompiles.cmake)
-  endif()
-
-  foreach(FLAG IN LISTS OpenMP_Fortran_FLAG_CANDIDATES)
-    set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
-    set(CMAKE_REQUIRED_FLAGS "${FLAG}")
-    unset(OpenMP_FLAG_DETECTED CACHE)
-    if(NOT CMAKE_REQUIRED_QUIET)
-      message(STATUS "Try OpenMP Fortran flag = [${FLAG}]")
-    endif()
-    check_fortran_source_compiles("${OpenMP_Fortran_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
-    set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
-    if(OpenMP_FLAG_DETECTED)
-      set(OpenMP_Fortran_FLAGS_INTERNAL "${FLAG}")
-      break()
-    endif()
-  endforeach()
-
-  set(OpenMP_Fortran_FLAGS "${OpenMP_Fortran_FLAGS_INTERNAL}"
-    CACHE STRING "Fortran compiler flags for OpenMP parallization")
-
-  list(APPEND _OPENMP_REQUIRED_VARS OpenMP_Fortran_FLAGS)
-  unset(OpenMP_Fortran_FLAG_CANDIDATES)
-  unset(OpenMP_Fortran_TEST_SOURCE)
-endif()
-
-set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE})
-
-if(_OPENMP_REQUIRED_VARS)
-  include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-
-  find_package_handle_standard_args(OpenMP
-                                    REQUIRED_VARS ${_OPENMP_REQUIRED_VARS})
-
-  mark_as_advanced(${_OPENMP_REQUIRED_VARS})
-
-  unset(_OPENMP_REQUIRED_VARS)
-else()
-  message(SEND_ERROR "FindOpenMP requires C or CXX language to be enabled")
-endif()


Fixed undefined labels in doxygen latex output

--- contrib/createDoc.cmake
+++ contrib/createDoc.cmake
@@ -35,6 +35,9 @@
 			OUTPUT ${PROJECT_BINARY_DIR}/doc/tiglRef.pdf
 			DEPENDS ${PROJECT_BINARY_DIR}/doc/latex/refman.tex
 			WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc/latex/
+			COMMAND ${LATEX}
+			ARGS ${PROJECT_BINARY_DIR}/doc/latex/refman.tex
+		    # run latex twice to get references right (normal use case of latex, don't ask why)
 			COMMAND ${LATEX}
 			ARGS ${PROJECT_BINARY_DIR}/doc/latex/refman.tex
 			COMMAND ${CMAKE_COMMAND}


Remove generator-expressions from COMPILE_OPTIONS and COMPILE_DEFINITIONS

Both of these CMake properties permit generator-expressions,
but execute_process runs at configuration time and so won't expand them,
and the compiler will not accept $<...> syntax verbatim.

I see no way to get them expanded properly while still running this during
configuration, but it seems reasonable to assume that conditional options
should not change something as fundamental as settings.libcxx

--- conan.cmake
+++ conan.cmake
@@ -251,9 +251,12 @@
 function(conan_cmake_detect_unix_libcxx result)
     # Take into account any -stdlib in compile options
     get_directory_property(compile_options DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_OPTIONS)
+    string(GENEX_STRIP "${compile_options}" compile_options)

     # Take into account any _GLIBCXX_USE_CXX11_ABI in compile definitions
     get_directory_property(defines DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS)
+    string(GENEX_STRIP "${defines}" defines)
+
     foreach(define ${defines})
         if(define MATCHES "_GLIBCXX_USE_CXX11_ABI")
             if(define MATCHES "^-D")


Add some linker optimizations.

Add some linker optimizations.

--- clang.cmake
+++ clang.cmake
@@ -2,6 +2,7 @@
 SET (CMAKE_CXX_COMPILER      "clang++")

 SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wwrite-strings -pedantic -O2 -fomit-frame-pointer" CACHE STRING "" FORCE)
+SET (CMAKE_EXE_LINKER_FLAGS "-Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--gc-sections" CACHE STRING "" FORCE)
 # SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wwrite-strings -pedantic -O2 -flto -use-gold-plugin -fomit-frame-pointer" CACHE STRING "" FORCE)

 MESSAGE (STATUS "Found CLANG toolchain")


fix version (#404)

fix version (#404)

--- Build.cmake
+++ Build.cmake
@@ -71,13 +71,16 @@

 SET(${G3LOG_LIBRARY}_VERSION_STRING ${VERSION})
 MESSAGE( STATUS "Creating ${G3LOG_LIBRARY} VERSION: ${VERSION}" )
+MESSAGE( STATUS "Creating ${G3LOG_LIBRARY} SOVERSION: ${MAJOR_VERSION}" )

 SET_TARGET_PROPERTIES(${G3LOG_LIBRARY} PROPERTIES
    LINKER_LANGUAGE CXX
    OUTPUT_NAME g3log
    CLEAN_DIRECT_OUTPUT 1
    SOVERSION ${MAJOR_VERSION}
+   VERSION ${VERSION}
    )
+

 IF(APPLE)
 SET_TARGET_PROPERTIES(${G3LOG_LIBRARY} PROPERTIES MACOSX_RPATH TRUE)


c++11 was oficially available from g++ version >= 4.8.1

--- CXX11.cmake
+++ CXX11.cmake
@@ -23,7 +23,7 @@
     message(STATUS "Checking for C++11 compiler")
     set(${_VAR})
     if((MSVC AND (MSVC10 OR MSVC11 OR MSVC12)) OR
-       (CMAKE_COMPILER_IS_GNUCXX AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.6) OR
+       (CMAKE_COMPILER_IS_GNUCXX AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.8.1) OR
        (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 3.1))
         set(${_VAR} 1)
         message(STATUS "Checking for C++11 compiler - available")


MKL variables were not being set in cache

--- modules/FindMKL.cmake
+++ modules/FindMKL.cmake
@@ -468,3 +468,22 @@
   list(REMOVE_DUPLICATES MKL_DEFINITIONS)
   list(REMOVE_DUPLICATES MKL_LIBRARIES)
 endif()
+
+# Add variables to cache
+if(MKL_FOUND)
+  set(MKL_DEFINITIONS  ${MKL_DEFINITIONS} CACHE STRING "MKL compiler definitions")
+  set(MKL_INCLUDE_DIRS  ${MKL_INCLUDE_DIRS} CACHE STRING "MKL include directories")
+  set(MKL_LIBRARIES   ${MKL_LIBRARIES} CACHE STRING "MKL libraries to be linked")
+  if(MKL_PARDISO_FOUND)
+    set(MKL_PARDISO_LIBRARY ${MKL_PARDISO_LIBRARY} CACHE STRING "PARDISO libraries")
+  endif()
+  if(MKL_CDFT_FOUND)
+    set(MKL_CDFT_LIBRARY ${MKL_CDFT_LIBRARY} CACHE STRING "CDFT libraries")
+  endif()
+  if(MKL_ScaLAPACK_LIBRARY_FOUND)
+    set(MKL_ScaLAPACK_LIBRARY ${MKL_ScaLAPACK_LIBRARY} CACHE STRING "ScaLAPACK libraries")
+  endif()
+  if(MKL_BLACKS_LIBRARY_FOUND)
+    set(MKL_BLACKS_LIBRARY ${MKL_BLACKS_LIBRARY} CACHE STRING "BLACKS libraries")
+  endif()
+endif()


New ISPC v1.9.2 also works

New ISPC v1.9.2 also works

--- components/ospcommon/cmake/ispc.cmake
+++ components/ospcommon/cmake/ispc.cmake
@@ -15,7 +15,7 @@
 ## ======================================================================== ##

 # ISPC versions to look for, in decending order (newest first)
-SET(ISPC_VERSION_WORKING "1.9.1")
+SET(ISPC_VERSION_WORKING "1.9.2" "1.9.1")
 LIST(GET ISPC_VERSION_WORKING -1 ISPC_VERSION_REQUIRED)

 IF (NOT ISPC_EXECUTABLE)


fix: remove duplicated logic

fix: remove duplicated logic

--- config/cmake/modules/FindNetCDF.cmake
+++ config/cmake/modules/FindNetCDF.cmake
@@ -24,7 +24,6 @@
 # to be called for a second time
 set(HDF5_FOUND OFF)
 enable_language(C) # FindHDF5.cmake uses the C compiler
-set(NetCDF_REQUIRED_PACKAGES HDF5/C/HL)
 mfem_find_package(NetCDF NETCDF NETCDF_DIR "include" netcdf.h "lib" netcdf
   "Paths to headers required by NetCDF." "Libraries required by NetCDF.")
 # The HL extension libraries are in a separate variable and must precede


CPack tweaks

CPack tweaks

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[x] Bugfix
[ ] New Feature
[x] Cleanup
[ ] Optimization
[ ] Documentation

--- UploadPPA.cmake
+++ UploadPPA.cmake
@@ -102,7 +102,7 @@
   "BUILDDIR = build_dir\n"
   "\n"
   "build:\n"
-  "	mkdir -f $(BUILDDIR)\n"
+  "	mkdir -p $(BUILDDIR)\n"
   "	cd $(BUILDDIR); cmake ..\n"
   "	make -C $(BUILDDIR) preinstall\n"
   "	touch build\n"
@@ -113,7 +113,7 @@
   "\n"
   "binary-arch: build\n"
   "	cd $(BUILDDIR); cmake -DCOMPONENT=Unspecified -DCMAKE_INSTALL_PREFIX=../debian/tmp/usr -P cmake_install.cmake\n"
-  "	mkdir -f debian/tmp/DEBIAN\n"
+  "	mkdir -p debian/tmp/DEBIAN\n"
   "	dpkg-gencontrol -p${CPACK_DEBIAN_PACKAGE_NAME}\n"
   "	dpkg --build debian/tmp ..\n"
   )
@@ -123,7 +123,7 @@
   set(PACKAGE ${CPACK_DEBIAN_PACKAGE_NAME}-${COMPONENT})
   file(APPEND ${DEBIAN_RULES}
     "	cd $(BUILDDIR); cmake -DCOMPONENT=${COMPONENT} -DCMAKE_INSTALL_PREFIX=../${PATH}/usr -P cmake_install.cmake\n"
-    "	mkdir -f ${PATH}/DEBIAN\n"
+    "	mkdir -p ${PATH}/DEBIAN\n"
     "	dpkg-gencontrol -p${PACKAGE} -P${PATH}\n"
     "	dpkg --build ${PATH} ..\n"
     )


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -74,6 +74,7 @@
 		OUTPUT_VARIABLE RESULT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
 	set(CMAKI_PLATFORM "${RESULT_VERSION}")
 ENDIF()
+message("---- detecting platform: ${CMAKI_PLATFORM}")

 function(cmaki_find_package PACKAGE)


no use cache local disabled

no use cache local disabled

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -116,124 +116,124 @@
 	set(depends_bin_package "${depends_dir}/${PACKAGE}-${VERSION}")
 	set(depends_package "${CMAKE_PREFIX_PATH}/${PACKAGE}-${VERSION}")
 	set(package_marker "${depends_bin_package}/${CMAKI_IDENTIFIER}.cache")
-	if(NO_USE_CACHE_LOCAL STREQUAL "FALSE")
-		# pido un paquete, en funcion de:
-		#		- paquete
-		#		- version
-		#		- plataforma
-		#		- modo (COMPATIBLE / EXACT)
-		# Recibo el que mejor se adapta a mis especificaciones
-		# Otra opcion es enviar todos los ficheros de cmake de todas las versiones
-		set(package_uncompressed_file "${CMAKE_PREFIX_PATH}/${PACKAGE}.tmp")
-		set(package_binary_filename "${CMAKE_PREFIX_PATH}/${PACKAGE}-${VERSION}-${CMAKI_IDENTIFIER}.tar.gz")
-		message("marca: ${package_marker}")
-		message("binario: ${package_binary_filename}")
-		IF(EXISTS "${package_marker}" AND EXISTS "${package_binary_filename}")
-			message("-- reusing file ${package_binary_filename} for avoid download")
-			# en este caso alguien ya nos ha colocado el binario (util para tests unitarios)
-			set(package_uncompressed_file "${package_binary_filename}")
-			set(COPY_SUCCESFUL TRUE PARENT_SCOPE)
-		else()
-			set(package_cmake_filename "${PACKAGE}-${VERSION}-${CMAKI_IDENTIFIER}-cmake.tar.gz")
-			set(http_package_cmake_filename "${CMAKI_REPOSITORY}/download.php?file=${package_cmake_filename}")
-			# message("download from ${http_package_cmake_filename}")
-			# 4. descargo el fichero que se supone tienes los ficheros cmake
-			if(NOT "${NO_USE_CACHE_REMOTE}")
-				cmaki_download_file("${http_package_cmake_filename}" "${package_uncompressed_file}")
-			endif()
-		endif()
-
-		# Si no puede descargar el artefacto ya hecho (es que necesito compilarlo y subirlo)
-		if(NOT "${COPY_SUCCESFUL}" OR "${NO_USE_CACHE_REMOTE}")
-
+	# pido un paquete, en funcion de:
+	#		- paquete
+	#		- version
+	#		- plataforma
+	#		- modo (COMPATIBLE / EXACT)
+	# Recibo el que mejor se adapta a mis especificaciones
+	# Otra opcion es enviar todos los ficheros de cmake de todas las versiones
+	set(package_uncompressed_file "${CMAKE_PREFIX_PATH}/${PACKAGE}.tmp")
+	set(package_binary_filename "${CMAKE_PREFIX_PATH}/${PACKAGE}-${VERSION}-${CMAKI_IDENTIFIER}.tar.gz")
+	message("marca: ${package_marker}")
+	message("binario: ${package_binary_filename}")
+	IF(EXISTS "${package_marker}" AND EXISTS "${package_binary_filename}")
+		message("-- reusing file ${package_binary_filename} for avoid download")
+		# en este caso alguien ya nos ha colocado el binario (util para tests unitarios)
+		set(package_uncompressed_file "${package_binary_filename}")
+		set(COPY_SUCCESFUL TRUE PARENT_SCOPE)
+	else()
+
+		# if(NO_USE_CACHE_LOCAL STREQUAL "FALSE")
+		set(package_cmake_filename "${PACKAGE}-${VERSION}-${CMAKI_IDENTIFIER}-cmake.tar.gz")
+		set(http_package_cmake_filename "${CMAKI_REPOSITORY}/download.php?file=${package_cmake_filename}")
+		# message("download from ${http_package_cmake_filename}")
+		# 4. descargo el fichero que se supone tienes los ficheros cmake
+		if(NOT "${NO_USE_CACHE_REMOTE}")
+			cmaki_download_file("${http_package_cmake_filename}" "${package_uncompressed_file}")
+		endif()
+	endif()
+
+	# Si no puede descargar el artefacto ya hecho (es que necesito compilarlo y subirlo)
+	if(NOT "${COPY_SUCCESFUL}" OR NO_USE_CACHE_REMOTE STREQUAL "TRUE")
+
+		file(REMOVE_RECURSE "${depends_bin_package}")
+		file(REMOVE_RECURSE "${depends_package}")
+		file(REMOVE "${package_uncompressed_file}")
+
+		# 5. compilo y genera el paquete en local
+		message("Generating artifact ${PACKAGE} ...")
+		#
+		# ojo: estoy hay que mejorarlo
+		# no queremos usar "-o", queremos que trate de compilar las dependencias (sin -o)
+		# pero queremos que evite compilar cosas que estan en cache remota
+		#
+		execute_process(
+			COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${DEPENDS_PATHFILE} --cmakefiles=${CMAKI_PATH} --prefix=${DEPENDS_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} --server=${CMAKI_REPOSITORY}
+			WORKING_DIRECTORY "${ARTIFACTS_PATH}"
+			RESULT_VARIABLE artifacts_result
+			)
+		if(artifacts_result)
+			message(FATAL_ERROR "can't create artifact ${PACKAGE}: error ${artifacts_result}")
 			file(REMOVE_RECURSE "${depends_bin_package}")
 			file(REMOVE_RECURSE "${depends_package}")
 			file(REMOVE "${package_uncompressed_file}")
-
-			# 5. compilo y genera el paquete en local
-			message("Generating artifact ${PACKAGE} ...")
-			#
-			# ojo: estoy hay que mejorarlo
-			# no queremos usar "-o", queremos que trate de compilar las dependencias (sin -o)
-			# pero queremos que evite compilar cosas que estan en cache remota
-			#
-			execute_process(
-				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${DEPENDS_PATHFILE} --cmakefiles=${CMAKI_PATH} --prefix=${DEPENDS_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} --server=${CMAKI_REPOSITORY}
-				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
-				RESULT_VARIABLE artifacts_result
-				)
-			if(artifacts_result)
-				message(FATAL_ERROR "can't create artifact ${PACKAGE}: error ${artifacts_result}")
-				file(REMOVE_RECURSE "${depends_bin_package}")
-				file(REMOVE_RECURSE "${depends_package}")
-				file(REMOVE "${package_uncompressed_file}")
-			endif()
-
-			#######################################################
-			# 6: obtengo la version del paquete creado
-			execute_process(
-				COMMAND python ${ARTIFACTS_PATH}/check_remote_version.py --server=${CMAKI_REPOSITORY} --artifacts=${CMAKE_PREFIX_PATH} --platform=${CMAKI_IDENTIFIER} --name=${PACKAGE} ${EXTRA_VERSION}
-				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
-				OUTPUT_VARIABLE RESULT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
-			if(RESULT_VERSION)
-				list(GET RESULT_VERSION 0 PACKAGE_MODE)
-				list(GET RESULT_VERSION 1 PACKAGE_NAME)
-				list(GET RESULT_VERSION 2 VERSION)
-			else()
-				message(FATAL_ERROR "-- not found ${PACKAGE}.")
-			endif()
-			#######################################################
-
-			set(package_filename ${PACKAGE}-${VERSION}-${CMAKI_IDENTIFIER}.tar.gz)
-			set(package_cmake_filename ${PACKAGE}-${VERSION}-${CMAKI_IDENTIFIER}-cmake.tar.gz)
-			set(package_generated_file ${CMAKE_PREFIX_PATH}/${package_filename})
-			set(package_cmake_generated_file ${CMAKE_PREFIX_PATH}/${package_cmake_filename})
-
-			# 7. descomprimo el artefacto
-			execute_process(
-				COMMAND "${CMAKE_COMMAND}" -E tar zxf "${package_cmake_generated_file}"
-				WORKING_DIRECTORY "${CMAKE_PREFIX_PATH}/"
-				RESULT_VARIABLE uncompress_result
-				)
-			if(uncompress_result)
-				message(FATAL_ERROR "Extracting ${package_cmake_generated_file} failed! Error ${uncompress_result}")
-				file(REMOVE_RECURSE "${depends_bin_package}")
-				file(REMOVE_RECURSE "${depends_package}")
-				file(REMOVE "${package_uncompressed_file}")
-				file(REMOVE "${package_generated_file}")
-			endif()
-
-			# y tambien descomprimo el propio tar gz
-			execute_process(
-				COMMAND "${CMAKE_COMMAND}" -E tar zxf "${package_generated_file}"
-				WORKING_DIRECTORY "${depends_dir}/"
-				RESULT_VARIABLE uncompress_result2
-				)
-			if(uncompress_result2)
-				message(FATAL_ERROR "Extracting ${package_generated_file} failed! Error ${uncompress_result2}")
-				file(REMOVE_RECURSE "${depends_bin_package}")
-				file(REMOVE_RECURSE "${depends_package}")
-				file(REMOVE "${package_uncompressed_file}")
-				file(REMOVE "${package_generated_file}")
-			endif()
-
-			# 8. borro los 2 tar gz
+		endif()
+
+		#######################################################
+		# 6: obtengo la version del paquete creado
+		execute_process(
+			COMMAND python ${ARTIFACTS_PATH}/check_remote_version.py --server=${CMAKI_REPOSITORY} --artifacts=${CMAKE_PREFIX_PATH} --platform=${CMAKI_IDENTIFIER} --name=${PACKAGE} ${EXTRA_VERSION}
+			WORKING_DIRECTORY "${ARTIFACTS_PATH}"
+			OUTPUT_VARIABLE RESULT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+		if(RESULT_VERSION)
+			list(GET RESULT_VERSION 0 PACKAGE_MODE)
+			list(GET RESULT_VERSION 1 PACKAGE_NAME)
+			list(GET RESULT_VERSION 2 VERSION)
+		else()
+			message(FATAL_ERROR "-- not found ${PACKAGE}.")
+		endif()
+		#######################################################
+
+		set(package_filename ${PACKAGE}-${VERSION}-${CMAKI_IDENTIFIER}.tar.gz)
+		set(package_cmake_filename ${PACKAGE}-${VERSION}-${CMAKI_IDENTIFIER}-cmake.tar.gz)
+		set(package_generated_file ${CMAKE_PREFIX_PATH}/${package_filename})
+		set(package_cmake_generated_file ${CMAKE_PREFIX_PATH}/${package_cmake_filename})
+
+		# 7. descomprimo el artefacto
+		execute_process(
+			COMMAND "${CMAKE_COMMAND}" -E tar zxf "${package_cmake_generated_file}"
+			WORKING_DIRECTORY "${CMAKE_PREFIX_PATH}/"
+			RESULT_VARIABLE uncompress_result
+			)
+		if(uncompress_result)
+			message(FATAL_ERROR "Extracting ${package_cmake_generated_file} failed! Error ${uncompress_result}")
+			file(REMOVE_RECURSE "${depends_bin_package}")
+			file(REMOVE_RECURSE "${depends_package}")
+			file(REMOVE "${package_uncompressed_file}")
 			file(REMOVE "${package_generated_file}")
-			file(REMOVE "${package_cmake_generated_file}")
-
-		# me lo he descargdo y solo es descomprimirlo
-		elseif(EXISTS "${package_uncompressed_file}")
-
-			# 10. lo descomprimo cacheado
-			execute_process(
-				COMMAND "${CMAKE_COMMAND}" -E tar zxf "${package_uncompressed_file}"
-				WORKING_DIRECTORY "${CMAKE_PREFIX_PATH}/"
-				RESULT_VARIABLE uncompress_result)
-			if(uncompress_result)
-				message(FATAL_ERROR "Extracting ${package_uncompressed_file} failed! Error ${uncompress_result}")
-			endif()
+		endif()
+
+		# y tambien descomprimo el propio tar gz
+		execute_process(
+			COMMAND "${CMAKE_COMMAND}" -E tar zxf "${package_generated_file}"
+			WORKING_DIRECTORY "${depends_dir}/"
+			RESULT_VARIABLE uncompress_result2
+			)
+		if(uncompress_result2)
+			message(FATAL_ERROR "Extracting ${package_generated_file} failed! Error ${uncompress_result2}")
+			file(REMOVE_RECURSE "${depends_bin_package}")
+			file(REMOVE_RECURSE "${depends_package}")
 			file(REMOVE "${package_uncompressed_file}")
-		endif()
+			file(REMOVE "${package_generated_file}")
+		endif()
+
+		# 8. borro los 2 tar gz
+		file(REMOVE "${package_generated_file}")
+		file(REMOVE "${package_cmake_generated_file}")
+
+	# me lo he descargdo y solo es descomprimirlo
+	elseif(EXISTS "${package_uncompressed_file}")
+
+		# 10. lo descomprimo cacheado
+		execute_process(
+			COMMAND "${CMAKE_COMMAND}" -E tar zxf "${package_uncompressed_file}"
+			WORKING_DIRECTORY "${CMAKE_PREFIX_PATH}/"
+			RESULT_VARIABLE uncompress_result)
+		if(uncompress_result)
+			message(FATAL_ERROR "Extracting ${package_uncompressed_file} failed! Error ${uncompress_result}")
+		endif()
+		file(REMOVE "${package_uncompressed_file}")
 	endif()

 	# 12. hacer find_package tradicional, ahora que tenemos los ficheros de cmake


changes facts

changes facts

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -119,22 +119,38 @@
 		# Si no puede descargar el artefacto ya hecho (es que necesito compilarlo y subirlo)
 		if((NOT "${COPY_SUCCESFUL}") OR ${FORCE_GENERATE_ARTIFACT})

-			file(REMOVE "${depends_bin_package}")
-			file(REMOVE "${depends_package}")
-			file(REMOVE "${package_uncompressed_file}")
+			file(REMOVE_RECURSE "${depends_bin_package}")
+			file(REMOVE_RECURSE "${depends_package}")
+			file(REMOVE_RECURSE "${package_uncompressed_file}")

 			# 5. compilo y genera el paquete en local
 			execute_process(
-				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${CMAKI_PATH}/../depends.json --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} -o -d
+				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${CMAKI_PATH}/../depends.json --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} -o
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
 				RESULT_VARIABLE artifacts_result
 				)
 			if(artifacts_result)
 				message(FATAL_ERROR "can't create artifact ${PACKAGE}")
+				file(REMOVE_RECURSE "${depends_bin_package}")
+				file(REMOVE_RECURSE "${depends_package}")
+				file(REMOVE_RECURSE "${package_uncompressed_file}")
+			endif()
+
+			# 6. descomprimo el artefacto
+			execute_process(
+				COMMAND "${CMAKE_COMMAND}" -E tar zxf "${package_cmake_generated_file}"
+				WORKING_DIRECTORY "${CMAKE_PREFIX_PATH}/"
+				RESULT_VARIABLE uncompress_result
+				)
+			if(uncompress_result)
+				message(FATAL_ERROR "Extracting ${package_cmake_generated_file} failed! Error ${uncompress_result}")
+				file(REMOVE_RECURSE "${depends_bin_package}")
+				file(REMOVE_RECURSE "${depends_package}")
+				file(REMOVE_RECURSE "${package_uncompressed_file}")
 			endif()

 			#######################################################
-			# 6: obtengo la version del paquete recien creado
+			# 7: obtengo la version del paquete recien creado
 			execute_process(
 				COMMAND python ${ARTIFACTS_PATH}/check_remote_version.py --server=${CMAKI_REPOSITORY} --artifacts=${CMAKE_PREFIX_PATH} --platform=${CMAKI_PLATFORM} --name=${PACKAGE}
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
@@ -144,11 +160,12 @@
 			list(GET RESULT_VERSION 2 VERSION)
 			#######################################################

-			# 7. subo el artefacto y los ficheros de cmake
+			# 8. subo el artefacto y los ficheros de cmake
 			set(package_filename ${PACKAGE}-${VERSION}-${CMAKI_PLATFORM}.tar.gz)
 			set(package_cmake_filename ${PACKAGE}-${VERSION}-${CMAKI_PLATFORM}-cmake.tar.gz)
 			set(package_generated_file ${CMAKE_PREFIX_PATH}/${package_filename})
 			set(package_cmake_generated_file ${CMAKE_PREFIX_PATH}/${package_cmake_filename})
+			message("-- uploading ${package_generated_file}")
 			execute_process(
 				COMMAND python ${ARTIFACTS_PATH}/upload_package.py --url=${CMAKI_REPOSITORY}/upload.php --filename=${package_generated_file}
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
@@ -156,7 +173,11 @@
 				)
 			if(upload_result1)
 				message(FATAL_ERROR "error in upload ${package_generated_file})")
-			endif()
+				file(REMOVE_RECURSE "${depends_bin_package}")
+				file(REMOVE_RECURSE "${depends_package}")
+				file(REMOVE_RECURSE "${package_uncompressed_file}")
+			endif()
+			message("-- uploading ${package_cmake_generated_file}")
 			execute_process(
 				COMMAND python ${ARTIFACTS_PATH}/upload_package.py --url=${CMAKI_REPOSITORY}/upload.php --filename=${package_cmake_generated_file}
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
@@ -164,18 +185,11 @@
 				)
 			if(upload_result2)
 				message(FATAL_ERROR "error in upload ${package_cmake_generated_file})")
-			endif()
-
-			# 8. descomprimo el artefacto
-			execute_process(
-				COMMAND "${CMAKE_COMMAND}" -E tar zxf "${package_cmake_generated_file}"
-				WORKING_DIRECTORY "${CMAKE_PREFIX_PATH}/"
-				RESULT_VARIABLE uncompress_result
-				)
-			if(uncompress_result)
-				message(FATAL_ERROR "Extracting ${package_cmake_generated_file} failed! Error ${uncompress_result}")
-			endif()
-
+				file(REMOVE_RECURSE "${depends_bin_package}")
+				file(REMOVE_RECURSE "${depends_package}")
+				file(REMOVE_RECURSE "${package_uncompressed_file}")
+			endif()
+
 			# 9. borro los 2 tar gz
 			file(REMOVE "${package_generated_file}")
 			file(REMOVE "${package_cmake_generated_file}")


gtest now commonly installed

gtest now commonly installed

--- modules/LookUpGTest.cmake
+++ modules/LookUpGTest.cmake
@@ -53,7 +53,4 @@
     LOG_BUILD ON
 )

-add_recursive_cmake_step(Lookup-GTest DEPENDEES build)
-# Required by FindGTest
-set(GTEST_ROOT "${EXTERNAL_ROOT}/src/GTest-build" CACHE
-    PATH "Path to gtest root install directory")
+add_recursive_cmake_step(Lookup-GTest DEPENDEES install)


Revert "Add Clang dependency to the check for Clang C++ headers."

This temporarily reverts commit r311733, because of bot breakage.
http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_build/38139/consoleFull#-256426522e9a0fee5-ebcc-4238-a641-c5aa112c323e

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

--- cmake/Modules/CompilerRTCompile.cmake
+++ cmake/Modules/CompilerRTCompile.cmake
@@ -67,8 +67,8 @@
   if(NOT COMPILER_RT_STANDALONE_BUILD)
     list(APPEND SOURCE_DEPS clang compiler-rt-headers)
   endif()
-  if (TARGET CheckClangHeaders)
-    list(APPEND SOURCE_DEPS CheckClangHeaders)
+  if (TARGET CompilerRTUnitTestCheckCxx)
+    list(APPEND SOURCE_DEPS CompilerRTUnitTestCheckCxx)
   endif()
   string(REGEX MATCH "[.](cc|cpp)$" is_cxx ${source_rpath})
   string(REGEX MATCH "[.](m|mm)$" is_objc ${source_rpath})
@@ -132,10 +132,12 @@
       "  false"
       "fi"
       )
-    add_custom_target(CheckClangHeaders
+    add_custom_target(CompilerRTUnitTestCheckCxx
       COMMAND bash -c "${CMD}"
       COMMENT "Checking that just-built clang can find C++ headers..."
       VERBATIM)
-    ADD_DEPENDENCIES(CheckClangHeaders clang)
+    if (TARGET clang)
+      ADD_DEPENDENCIES(CompilerRTUnitTestCheckCxx clang)
+    endif()
   endif()
 endmacro()


Find Plugin Process: Reformat CMake code

--- cmake/Modules/FindPluginprocess.cmake
+++ cmake/Modules/FindPluginprocess.cmake
@@ -1,31 +1,26 @@
+# ~~~
 # Find the dependencies of libpluginprocess to determine if plugins
 # which depend on it can be included or not.
 #
-#  HAVE_MKFIFO					- True if mkfifo is available on the platform
-#  HAVE_FORK					- True if fork is available on the platform
-#  HAVE_PLUGINPROCESS			- True if the pluginprocess library can be built
+#  HAVE_MKFIFO                  - True if mkfifo is available on the platform
+#  HAVE_FORK                    - True if fork is available on the platform
+#  HAVE_PLUGINPROCESS	        - True if the pluginprocess library can be built
 #  PLUGINPROCESS_NOTFOUND_INFO	- A string describing which pluginprocess dependency is missing
 #
-include(CheckFunctionExists)
+# ~~~
+include (CheckFunctionExists)

 check_function_exists (mkfifo HAVE_MKFIFO)
 check_function_exists (fork HAVE_FORK)

 if (HAVE_MKFIFO)
-if (HAVE_FORK)
-	set (PLUGINPROCESS_FOUND 1)
-else (HAVE_FORK)
-	set (PLUGINPROCESS_NOTFOUND_INFO
-		"fork does not exist on the target platform, excluding pluginprocess library")
-endif(HAVE_FORK)
-else(HAVE_MKFIFO)
-	message (PLUGINPROCESS_NOTFOUND_INFO
-		"mkfifo does not exist on the target platform, excluding pluginprocess library")
-endif(HAVE_MKFIFO)
+	if (HAVE_FORK)
+		set (PLUGINPROCESS_FOUND 1)
+	else (HAVE_FORK)
+		set (PLUGINPROCESS_NOTFOUND_INFO "fork does not exist on the target platform, excluding pluginprocess library")
+	endif (HAVE_FORK)
+else (HAVE_MKFIFO)
+	message (PLUGINPROCESS_NOTFOUND_INFO "mkfifo does not exist on the target platform, excluding pluginprocess library")
+endif (HAVE_MKFIFO)

-mark_as_advanced (
-	HAVE_MKFIFO
-	HAVE_FORK
-	PLUGINPROCESS_FOUND
-	PLUGINPROCESS_NOTFOUND_INFO
-)
+mark_as_advanced (HAVE_MKFIFO HAVE_FORK PLUGINPROCESS_FOUND PLUGINPROCESS_NOTFOUND_INFO)


More common sizes

More common sizes

--- cmake/MyPackageCheckCommonSizes.cmake
+++ cmake/MyPackageCheckCommonSizes.cmake
@@ -4,5 +4,59 @@
   CHECK_TYPE_SIZE("int" SIZEOF_INT)
   CHECK_TYPE_SIZE("long" SIZEOF_LONG)
   CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
+  CHECK_TYPE_SIZE("unsigned short" SIZEOF_UNSIGNED_SHORT)
+  CHECK_TYPE_SIZE("unsigned int" SIZEOF_UNSIGNED_INT)
+  CHECK_TYPE_SIZE("unsigned long" SIZEOF_UNSIGNED_LONG)
+  CHECK_TYPE_SIZE("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
   CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T)
+  #
+  # Special types
+  #
+  FOREACH (_sign "" "u")
+    FOREACH (_size 8 16 32 64)
+      SET (_MYTYPE    MYPACKAGE_${_sign}INT${_size})
+      SET (_MYTYPEDEF MYPACKAGE_${_sign}INT${_size}_TYPEDEF)
+
+      SET (HAVE_${_MYTYPE} FALSE)
+      SET (${_MYTYPE} "")
+      SET (${_MYTYPEDEF} "")
+
+      SET (_found_type FALSE)
+      FOREACH (_underscore "" "_" "__")
+        SET (_type ${_underscore}${_sign}int${_size}_t)
+        STRING (TOUPPER ${_type} _TYPE)
+        CHECK_TYPE_SIZE (${_type} ${_TYPE})
+        IF (HAVE_${_TYPE})
+          SET (HAVE_${_MYTYPE} TRUE)
+          SET (${_MYTYPE} ${${_TYPE}})
+          SET (${_MYTYPEDEF} ${_type})
+          BREAK ()
+        ENDIF ()
+      ENDFOREACH ()
+      IF (NOT HAVE_${_MYTYPE})
+        #
+        # Try with C types
+        #
+        FOREACH (_c "short" "int" "long" "long long")
+          IF ("${_sign}" STREQUAL "u")
+            SET (_c "unsigned ${_c}")
+          ENDIF ()
+          STRING (TOUPPER ${_c} _C)
+          STRING (REPLACE " " "_" _C "${_C}")
+          IF (HAVE_SIZEOF_${_C})
+            IF (${SIZEOF_${_C}} EQUAL ${_size})
+              SET (HAVE_${_MYTYPE} TRUE)
+              SET (${_MYTYPE} ${${_TYPE}})
+              SET (${_MYTYPEDEF} ${_c})
+              BREAK ()
+            ENDIF ()
+          ENDIF ()
+        ENDFOREACH ()
+      ENDIF ()
+      MARK_AS_ADVANCED (
+        HAVE_${_MYTYPE}
+        ${_MYTYPE}
+        ${_MYTYPEDEF})
+    ENDFOREACH ()
+  ENDFOREACH ()
 ENDMACRO()


Enable -Wdeprecated in the cmake build now that LLVM (& Clang, Polly, and LLD) are -Wdeprecated clean

This particularly helps enforce the C++ Rule of 5 (for new move ops this
is already an error, but for a type only using C++98 features (copy
ctor/assign, dtor) it is only deprecated, not invalid)

Applying the flag for any GCC compatible compiler - GCC doesn't warn on
the Rule of 5 cases that C++11 deprecates, but it doesn't have other
false positives so far as I could see (compiling with GCC 4.8 didn't
produce any -Wdeprecated warnings I could spot).

Reviewers: aaron.ballman

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

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

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

 elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
   if (LLVM_ENABLE_WARNINGS)
-    append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+    append("-Wall -W -Wno-unused-parameter -Wwrite-strings -Wdeprecated" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
     append("-Wcast-qual" CMAKE_CXX_FLAGS)

     # Turn off missing field initializer warnings for gcc to avoid noise from


[cmake] Only set hasstdexpstringview if not hasstdstringview (ROOT-9841).

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -575,20 +575,21 @@
 endif()

+set(hasstdexpstringview undef)
 CHECK_CXX_SOURCE_COMPILES("#include <string_view>
   int main() { char arr[3] = {'B', 'a', 'r'}; std::string_view strv(arr, sizeof(arr)); return 0;}" found_stdstringview)
 if(found_stdstringview)
   set(hasstdstringview define)
 else()
   set(hasstdstringview undef)
-endif()
-
-CHECK_CXX_SOURCE_COMPILES("#include <experimental/string_view>
+
+  CHECK_CXX_SOURCE_COMPILES("#include <experimental/string_view>
    int main() { char arr[3] = {'B', 'a', 'r'}; std::experimental::string_view strv(arr, sizeof(arr)); return 0;}" found_stdexpstringview)
-if(found_stdexpstringview)
-  set(hasstdexpstringview define)
-else()
-  set(hasstdexpstringview undef)
+  if(found_stdexpstringview)
+    set(hasstdexpstringview define)
+  else()
+    set(hasstdexpstringview undef)
+  endif()
 endif()

 if(found_stdstringview)


The fortran compiler may not exists

The fortran compiler may not exists

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -378,7 +378,7 @@
 set(configoptions ${ROOT_CONFIGARGS})
 get_filename_component(altcc ${CMAKE_C_COMPILER} NAME)
 get_filename_component(altcxx ${CMAKE_CXX_COMPILER} NAME)
-get_filename_component(altf77 ${CMAKE_Fortran_COMPILER} NAME)
+get_filename_component(altf77 "${CMAKE_Fortran_COMPILER}" NAME)
 get_filename_component(altld ${CMAKE_CXX_COMPILER} NAME)

 set(pythonvers ${PYTHON_VERSION})


Make sure we define availability macros for standalone library builds

Fixes rdar://85639438.

--- cmake/modules/StandaloneOverlay.cmake
+++ cmake/modules/StandaloneOverlay.cmake
@@ -73,6 +73,9 @@
 set(SWIFT_STDLIB_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
   "Build type for the Swift standard library and SDK overlays.")

+file(STRINGS "../../utils/availability-macros.def" SWIFT_STDLIB_AVAILABILITY_DEFINITIONS)
+list(FILTER SWIFT_STDLIB_AVAILABILITY_DEFINITIONS EXCLUDE REGEX "^\\s*(#.*)?$")
+
 set(SWIFT_DARWIN_SUPPORTED_ARCHS "" CACHE STRING
   "Semicolon-separated list of architectures to configure on Darwin platforms. \
 If left empty all default architectures are configured.")


Build ArrayFire libraries as shared by default

--- cmake/projects/ArrayFire/hunter.cmake
+++ cmake/projects/ArrayFire/hunter.cmake
@@ -34,6 +34,9 @@
 hunter_cmake_args(
     ArrayFire
     CMAKE_ARGS BUILD_TEST=OFF BUILD_EXAMPLES=OFF BUILD_GRAPHICS=OFF
+    # segmentation fault for static libraries
+    # * https://github.com/headupinclouds/gatherer/issues/85#issuecomment-186376763
+    BUILD_SHARED_LIBS=ON
 )

 hunter_pick_scheme(DEFAULT url_sha1_cmake)


refs #5280 Intel compiler has some warnings for -WeffC++.  Temporarily removing till warnings are fixed

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

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -85,7 +85,7 @@
   -Wno-error=missing-format-attribute
   -Wpacked
   )
-set_cflags_if_supported_named("-Weffc++" -Weffcpp)
+## set_cflags_if_supported_named("-Weffc++" -Weffcpp)
 set_ldflags_if_supported(
   -Wno-error=strict-overflow
   )


CI: safe parsing of sb_branch.txt

CI: safe parsing of sb_branch.txt

--- CI/macros.cmake
+++ CI/macros.cmake
@@ -57,7 +57,7 @@
   # How to get md5sum:
   # * concatenate all source files in one
   # * add configure result from previous job ${OTB_SOURCE_DIR}/build/CMakeCache.txt
-  file(READ "${OTB_SOURCE_DIR}/sb_branch.txt" BRANCH_NAME)
+  file(STRINGS "${OTB_SOURCE_DIR}/sb_branch.txt" BRANCH_NAME LIMIT_COUNT 1 REGEX "^([A-Za-z0-9]|/|-|_|\\.)+" )

   # Look for a GIT command-line client.
   find_program(CTEST_GIT_COMMAND NAMES git git.cmd)


DOC: anmerkung

DOC: anmerkung

--- CMake/MITK_Boost_Config.cmake
+++ CMake/MITK_Boost_Config.cmake
@@ -1,4 +1,7 @@
 FIND_PACKAGE(Boost)
+
+#here we could also choose the desired components:
+#FIND_PACKAGE(Boost COMPONENTS graph math/special_functions)

 LIST(APPEND ALL_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
 LIST(APPEND ALL_LIBRARIES ${Boost_LIBRARIES})


CMake: another OSX fix for FindOgre

CMake: another OSX fix for FindOgre

--HG--
branch : v1-9

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -406,7 +406,7 @@
   # find link libraries for plugins
   set(OGRE_${PLUGIN}_LIBRARY_NAMES "${PLUGIN}${OGRE_LIB_SUFFIX}")
   get_debug_names(OGRE_${PLUGIN}_LIBRARY_NAMES)
-  set(OGRE_${PLUGIN}_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
+  #set(OGRE_${PLUGIN}_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
   find_library(OGRE_${PLUGIN}_LIBRARY_REL NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES}
     HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt release release/opt relwithdebinfo relwithdebinfo/opt minsizerel minsizerel/opt)
   find_library(OGRE_${PLUGIN}_LIBRARY_DBG NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES_DBG}


Update a reference to buildsettings.h

Update a reference to buildsettings.h

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -149,7 +149,7 @@

   # determine configuration settings
   set(OGRE_CONFIG_HEADERS
-    ${OGRE_CONFIG_INCLUDE_DIR}/buildsettings.h
+    ${OGRE_CONFIG_INCLUDE_DIR}/OgreBuildSettings.h
     ${OGRE_CONFIG_INCLUDE_DIR}/config.h
     ${OGRE_CONFIG_INCLUDE_DIR}/OgreConfig.h
   )


COMP Fix MITK-Data revision

COMP Fix MITK-Data revision

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag 2fce9992) # first 8 characters of hash-tag
+  set(revision_tag 16f27d87) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


use CHECK_C_SOURCE_COMPILES

use CHECK_C_SOURCE_COMPILES

git-svn-id: dea4c50957f75874cf9791776be29d2e34106c50@138 ef0d8562-5c19-0410-972e-841db63a069c

--- CMakeModules/FlagsTests.cmake
+++ CMakeModules/FlagsTests.cmake
@@ -1,12 +1,20 @@
-INCLUDE(${CMAKE_ROOT}/Modules/CheckCCompilerFlag.cmake)
+#INCLUDE(${CMAKE_ROOT}/Modules/CheckCCompilerFlag.cmake)

 MACRO(CHECK_CFLAGS_APPEND DEST_FLAGS FLAG)
 STRING(REGEX REPLACE "^-+(.*)$" "\\1" FLAG_NAME ${FLAG})
 STRING(TOUPPER ${FLAG_NAME} FLAG_NAME)
 SET(HAVE_FLAG "HAVE_FLAG_${FLAG_NAME}")

-CHECK_C_COMPILER_FLAG("${FLAG}" ${HAVE_FLAG})
+#CHECK_C_COMPILER_FLAG("${FLAG}" ${HAVE_FLAG})
+
+SET(CMAKE_REQUIRED_FLAGS "${FLAG}")
+CHECK_C_SOURCE_COMPILES(
+"int main(){}
+" ${HAVE_FLAG})
+SET(CMAKE_REQUIRED_FLAGS "")
+
+
 IF(${HAVE_FLAG})
-SET(${DEST_FLAGS} "${FLAG} ${${DEST_FLAGS}}")
+  SET(${DEST_FLAGS} "${FLAG} ${${DEST_FLAGS}}")
 ENDIF(${HAVE_FLAG})
 ENDMACRO(CHECK_CFLAGS_APPEND)


Add new swiftSyntax to LLDBDependencies.cmake

--- cmake/LLDBDependencies.cmake
+++ cmake/LLDBDependencies.cmake
@@ -180,6 +180,7 @@
     swiftSILOptimizer
     swiftASTSectionImporter
     swiftRemoteAST
+    swiftSyntax
     )
 endif()


fix native detection on Jetson

fix native detection on Jetson

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -8,7 +8,10 @@
   return()
 endif()

-
+if(CUDA_HOST_COMPILER)
+  # respect the CUDA_HOST_COMPILER if specified manually
+  set(PREFERRED_CUDA_HOST_COMPILER "${CUDA_HOST_COMPILER}")
+endif()
 if(((NOT CMAKE_VERSION VERSION_LESS "3.9.0")  # requires https://gitlab.kitware.com/cmake/cmake/merge_requests/663
       OR OPENCV_CUDA_FORCE_EXTERNAL_CMAKE_MODULE)
     AND NOT OPENCV_CUDA_FORCE_BUILTIN_CMAKE_MODULE)
@@ -106,8 +109,8 @@
     unset(CUDA_ARCH_PTX CACHE)
   endif()

-  if(CUDA_HOST_COMPILER)
-    LIST(APPEND CUDA_NVCC_FLAGS -ccbin ${CUDA_HOST_COMPILER})
+  if(PREFERRED_CUDA_HOST_COMPILER)
+    LIST(APPEND CUDA_NVCC_FLAGS -ccbin "${PREFERRED_CUDA_HOST_COMPILER}")
   else()
     if(WIN32 AND CMAKE_LINKER) #Workaround for VS cl.exe not being in the env. path
       get_filename_component(host_compiler_bindir ${CMAKE_LINKER} DIRECTORY)


OSX: assure cmd-line builds working properly with symbol maps

--- cmake/PlatformSpecific.cmake
+++ cmake/PlatformSpecific.cmake
@@ -230,9 +230,9 @@
 	set(OSX_FLAGS_RELEASE "-ftree-vectorize -msse -msse2 -msse3 -mssse3") # only additional flags
 	set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${OSX_FLAGS_RELEASE}") # cmake emits "-O3 -DNDEBUG" for Release by default, "-O0 -g" for Debug
 	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${OSX_FLAGS_RELEASE}")
-	set(CMAKE_EXE_LINKER_FLAGS "-Wl,-unexported_symbols_list -Wl, include/luxrays/utils/unexported_symbols.map")
-	set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-unexported_symbols_list -Wl, include/luxrays/utils/unexported_symbols.map")
-	set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-unexported_symbols_list -Wl, include/luxrays/utils/unexported_symbols.map")
+	set(CMAKE_EXE_LINKER_FLAGS "-Wl,-unexported_symbols_list -Wl,${CMAKE_SOURCE_DIR}/include/luxrays/utils/unexported_symbols.map")
+	set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-unexported_symbols_list -Wl,${CMAKE_SOURCE_DIR}/include/luxrays/utils/unexported_symbols.map")
+	set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-unexported_symbols_list -Wl,${CMAKE_SOURCE_DIR}/include/luxrays/utils/unexported_symbols.map")
 	set(VISIBILITY_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden")

 	SET(CMAKE_XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING YES) # strip symbols in whole project, disabled in pylux target


Fixed so that cucumber fails if there are pending/undefined steps (should be default in cucumber...)

--- cmake/cucumber-testing.cmake
+++ cmake/cucumber-testing.cmake
@@ -55,7 +55,7 @@

     add_test(
         NAME ${FEATURE_NAME}
-        COMMAND ${CUCUMBER} "${CMAKE_CURRENT_SOURCE_DIR}/${arg_FEATURE}"
+        COMMAND ${CUCUMBER} --strict "${CMAKE_CURRENT_SOURCE_DIR}/${arg_FEATURE}"
         WORKING_DIRECTORY ${arg_FEATURES_ROOT}
     )
     decrement_cost_and_set_for_test( TEST ${FEATURE_NAME} )


Remove unused method add_swift_llvm_loadable_module

This function was discovered to be unused during the review of #435. It
was requested that it be removed as a subsequent pull.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1847,37 +1847,3 @@
       ${SWIFTEXE_DONT_STRIP_NON_MAIN_SYMBOLS_FLAG}
       ${SWIFTEXE_DISABLE_ASLR_FLAG})
 endfunction()
-
-function(add_swift_llvm_loadable_module name)
-  add_llvm_loadable_module(${name} ${ARGN})
-  set(sdk "${SWIFT_HOST_VARIANT_SDK}")
-  set(arch "${SWIFT_HOST_VARIANT_ARCH}")
-
-  # Determine compiler flags.
-  set(c_compile_flags)
-  _add_variant_c_compile_flags(
-      "${sdk}"
-      "${arch}"
-      "${CMAKE_BUILD_TYPE}"
-      "${LLVM_ENABLE_ASSERTIONS}"
-      FALSE
-      c_compile_flags)
-
-  set(link_flags)
-  _add_variant_link_flags(
-      "${sdk}"
-      "${arch}"
-      "${CMAKE_BUILD_TYPE}"
-      "${LLVM_ENABLE_ASSERTIONS}"
-      FALSE
-      link_flags)
-
-  # Convert variables to space-separated strings.
-  _list_escape_for_shell("${c_compile_flags}" c_compile_flags)
-  _list_escape_for_shell("${link_flags}" link_flags)
-
-  set_property(TARGET ${name} APPEND_STRING PROPERTY
-      COMPILE_FLAGS " ${c_compile_flags}")
-  set_property(TARGET ${name} APPEND_STRING PROPERTY
-      LINK_FLAGS " ${link_flags}")
-endfunction()


build: remove `INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY` from `_add_swift_host_library_single`

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -732,7 +732,6 @@
   set(SWIFTLIB_SINGLE_multiple_parameter_options
         FILE_DEPENDS
         GYB_SOURCES
-        INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY
         LLVM_LINK_COMPONENTS
         SWIFT_COMPILE_FLAGS)

@@ -871,22 +870,9 @@
     return()
   endif()

-  set(SWIFTLIB_INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS_SHARED_ONLY)
-  foreach(object_library ${SWIFTLIB_SINGLE_INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY})
-    list(APPEND SWIFTLIB_INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS_SHARED_ONLY
-        $<TARGET_OBJECTS:${object_library}${VARIANT_SUFFIX}>)
-  endforeach()
-
-  set(INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS)
-  if(${libkind} STREQUAL "SHARED")
-    list(APPEND INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS
-         ${SWIFTLIB_INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS_SHARED_ONLY})
-  endif()
-
   add_library("${target}" ${libkind}
               ${SWIFTLIB_SINGLE_SOURCES}
-              ${SWIFTLIB_SINGLE_EXTERNAL_SOURCES}
-              ${INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS})
+              ${SWIFTLIB_SINGLE_EXTERNAL_SOURCES})
   _set_target_prefix_and_suffix("${target}" "${libkind}" "${SWIFTLIB_SINGLE_SDK}")

   if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS")


cmake: update warning flags

cmake: update warning flags

--- cmake/toolbox/compiler.cmake
+++ cmake/toolbox/compiler.cmake
@@ -25,7 +25,7 @@
 set(COMPILER_WARNINGS ON CACHE BOOL "Enable all/pedantic/effc++ compiler errors/warnings.")
 mark_as_advanced(COMPILER_WARNINGS)
 if(COMPILER_WARNINGS)
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Weffc++ -pedantic -pedantic-errors")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -Wextra -Weffc++ -Wpedantic -pedantic-errors")
 endif()

 # WARNINGS MACRO


Update compiler.cmake

Update compiler.cmake

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -76,7 +76,7 @@
      elseif (NOT WIN32)
          set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -std=c++11 -stdlib=libstdc++")
      else()
-         set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -std=c++11 -Wno-unused-result -D_MD")
+         set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -std=c++11 -Wno-unused-result /MD")
      endif ()
      set(CMAKE_CXX_FLAGS_DEBUG "-g")
      set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")


update armadillo hash

update armadillo hash

--- version_config.cmake
+++ version_config.cmake
@@ -43,7 +43,7 @@

 ## Armadillo
 set(Armadillo_URL   https://downloads.sourceforge.net/project/arma/armadillo-9.800.2.tar.xz)
-set(Armadillo_MD5 c601f3a5ec6d50666aa3a539fa20e6ca )
+set(Armadillo_MD5 c2fa488ea069b9972363ebad16e51ab5 )

 ## FFTW3
 if(WIN32)


Prevent error remove CTEST_CMAKE_COMMAND from the list of required variable.

--- CMake/ctkDashboardDriverScript.cmake
+++ CMake/ctkDashboardDriverScript.cmake
@@ -34,7 +34,6 @@
   CTEST_NOTES_FILES
   CTEST_SITE
   CTEST_DASHBOARD_ROOT
-  CTEST_CMAKE_COMMAND
   CTEST_CMAKE_GENERATOR
   WITH_MEMCHECK
   WITH_COVERAGE


Use local variables for json file path

Use local variables for json file path

--- CMake/sitkGenerateFilterSource.cmake
+++ CMake/sitkGenerateFilterSource.cmake
@@ -137,13 +137,6 @@
 #
 function( expand_template FILENAME input_dir output_dir library_name )

-  get_json_path( itk_module ${f} itk_module)
-
-  list (FIND ITK_MODULES_ENABLED "${itk_module}" _index)
-  if (NOT "${itk_module}" STREQUAL "" AND ${_index} EQUAL -1)
-    # required module is not enabled, don't process
-    return()
-  endif()

   # Set common variables
   set ( expand_template_script ${SimpleITK_SOURCE_DIR}/ExpandTemplateGenerator/ExpandTemplate.lua )
@@ -154,6 +147,17 @@
   set ( input_json_file ${input_dir}/json/${FILENAME}.json )
   set ( template_file_h ${input_dir}/templates/sitkImageFilterTemplate.h.in )
   set ( template_file_cxx ${input_dir}/templates/sitkImageFilterTemplate.cxx.in )
+
+  get_json_path( itk_module ${input_json_file} itk_module)
+
+  list (FIND ITK_MODULES_ENABLED "${itk_module}" _index)
+
+  if("${itk_module}" STREQUAL "")
+    message(WARNING "Missing \"itk_module\" field in ")
+  elseif (NOT "${itk_module}" STREQUAL "" AND ${_index} EQUAL -1)
+    # required module is not enabled, don't process
+    return()
+  endif()

   # Get the list of template component files for this template
   get_dependent_template_components(template_deps ${input_json_file} ${input_dir})


Fix feature summary

Fix feature summary

--- CMake/FeatureSummary.cmake
+++ CMake/FeatureSummary.cmake
@@ -36,7 +36,7 @@
 if (OGRE_BUILD_COMPONENT_PYTHON)
 	set(_components "${_components}  + Python [BETA]\n")
 endif ()
-if (OGRE_BUILD_COMPONENT_PYTHON)
+if (OGRE_BUILD_COMPONENT_JAVA)
 	set(_components "${_components}  + Java/ JNI [BETA]\n")
 endif ()
 if (OGRE_BUILD_COMPONENT_RTSHADERSYSTEM)


Fix tweaking sdkconfig for XTAL26 option (#2370)

***NO_CI***

--- CMake/binutils.ESP32.cmake
+++ CMake/binutils.ESP32.cmake
@@ -464,7 +464,7 @@
         set(SDKCONFIG_DEFAULTS_FILE ${CMAKE_SOURCE_DIR}/targets/ESP32/_IDF/sdkconfig.default)
     endif()

-    message(STATUS "\n--SDK CONFIG is: '${SDKCONFIG_DEFAULTS_FILE}'.")
+    message(STATUS "\n-- SDK CONFIG is: '${SDKCONFIG_DEFAULTS_FILE}'.")

     # set list with the IDF components to add
     # need to match the list below with the respective libraries
@@ -573,12 +573,16 @@
     # option for automatic XTAL frequency detection
     # (default is OFF which means that fixed default frequency will be used)
     option(ESP32_XTAL_FREQ_26 "option to set XTAL frequency to 26MHz")
-
+
+    message(DEBUG "ESP32_XTAL_FREQ_26 option is ${ESP32_XTAL_FREQ_26}")
+
     if(ESP32_XTAL_FREQ_26)

         message(STATUS "Set XTAL frequency to 26MHz")
-
-        # need to read the supplied SDK CONFIG file and replace the appropriate options
+
+        # need to read the supplied SDK CONFIG file(s) and replace the appropriate options
+
+        message(DEBUG "Reading SDK config from '${SDKCONFIG_DEFAULTS_FILE}'")
         file(READ
             "${SDKCONFIG_DEFAULTS_FILE}"
             SDKCONFIG_DEFAULT_CONTENTS)
@@ -589,12 +593,31 @@
             SDKCONFIG_DEFAULT_FINAL_CONTENTS
             "${SDKCONFIG_DEFAULT_CONTENTS}")

+        # now do the same for the series config file, if it exists
+        file(READ
+            "${SDKCONFIG_DEFAULTS_FILE}.${TARGET_SERIES_SHORT}"
+            SDKCONFIG_DEFAULT_SERIES_CONTENTS)
+
+        string(REPLACE
+            "CONFIG_ESP32_XTAL_FREQ_40"
+            "CONFIG_ESP32_XTAL_FREQ_26"
+            SDKCONFIG_DEFAULT_SERIES_FINAL_CONTENTS
+            "${SDKCONFIG_DEFAULT_SERIES_CONTENTS}")
+
         # need to temporarilly allow changes in source files
         set(CMAKE_DISABLE_SOURCE_CHANGES OFF)

         file(WRITE
             ${SDKCONFIG_DEFAULTS_FILE}
             ${SDKCONFIG_DEFAULT_FINAL_CONTENTS})
+
+        message(DEBUG "Wrote updated SDK config to '${SDKCONFIG_DEFAULTS_FILE}'")
+
+        file(WRITE
+            "${SDKCONFIG_DEFAULTS_FILE}.${TARGET_SERIES_SHORT}"
+            ${SDKCONFIG_DEFAULT_SERIES_FINAL_CONTENTS})
+
+        message(DEBUG "Wrote updated SDK config to '${SDKCONFIG_DEFAULTS_FILE}.${TARGET_SERIES_SHORT}'")

         set(CMAKE_DISABLE_SOURCE_CHANGES ON)
     else()


CMake: Disable C# support in static builds.

--- CMake/Modules/UrhoOptions.cmake
+++ CMake/Modules/UrhoOptions.cmake
@@ -115,7 +115,11 @@
 option(URHO3D_SYSTEMUI "Build SystemUI subsystem" ${URHO3D_DEVELOPER})
 option(URHO3D_PACKAGING "Package resources" ${URHO3D_RELEASE})
 option(URHO3D_FILEWATCHER "Watch filesystem for resource changes" ${URHO3D_DEVELOPER})
-option(URHO3D_CSHARP "Enable C# support" ${URHO3D_ENABLE_ALL})
+if (BUILD_SHARED_LIBS)
+    option(URHO3D_CSHARP "Enable C# support" ${URHO3D_ENABLE_ALL})
+else ()
+    set (URHO3D_CSHARP OFF)
+endif ()
 if (IOS OR ANDROID OR WEB)
     set (URHO3D_TASKS OFF)
 else ()


expands the maximum size of precompiled header

--- test/test-hryky-codebase.cmake
+++ test/test-hryky-codebase.cmake
@@ -27,6 +27,10 @@
 hryky_append_definitions(
 	src/test_bitset.cpp HRYKY_TEST_BIGOBJ=${HRYKY_TEST_BIGOBJ})

+if(MSVC)
+	add_definitions(-Zm138)
+endif()
+
 if(MSVC AND HRYKY_TEST_BIGOBJ)
 	set(ADDITIONAL_FLAGS /bigobj)
 	hryky_append_compile_flags(src/test_bitset.cpp ADDITIONAL_FLAGS)


BUG: likely someone forgot to add file VTKPatch.cmake to git

Temporary solution

--- SuperBuild/External_VTK.cmake
+++ SuperBuild/External_VTK.cmake
@@ -1,4 +1,3 @@
-
 # Make sure this file is included only once
 get_filename_component(CMAKE_CURRENT_LIST_FILENAME ${CMAKE_CURRENT_LIST_FILE} NAME_WE)
 if(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED)
@@ -174,11 +173,11 @@
   set(VTKPatchScript ${CMAKE_CURRENT_LIST_DIR}/VTKPatch.cmake)
   ExternalProject_Add_Step(${proj} VTKPatch
     COMMENT "get rid of obsolete C/CXX flags"
-    DEPENDEES download
-    DEPENDERS configure
-    COMMAND ${CMAKE_COMMAND}
-    -DVTKSource=<SOURCE_DIR>
-    -P ${VTKPatchScript}
+#    DEPENDEES download
+#    DEPENDERS configure
+#    COMMAND ${CMAKE_COMMAND}
+#    -DVTKSource=<SOURCE_DIR>
+#    -P ${VTKPatchScript}  # BA - likely someone forgot to add file VTKPatch.cmake to git
     )

   set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/vtk-5.10)


DOC: some documentation on GenerateExportHeaderCustom

--- CMake/GenerateExportHeaderCustom.cmake
+++ CMake/GenerateExportHeaderCustom.cmake
@@ -1,5 +1,8 @@
 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
 # file Copyright.txt or https://cmake.org/licensing for details.
+
+# Copyright (C) 2019 Centre National d'Etudes Spatiales (CNES)
+# - Added support of XXX_EXPORT_TEMPLATE and XXX_EXPORT_EXPLICIT_TEMPLATE macros

 #.rst:
 # GenerateExportHeader
@@ -65,7 +68,8 @@
 # The CMake fragment will generate a file in the
 # ``${CMAKE_CURRENT_BINARY_DIR}`` called ``somelib_export.h`` containing the
 # macros ``SOMELIB_EXPORT``, ``SOMELIB_NO_EXPORT``, ``SOMELIB_DEPRECATED``,
-# ``SOMELIB_DEPRECATED_EXPORT`` and ``SOMELIB_DEPRECATED_NO_EXPORT``.
+# ``SOMELIB_DEPRECATED_EXPORT``, ``SOMELIB_DEPRECATED_NO_EXPORT``,
+# ``SOMELIB_EXPORT_TEMPLATE`` and ``SOMELIB_EXPORT_EXPLICIT_TEMPLATE``.
 # They will be followed by content taken from the variable specified by
 # the ``CUSTOM_CONTENT_FROM_VARIABLE`` option, if any.
 # The resulting file should be installed with other headers in the library.
@@ -184,6 +188,10 @@
 # This function is deprecated.  Set the target properties
 # :prop_tgt:`CXX_VISIBILITY_PRESET <<LANG>_VISIBILITY_PRESET>` and
 # :prop_tgt:`VISIBILITY_INLINES_HIDDEN` instead.
+#
+# The macro ``SOMELIB_EXPORT_TEMPLATE`` should be used when declaring template
+# classes or functions. The macro ``SOMELIB_EXPORT_EXPLICIT_TEMPLATE`` should be
+# used when compiling explicit instanciations of template classes/functions.

 include(CheckCCompilerFlag)
 include(CheckCXXCompilerFlag)


SuperBuild: ensure no HDF4 package

SuperBuild: ensure no HDF4 package

--- SuperBuild/CMake/External_hdf4.cmake
+++ SuperBuild/CMake/External_hdf4.cmake
@@ -59,6 +59,7 @@
     -DHDF4_ENABLE_PARALLEL:BOOL=OFF
     -DHDF4_ENABLE_SZIP_SUPPORT:BOOL=OFF
     -DHDF4_ENABLE_Z_LIB_SUPPORT:BOOL=ON
+    -DHDF4_NO_PACKAGES:BOOL=ON
     -DHDF4_PACKAGE_EXTLIBS:BOOL=OFF
     -DHDF_ENABLE_LARGE_FILE:BOOL=ON
     -DHDF4_SRC_LIB_CORENAME:STRING=dfalt


PKG: regex replace for checking symlink have different behaviour

--- SuperBuild/CMake/PackageHelper.cmake
+++ SuperBuild/CMake/PackageHelper.cmake
@@ -448,8 +448,15 @@
         set(${result_var1} 1 PARENT_SCOPE)
         #Now find where the symlink is linked to.
         #Do a regex replace
-        string(REGEX REPLACE "_file_full_*.*symbolic.link.to."
-          "" symlinked_to ${file_ov})
+        if(UNIX)
+          if(APPLE)
+            string(REGEX REPLACE "_file_full_*.*symbolic.link.to."
+              "" symlinked_to ${file_ov})
+          else(APPLE)
+            string(REGEX REPLACE "_file_full_*.*symbolic.link.to.."
+              "" symlinked_to ${file_ov})
+          endif(APPLE)
+
         #Take out last character which is a single quote
         string(REPLACE "'" "" symlinked_to "${symlinked_to}")
         #strip for our own sanity


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2010)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 03)
+SET(KWSYS_DATE_STAMP_MONTH 04)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


added finding package of zlib

added finding package of zlib

--- FindQuaZip.cmake
+++ FindQuaZip.cmake
@@ -8,6 +8,7 @@
 get_filename_component(QuaZip_LIBRARY_DIR ${QuaZip_LIBRARY} PATH)

 FIND_PACKAGE(zlib REQUIRED)
+include_directories("${ZLIB_INCLUDE_DIR}")
 # include_directories("${QT_PLUGINS_DIR}/../src/3rdparty/zlib/")
 # Add include directories needed to use QtSOAP.
 INCLUDE_DIRECTORIES(${QuaZip_INCLUDE_DIR})


COMP: fix up External_DCMTK.cmake

COMP: fix up External_DCMTK.cmake

--- SuperBuild/External_DCMTK.cmake
+++ SuperBuild/External_DCMTK.cmake
@@ -101,8 +101,9 @@
   set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/cmake/dcmtk)
 else()
   if(${USE_SYSTEM_${extProjName}})
-    find_package(${extProjName} REQUIRED)
+    find_package(${extProjName} NO_MODULE)
     if(NOT ${extProjName}_DIR)
+      find_package(${extProjName})
       message(FATAL_ERROR "To use the system ${extProjName}, set ${extProjName}_DIR")
     endif()
     message("USING the system ${extProjName}, set ${extProjName}_DIR=${${extProjName}_DIR}")


fixed include dirs for source depends

fixed include dirs for source depends

--- WkDepends.cmake
+++ WkDepends.cmake
@@ -181,8 +181,15 @@
 				file( TO_CMAKE_PATH ${dir_name}/${${subprj_name}_INCLUDE_DIR} subprj_include_path)
 				file( TO_CMAKE_PATH ${CMAKE_CURRENT_BINARY_DIR}/${dir_name}/CMakeFiles subprj_include_wk_path)

+				#Gettin all additional include directories
+				set ( ${PROJECT_NAME}_${subprj_name}_INCLUDE_DIRS ${subprj_include_wk_path} ${subprj_include_path} )
+				foreach( path ${${subprj_name}_INCLUDE_DIRS} )
+					file( TO_CMAKE_PATH ${dir_name}/${path} cmake_path)
+					set ( ${PROJECT_NAME}_${subprj_name}_INCLUDE_DIRS ${${PROJECT_NAME}_${subprj_name}_INCLUDE_DIRS} ${cmake_path} )
+				endforeach (path)
+
 				#To match a binary dependency variable names :
-				set ( ${PROJECT_NAME}_${subprj_name}_INCLUDE_DIRS ${subprj_include_wk_path} ${subprj_include_path} CACHE PATH "${subprj_name} Headers directories")
+				set ( ${PROJECT_NAME}_${subprj_name}_INCLUDE_DIRS ${${PROJECT_NAME}_${subprj_name}_INCLUDE_DIRS} CACHE PATH "${subprj_name} Headers directories")
 				include_directories(${${PROJECT_NAME}_${subprj_name}_INCLUDE_DIRS})
 				message ( STATUS "== Source Dependency ${subprj_name} include : ${${PROJECT_NAME}_${subprj_name}_INCLUDE_DIRS} OK !")


CMake: removing unnecessary message on Windows

--- adm_local/cmake_files/FindPyQt4.cmake
+++ adm_local/cmake_files/FindPyQt4.cmake
@@ -111,7 +111,6 @@
 # TODO: should be done like Sphinx in KERNEL (i.e. generating a shell script)?

 IF(WIN32 AND NOT CYGWIN)
-  MESSAGE(WARNING "PyQt4 command was not tested under Win32")
   SET(PYQT_PYUIC_PATH set PYTHONPATH=${PYQT_PYTHONPATH};${SIP_PYTHONPATH};%PYTHONPATH% && ${PYQT_PYUIC_EXECUTABLE})
   SET(PYQT_PYRCC_PATH set PYTHONPATH=${PYQT_PYTHONPATH};${SIP_PYTHONPATH};%PYTHONPATH% && ${PYQT_PYRCC_EXECUTABLE})
 ELSE()


force c++11 in cmake

force c++11 in cmake

--- build/cmake/DefinePlatformSpecifc.cmake
+++ build/cmake/DefinePlatformSpecifc.cmake
@@ -97,21 +97,14 @@
 endif()

 # C++ Language Level
-set(CXX_LANGUAGE_LEVEL "C++${CMAKE_CXX_STANDARD}")
-if (CMAKE_CXX_STANDARD_REQUIRED)
-  string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [compiler must support it]")
-else()
-  string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [fallback to earlier if compiler does not support it]")
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND NOT MINGW)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-variadic-macros -Wno-long-long")
 endif()
-if (CMAKE_CXX_EXTENSIONS)
-  string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [with compiler-specific extensions]")
-else()
-  if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND NOT MINGW)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-variadic-macros -Wno-long-long")
-  endif()
-  if ((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND NOT MINGW)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-long-long")
-  endif()
+if ((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND NOT MINGW)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-long-long")
 endif()

 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")


edit installation path of libclangmm

edit installation path of libclangmm

--- juci/cmake/Modules/FindLibClangmm.cmake
+++ juci/cmake/Modules/FindLibClangmm.cmake
@@ -10,11 +10,11 @@
 find_package(PkgConfig)

 find_path(LCL_INCLUDE_DIR clangmm.h
-  HINTS  "/usr/lib/libclangmm/include/"
+  HINTS  "/usr/local/lib/libclangmm/include/"
   )

 find_library(LCL_LIBRARY NAMES clangmm
-  HINTS  "/usr/lib/libclangmm/"
+  HINTS  "/usr/local/lib/libclangmm/"
   )

 set(LCL_LIBRARIES ${LCL_LIBRARY} )


Remove -g from standard build flags

Remove -g from standard build flags

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -9,8 +9,8 @@

 if (UNIX)
   if (CMAKE_COMPILER_IS_GNUCC OR COMPILER_IS_CLANG)
-    # add_compile_options(-g -Wall -Wextra -Wunused) # only since CMake 2.8.12, so...
-    add_definitions(-g -Wall -Wextra -Wunused)
+    # add_compile_options(-Wall -Wextra -Wunused) # only since CMake 2.8.12, so...
+    add_definitions(-Wall -Wextra -Wunused)

     set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Weffc++")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")


ORC-1092: Upgrade LZ4 to version 1.9.3 (#1012)

### What changes were proposed in this pull request?

This PR aims to upgrade LZ4 to version 1.9.3.

### Why are the changes needed?

This will bring the latest improvements and bug fixes.
- https://github.com/lz4/lz4/releases/tag/v1.9.3

### How was this patch tested?

Pass the CIs.

--- cmake_modules/ThirdpartyToolchain.cmake
+++ cmake_modules/ThirdpartyToolchain.cmake
@@ -10,7 +10,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-set(LZ4_VERSION "1.7.5")
+set(LZ4_VERSION "1.9.3")
 set(SNAPPY_VERSION "1.1.7")
 set(ZLIB_VERSION "1.2.11")
 set(GTEST_VERSION "1.8.0")
@@ -237,10 +237,10 @@
   endif ()

   if (CMAKE_VERSION VERSION_GREATER "3.7")
-    set(LZ4_CONFIGURE SOURCE_SUBDIR "contrib/cmake_unofficial" CMAKE_ARGS ${LZ4_CMAKE_ARGS})
+    set(LZ4_CONFIGURE SOURCE_SUBDIR "build/cmake" CMAKE_ARGS ${LZ4_CMAKE_ARGS})
   else()
     set(LZ4_CONFIGURE CONFIGURE_COMMAND "${THIRDPARTY_CONFIGURE_COMMAND}" ${LZ4_CMAKE_ARGS}
-                                        "${CMAKE_CURRENT_BINARY_DIR}/lz4_ep-prefix/src/lz4_ep/contrib/cmake_unofficial")
+                                        "${CMAKE_CURRENT_BINARY_DIR}/lz4_ep-prefix/src/lz4_ep/build/cmake")
   endif()

   ExternalProject_Add(lz4_ep


refine config.cmake

refine config.cmake

--- libzeug-config.cmake
+++ libzeug-config.cmake
@@ -61,7 +61,7 @@
 		PATHS ${HINT_PATHS}
 		DOC "The ${LIB_NAME} debug library")

-	set(${LIB_NAME}_LIBRARIES general ${${LIB_NAME_UPPER}_LIBRARY} debug ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
+	set(${LIB_NAME_UPPER}_LIBRARIES optimized ${${LIB_NAME_UPPER}_LIBRARY} debug ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})

 endmacro()


Fixed order of libraries so that expat symbols are resolved.

--- copasi/CMakeConsoleApp.cmake
+++ copasi/CMakeConsoleApp.cmake
@@ -8,9 +8,9 @@
 # and MKL,CLAPACK LAPACK on non-apple
 # for apple we set the Accelerate framework

-set(SE_LIBS ${EXPAT_LIBRARY} ${SE_LIBS})
-set(SE_LIBS ${RAPTOR_LIBRARY} ${SE_LIBS})
-set(SE_LIBS ${LIBSBML_LIBRARY} ${SE_LIBS})
+set(SE_LIBS ${SE_LIBS} ${RAPTOR_LIBRARY})
+set(SE_LIBS ${SE_LIBS} ${LIBSBML_LIBRARY})
+set(SE_LIBS ${SE_LIBS} ${EXPAT_LIBRARY})

 if (APPLE)
    FIND_LIBRARY(ACCELERATE_LIBRARY Accelerate REQUIRED)


Added an option to quiet conan's output

Added an option to quiet conan's output

--- conan.cmake
+++ conan.cmake
@@ -259,7 +259,7 @@

 macro(parse_arguments)
-  set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS NO_OUTPUT_DIRS)
+  set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS NO_OUTPUT_DIRS OUTPUT_QUIET)
   set(oneValueArgs CONANFILE DEBUG_PROFILE RELEASE_PROFILE RELWITHDEBINFO_PROFILE MINSIZEREL_PROFILE PROFILE ARCH BUILD_TYPE INSTALL_FOLDER)
   set(multiValueArgs REQUIRES OPTIONS IMPORTS SETTINGS BUILD CONAN_COMMAND GENERATORS)
   cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
@@ -326,6 +326,10 @@

     string (REPLACE ";" " " _conan_args "${conan_args}")
     message(STATUS "Conan executing: ${conan_command} ${_conan_args}")
+
+    if(ARGUMENTS_OUTPUT_QUIET)
+      set(OUTPUT_CONTROL OUTPUT_QUIET)
+    endif()

     execute_process(COMMAND ${conan_command} ${conan_args}
                      RESULT_VARIABLE return_code


nucleo_f070rb: Add JLink tools for debug and download support

Segger provide a firmware makes the ST-LINK on-board compatible with
J-Link OB, allowing users to take advantage of most J-Link features
such as RTT(Real Time Transfer).

Signed-off-by: qianfan Zhao <0d01fab1932da5a147025f14dd5829cf5bf10d4d@163.com>

--- boards/arm/nucleo_f070rb/board.cmake
+++ boards/arm/nucleo_f070rb/board.cmake
@@ -1 +1,8 @@
-include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
+set_ifndef(STLINK_FW stlink)
+
+if(STLINK_FW STREQUAL jlink)
+  board_runner_args(jlink "--device=stm32f070rb" "--speed=4000")
+  include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
+elseif(STLINK_FW STREQUAL stlink)
+  include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
+endif()


Typo.

Typo.

	* build-aux/cmake/modules/Gostai.cmake: In the doc.

--- build-aux/cmake/modules/Gostai.cmake
+++ build-aux/cmake/modules/Gostai.cmake
@@ -1,4 +1,4 @@
-# A collection of macro used to create Gostai executable and libraries
+# A collection of macros used to create Gostai executables and libraries.

 if(NOT GOSTAI_CMAKE_GUARD)
 set(GOSTAI_CMAKE_GUARD TRUE)


Set default optimization targets

Set default optimization targets

--- toolchain/Platform/Generic-chc12.cmake
+++ toolchain/Platform/Generic-chc12.cmake
@@ -67,8 +67,8 @@
 #
 SET (CMAKE_C_FLAGS_INIT                             "${CMAKE_C_FLAGS_INIT} -Cc")
 SET (CMAKE_C_FLAGS_DEBUG_INIT                       "${CMAKE_C_FLAGS_DEBUG_INIT}")
-SET (CMAKE_C_FLAGS_MINSIZEREL_INIT                  "${CMAKE_C_FLAGS_MINSIZEREL_INIT}")
-SET (CMAKE_C_FLAGS_RELEASE_INIT                     "${CMAKE_C_FLAGS_RELEASE_INIT}")
+SET (CMAKE_C_FLAGS_MINSIZEREL_INIT                  "${CMAKE_C_FLAGS_MINSIZEREL_INIT} -Os")
+SET (CMAKE_C_FLAGS_RELEASE_INIT                     "${CMAKE_C_FLAGS_RELEASE_INIT} -Ot")
 SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT              "${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}")
 SET (CMAKE_C_STANDARD_LIBRARIES_INIT                "${CMAKE_C_STANDARD_LIBRARIES_INIT}")

@@ -77,8 +77,8 @@
 #
 SET (CMAKE_CXX_FLAGS_INIT                           "${CMAKE_CXX_FLAGS_INIT} -Cc")
 SET (CMAKE_CXX_FLAGS_DEBUG_INIT                     "${CMAKE_CXX_FLAGS_DEBUG_INIT}")
-SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT                "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT}")
-SET (CMAKE_CXX_FLAGS_RELEASE_INIT                   "${CMAKE_CXX_FLAGS_RELEASE_INIT}")
+SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT                "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -Os")
+SET (CMAKE_CXX_FLAGS_RELEASE_INIT                   "${CMAKE_CXX_FLAGS_RELEASE_INIT} -Ot")
 SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT            "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}")
 SET (CMAKE_CXX_STANDARD_LIBRARIES_INIT              "${CMAKE_CXX_STANDARD_LIBRARIES_INIT}")


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


bundle: update to bundle with chainloader

--- cmake/cross_compiled_libraries.cmake
+++ cmake/cross_compiled_libraries.cmake
@@ -19,7 +19,7 @@
 	ExternalProject_Add(PrecompiledLibraries
 			    PREFIX precompiled
 			    URL https://github.com/hioa-cs/IncludeOS/releases/download/v0.12.0-rc.2/IncludeOS_dependencies_v0-12-0_musl_libunwind_threaded.tar.gz
-			    URL_HASH SHA1=9f3f8da09c1f15bdc2a7d3feea665a31cb9fe889
+			    URL_HASH SHA1=5a9daff15ed7b0fcd2a96f3c07ebef5aabf93371
 			    CONFIGURE_COMMAND ""
 			    BUILD_COMMAND ""
 			    UPDATE_COMMAND ""


port-to-0.9: Remove deprecated Find file

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


armclang: warn on non-Ninja generator for CMake 3.20.

When using ARMClang linker and scatter files (armlink) then all
libraries are linked as object libraries using `$<TARGET_OBJECTS:lib>`.

CMake version 3.20 only has limited support for such linking:
> Referencing $<TARGET_OBJECTS> in target_link_libraries calls worked
> in versions of CMake prior to 3.21 for some cases, but was not fully
> supported.

One of those cases that do not work is Unix Makefiles generators.

As only Ninja is currently verified to work, this commit will check the
CMake version in use and the generator, and if CMake version <=3.21 is
used with non-Ninja generator then an error is raised informing user
to either use Ninja generator or update CMake.

As the Ninja generator has been confirmed to work as expected, then that
generator is accepted with CMake 3.20 and older.

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

--- cmake/toolchain/armclang/generic.cmake
+++ cmake/toolchain/armclang/generic.cmake
@@ -3,6 +3,15 @@
 set_ifndef(ARMCLANG_TOOLCHAIN_PATH "$ENV{ARMCLANG_TOOLCHAIN_PATH}")
 set(ARMCLANG_TOOLCHAIN_PATH ${ARMCLANG_TOOLCHAIN_PATH} CACHE PATH "armclang tools install directory")
 assert(ARMCLANG_TOOLCHAIN_PATH "ARMCLANG_TOOLCHAIN_PATH is not set")
+
+if(${CMAKE_VERSION} VERSION_LESS 3.21
+   AND NOT ${CMAKE_GENERATOR} STREQUAL Ninja
+)
+  message(FATAL_ERROR "ARMClang Toolchain and '${CMAKE_GENERATOR}' generator "
+    "doesn't work properly for target object files on CMake version: "
+    "${CMAKE_VERSION}. Use the 'Ninja' generator or update to CMake >= 3.21."
+  )
+endif()

 if(NOT EXISTS ${ARMCLANG_TOOLCHAIN_PATH})
   message(FATAL_ERROR "Nothing found at ARMCLANG_TOOLCHAIN_PATH: '${ARMCLANG_TOOLCHAIN_PATH}'")


[ament_cmake_uncrustify] Add file exclude support (#330)

In the `ament_uncrustify` CMake function, the optional list
argument `EXCLUDE` can now be used as an exclusion specifier.

Signed-off-by: Abrar Rahman Protyasha <6764efe3f81be0ed6408c793ffae84bd7fbe557a@u.rochester.edu>

--- ament_cmake_uncrustify/cmake/ament_uncrustify.cmake
+++ ament_cmake_uncrustify/cmake/ament_uncrustify.cmake
@@ -31,13 +31,15 @@
 # :param LANGUAGE: a specific language argument for uncrustify instead of
 #   deriving the language from the file extension, either 'C' or 'C++'
 # :type LANGUAGE: string
+# :param EXCLUDE: an optional list of exclude files or directories for uncrustify
+# :type EXCLUDE: list
 # :param ARGN: the files or directories to check
 # :type ARGN: list of strings
 #
 # @public
 #
 function(ament_uncrustify)
-  cmake_parse_arguments(ARG "" "CONFIG_FILE;LANGUAGE;MAX_LINE_LENGTH;TESTNAME" "" ${ARGN})
+  cmake_parse_arguments(ARG "" "CONFIG_FILE;LANGUAGE;MAX_LINE_LENGTH;TESTNAME" "EXCLUDE" ${ARGN})
   if(NOT ARG_TESTNAME)
     set(ARG_TESTNAME "uncrustify")
   endif()
@@ -59,6 +61,9 @@
     string(TOUPPER ${ARG_LANGUAGE} ARG_LANGUAGE)
     list(APPEND cmd "--language" "${ARG_LANGUAGE}")
   endif()
+  if(ARG_EXCLUDE)
+    list(APPEND cmd "--exclude" "${ARG_EXCLUDE}")
+  endif()
   list(APPEND cmd ${ARG_UNPARSED_ARGUMENTS})

   file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/ament_uncrustify")


[Config] Added other versions of Boost.Python

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

 # ~~~~~~~~~~ ICU ~~~~~~~~~
 macro (get_icu)
-  #cmake_policy(SET CMP0074 NEW)
+  cmake_policy (SET CMP0074 NEW)
   unset (_required_version)
   if (${ARGC} GREATER 0)
     set (_required_version ${ARGV0})
@@ -606,7 +606,7 @@
   set (Boost_USE_STATIC_RUNTIME OFF)
   set (BOOST_REQUIRED_COMPONENTS_FOR_LIB
     date_time random iostreams serialization filesystem system
-	locale python regex)
+	locale python python27 python34 python37 regex)
   set (BOOST_REQUIRED_COMPONENTS_FOR_BIN program_options)
   set (BOOST_REQUIRED_COMPONENTS_FOR_TST unit_test_framework)
   set (BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS_FOR_LIB}


removed -fasm-blocks compile flag under ICC to fix Qt issue on Apple.

--- cmake/icc.cmake
+++ cmake/icc.cmake
@@ -25,7 +25,7 @@

 SET(CMAKE_CXX_COMPILER "icpc")
 SET(CMAKE_C_COMPILER "icc")
-SET(CMAKE_CXX_FLAGS "-Wall -fPIC -no-ansi-alias -static-intel -fasm-blocks -openmp")
+SET(CMAKE_CXX_FLAGS "-Wall -fPIC -no-ansi-alias -static-intel -openmp")
 SET(CMAKE_CXX_FLAGS_DEBUG          "-DDEBUG  -g")
 SET(CMAKE_CXX_FLAGS_RELEASE        "-DNDEBUG    -O3 -no-ansi-alias -restrict -fp-model fast -fimf-precision=low -no-prec-div -no-prec-sqrt -fma -no-inline-max-total-size -inline-factor=200 ")
 SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DNDEBUG -g -O3 -no-ansi-alias -restrict -fp-model fast -fimf-precision=low -no-prec-div -no-prec-sqrt  -fma  -no-inline-max-total-size -inline-factor=200")


Python enum generation works in Linux

Python enum generation works in Linux

--- cmake/Modules/PKMNsimMisc.cmake
+++ cmake/Modules/PKMNsimMisc.cmake
@@ -16,8 +16,14 @@
             COMMAND ${FINDSTR_EXECUTABLE} /N "${value}" "${filename}"
             OUTPUT_VARIABLE line_num_list
         )
-        # RESULT_VARIABLE gets line, which has line number and line
-        STRING(REPLACE ":" ";" line_num_list ${line_num_list})
-        LIST(GET line_num_list 0 LINE_NUMBER)
+    ELSE()
+        FIND_PROGRAM(GREP_EXECUTABLE grep ENV PATH)
+        EXECUTE_PROCESS(
+            COMMAND ${GREP_EXECUTABLE} -n "${value}" "${filename}"
+            OUTPUT_VARIABLE line_num_list
+        )
     ENDIF(WIN32)
-endmacro(GET_LINE_NUMBER)+    # OUTPUT_VARIABLE gets line, which has line number and line
+    STRING(REPLACE ":" ";" line_num_list ${line_num_list})
+    LIST(GET line_num_list 0 LINE_NUMBER)
+endmacro(GET_LINE_NUMBER)


Support of EMBEDDED keyword

Support of EMBEDDED keyword

--- cmake/MyPackageDependency.cmake
+++ cmake/MyPackageDependency.cmake
@@ -1,6 +1,6 @@
 MACRO (MYPACKAGEDEPENDENCY packageDepend packageDependSourceDir)
   #
-  # Optional argument: TESTS, LIBS, EXES
+  # Optional argument: TESTS, LIBS, EXES, SYSTEM, EMBEDDED
   #
   IF (ALL_IN_ONE)
     SET (_ALL_IN_ONE TRUE)
@@ -39,6 +39,15 @@
         MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} system search")
       ENDIF ()
       SET (_ALL_IN_ONE FALSE)
+    ENDIF ()
+    IF (${_var} STREQUAL EMBEDDED)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} embedded mode")
+      ENDIF ()
+      SET (_ALL FALSE)
+      SET (_LIBS TRUE)
+      SET (_TESTS TRUE)
+      SET (_ALL_IN_ONE TRUE)
     ENDIF ()
   ENDFOREACH ()
   IF (_ALL)


Fixing Aravis support compilation issue

Fixing Aravis support compilation issue

--- cmake/OpenCVFindLibsVideo.cmake
+++ cmake/OpenCVFindLibsVideo.cmake
@@ -127,13 +127,18 @@
 # --- Aravis SDK ---
 ocv_clear_vars(HAVE_ARAVIS_API)
 if(WITH_ARAVIS)
-  find_path(ARAVIS_INCLUDE_PATH "arv.h"
-            PATHS /usr/local /var /opt /usr ENV ProgramFiles ENV ProgramW6432
-            PATH_SUFFIXES include "aravis-0.6" "aravis-0.4"
-            DOC "The path to Aravis SDK headers")
-  find_library(ARAVIS_LIBRARIES NAMES "aravis-0.6" "aravis-0.4" )
-  if(ARAVIS_LIBRARIES AND ARAVIS_INCLUDE_PATH)
-    set(HAVE_ARAVIS_API TRUE)
+  check_module(glib-2.0 HAVE_ARAVIS_GLIB VIDEOIO)
+  if(HAVE_ARAVIS_GLIB)
+    find_path(ARAVIS_INCLUDE_PATH "arv.h"
+              PATHS /usr/local /var /opt /usr ENV ProgramFiles ENV ProgramW6432
+              PATH_SUFFIXES include "aravis-0.6" "aravis-0.4"
+              DOC "The path to Aravis SDK headers")
+    find_library(ARAVIS_LIBRARIES NAMES "aravis-0.6" "aravis-0.4" )
+    if(ARAVIS_LIBRARIES AND ARAVIS_INCLUDE_PATH)
+      set(HAVE_ARAVIS_API TRUE)
+    endif()
+  else()
+    message("Can not build Aravis support without glib2")
   endif()
 endif(WITH_ARAVIS)


Suppress debug info (Stefan)

Suppress debug info (Stefan)

--- cmake/modules/ALICEMacros.cmake
+++ cmake/modules/ALICEMacros.cmake
@@ -42,7 +42,7 @@

 # Adds an AliRoot library as a target

-  Message(STATUS Debug ${LIB})
+  # Message(STATUS Debug ${LIB})
   Set(_path)
   List(LENGTH SRCS _len)
   If(_len GREATER 0)
@@ -62,10 +62,10 @@
     Endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_path}/${LIB}LinkDef.h)
   Endif(_path)

-  Message(STATUS Debug - ${CMAKE_CURRENT_SOURCE_DIR} - ${LIB} - ${LDEF})
+  # Message(STATUS Debug - ${CMAKE_CURRENT_SOURCE_DIR} - ${LIB} - ${LDEF})

   Set(DICT)
-  Message(STATUS Debug ${LDEF})
+  # Message(STATUS Debug ${LDEF})
   If(LDEF)
 # even with no cxx files, one may want to build an empty lib as a placeholder
 # in AliRoot this is signalled by the existence of an (empty) ${LIB}LinkDef.h
@@ -189,7 +189,7 @@
 # Adds an AliRoot executable as a target

   String(REGEX REPLACE "(.*)exe" "\\1" executable_name "${BIN}")
-  MESSAGE("EXECUTABLE: ${executable_name}")
+  # MESSAGE("EXECUTABLE: ${executable_name}")

   Add_Executable(${BIN} ${SRCS})
   Target_Link_Libraries(${BIN} ${ROOT_LIBRARIES} ${LIBS})


Typo

Typo

svn path=/trunk/KDE/kdenetwork/cmake/modules/FindDecibel.cmake; revision=675353

--- cmake/modules/FindDecibel.cmake
+++ cmake/modules/FindDecibel.cmake
@@ -49,7 +49,7 @@
   endif (NOT Decibel_FIND_QUIETLY)
 else (DECIBEL_FOUND)
   if (Decibel_FIND_REQUIRED)
-    message(FATALERROR "Could NOT find Decibel")
+    message(FATAL_ERROR "Could NOT find Decibel")
   endif (Decibel_FIND_REQUIRED)
 endif (DECIBEL_FOUND)


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -22,6 +22,7 @@
 Name[sr@ijekavianlatin]=Brzo glasništvo
 Name[sr@latin]=Brzo glasništvo
 Name[sv]=Direktmeddelandekontakter
+Name[tr]=Anında Mesajlaşma
 Name[ug]=مۇڭداشقۇ
 Name[uk]=Миттєвий обмін повідомленнями
 Name[x-test]=xxInstant Messagingxx
@@ -50,6 +51,7 @@
 Comment[sr@ijekavianlatin]=Započnite ćaskanje preko IM kontakta ili izmenite svoje IM stanje
 Comment[sr@latin]=Započnite ćaskanje preko IM kontakta ili izmenite svoje IM stanje
 Comment[sv]=Börja chatta med någon direktmeddelandekontakt eller ändra din direktmeddelandestatus
+Comment[tr]=IM kişilerinizden biriyle sohbete başlayın veya IM durumunuzu değiştirin
 Comment[uk]=Почати спілкування з будь-яким з ваших контактів або змінити ваш запис стану у системах обміну повідомленнями
 Comment[x-test]=xxStart a chat with any of your IM contacts or change your IM statusxx
 Comment[zh_CN]=与任意您的即时通讯联系人开始聊天或修改您的状态


Fix target name

Fix target name

--- cmake/ClangTidy.cmake
+++ cmake/ClangTidy.cmake
@@ -131,8 +131,8 @@
     # COMMAND ${CLANG_TIDY_COMMAND} $<JOIN:$<TARGET_PROPERTY:${TARGET},SOURCES>, >
     foreach(SOURCE ${SOURCES})
         if(NOT "${SOURCE}" MATCHES "(h|hpp|hxx)$")
+            string(MAKE_C_IDENTIFIER "${SOURCE}" tidy_file)
             set(tidy_target tidy-target-${TARGET}-${tidy_file})
-            string(MAKE_C_IDENTIFIER "${SOURCE}" tidy_file)
             add_custom_target(${tidy_target}
                 COMMAND ${CLANG_TIDY_COMMAND} ${SOURCE} "-export-fixes=${CLANG_TIDY_FIXIT_DIR}/${TARGET}-${tidy_file}.yaml"
                 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}


fixing regression on Linux build process

--- cmake/EmbedGlfw.cmake
+++ cmake/EmbedGlfw.cmake
@@ -23,7 +23,7 @@

 add_library(glfw STATIC IMPORTED)

-set_property(TARGET glfw PROPERTY IMPORTED_LOCATION "${BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}glfw3${CMAKE_STATIC_LIBRARY_SUFFIX}")
+set_property(TARGET glfw PROPERTY IMPORTED_LOCATION "${BINARY_DIR}/src/${CMAKE_STATIC_LIBRARY_PREFIX}glfw3${CMAKE_STATIC_LIBRARY_SUFFIX}")
 # Handling multi configurations for MSVC
 foreach( CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES} )
   string(TOUPPER ${CONFIG_TYPE} UPPER_CONFIG_TYPE)


Correction FindCEGUI

Correction FindCEGUI

--- cmake/FindCEGUI.cmake
+++ cmake/FindCEGUI.cmake
@@ -61,8 +61,8 @@
   set(CEGUI_PREFIX_GUESSES
     /opt/cegui
     /opt/CEGUI
-    /usr/lib
-    /usr/local/lib
+    /usr
+    /usr/local
     $ENV{HOME}/cegui
     $ENV{HOME}/CEGUI
   )


Some blanks at the end of the line eliminated.

--- cmake/FindIconv.cmake
+++ cmake/FindIconv.cmake
@@ -55,7 +55,7 @@
         string(REGEX REPLACE "0*([1-9][0-9]*).*" "\\1" ICONV_VERSION_MAJOR "${ICONV_VERSION_MAJOR}")
         string(REGEX REPLACE "0*([1-9][0-9]*).*" "\\1" ICONV_VERSION_MINOR "${ICONV_VERSION_MINOR}")
         string(REGEX REPLACE "0*([1-9][0-9]*).*" "\\1" ICONV_VERSION_PATCH "${ICONV_VERSION_PATCH}")
-
+
         set(ICONV_VERSION_STRING "${ICONV_VERSION_MAJOR}.${ICONV_VERSION_MINOR}")
         if(ICONV_VERSION_PATCH)
             set(ICONV_VERSION_STRING "${ICONV_VERSION_STRING}.${ICONV_VERSION_PATCH}")


fix typo in FindTaucs.cmake

fix typo in FindTaucs.cmake

--- cmake/FindTaucs.cmake
+++ cmake/FindTaucs.cmake
@@ -18,7 +18,7 @@
   find_library(TAUCS_LIBRARIES taucs PATHS $ENV{TAUCSDIR} ${LIB_INSTALL_DIR})

   if(TAUCS_LIBRARIES)
-    set(TAUCS_LIBRARIES ${TAUCS_LIBRARIES} ${LAPACK_LIBRARY})
+    set(TAUCS_LIBRARIES ${TAUCS_LIBRARIES} ${LAPACK_LIBRARIES})
   endif(TAUCS_LIBRARIES)

 endif(LAPACK_FOUND)


[sanitizer] Max out allowed macOS deployment targets to 10.9

It's not a good idea to build the sanitizers with e.g. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12, because some deprecated functions that we intercept will cause build errors. Let's limit the allowed deployment targets to 10.9 (which is the default anyway), and warn when it's set above.

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

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -217,7 +217,11 @@
       set(SANITIZER_MIN_OSX_VERSION 10.9)
     endif()
     if(SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.7")
-      message(FATAL_ERROR "Too old OS X version: ${SANITIZER_MIN_OSX_VERSION}")
+      message(FATAL_ERROR "macOS deployment target '${SANITIZER_MIN_OSX_VERSION}' is too old.")
+    endif()
+    if(SANITIZER_MIN_OSX_VERSION VERSION_GREATER "10.9")
+      message(WARNING "macOS deployment target '${SANITIZER_MIN_OSX_VERSION}' is too new, setting to '10.9' instead.")
+      set(SANITIZER_MIN_OSX_VERSION 10.9)
     endif()
   endif()


Adds Boost 1.68.0 download support.

Adds Boost 1.68.0 download support.

--- cmake/ext/Boost.cmake
+++ cmake/ext/Boost.cmake
@@ -1,8 +1,8 @@
 #---------------------------------------------------------------------------
 # Get and build boost, if it is not already present

-set(GEARSHIFFT_EXT_BOOST_VERSION "1.66.0" CACHE STRING "Boost version to be built.")
-set_property(CACHE GEARSHIFFT_EXT_BOOST_VERSION PROPERTY STRINGS "1.65.1;1.66.0")
+set(GEARSHIFFT_EXT_BOOST_VERSION "1.68.0" CACHE STRING "Boost version to be built.")
+set_property(CACHE GEARSHIFFT_EXT_BOOST_VERSION PROPERTY STRINGS "1.65.1;1.66.0;1.68.0")
 set(BOOST_ROOT ${GEARSHIFFT_SUPERBUILD_EXT_DIR}/boost/ CACHE PATH "'Boost' root directory")

 find_path(Boost_INCLUDE_DIR
@@ -26,7 +26,9 @@

   # md5 hashes of tar.gz files
   if( UNIX OR APPLE )
-    if(GEARSHIFFT_EXT_BOOST_VERSION MATCHES "1.66.0")
+    if(GEARSHIFFT_EXT_BOOST_VERSION MATCHES "1.68.0")
+      set(Boost_hash "5d8b4503582fffa9eefdb9045359c239")
+    elseif(GEARSHIFFT_EXT_BOOST_VERSION MATCHES "1.66.0")
       set(Boost_hash "d275cd85b00022313c171f602db59fc5")
     elseif(GEARSHIFFT_EXT_BOOST_VERSION MATCHES "1.65.1")
       set(Boost_hash "ee64fd29a3fe42232c6ac3c419e523cf")


update of gsDataDir

update of gsDataDir

--- cmake/gsDataDir.cmake
+++ cmake/gsDataDir.cmake
@@ -7,10 +7,4 @@
 ######################################################################

 # Data directory
-if (CMAKE_CXX_COMPILER MATCHES ".*em[+][+]")
-	set(GISMO_DATA_DIR "filedata/" )
-	message("GISMO_DATA_DIR set to relative path '${GISMO_DATA_DIR}'")
-	set(GISMO_ORIG_DATA_DIR "${PROJECT_SOURCE_DIR}/filedata/")
-else()
-	set (GISMO_DATA_DIR   "${PROJECT_SOURCE_DIR}/filedata/")
-endif()
+set (GISMO_DATA_DIR   "${PROJECT_SOURCE_DIR}/filedata/")


added info of used compiler when cmake (re)runs

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

--- cmake/gsOptions.cmake
+++ cmake/gsOptions.cmake
@@ -57,6 +57,8 @@
 message ("  CMAKE_BUILD_TYPE        ${CMAKE_BUILD_TYPE}")
 message ("  GISMO_COEFF_TYPE        ${GISMO_COEFF_TYPE}")
 message ("  GISMO_BUILD_LIB         ${GISMO_BUILD_LIB}")
+message ("  CMAKE_C_COMPILER        ${CMAKE_C_COMPILER}")
+message ("  CMAKE_CXX_COMPILER      ${CMAKE_CXX_COMPILER}")
 message ("  CMAKE_CXX_STANDARD      ${CMAKE_CXX_STANDARD}")

 if (${GISMO_BUILD_PCH})


[CMake] Undo some changes made for swiftdt.

--- stdlib/cmake/modules/AddSwiftStdlib.cmake
+++ stdlib/cmake/modules/AddSwiftStdlib.cmake
@@ -2240,7 +2240,7 @@
 #
 #   [ARCHITECTURE architecture]
 #     Architecture to build for.
-function(_add_swift_target_executable_single module_name name)
+function(_add_swift_target_executable_single name)
   set(options)
   set(single_parameter_options
     ARCHITECTURE
@@ -2298,7 +2298,7 @@
       SWIFTEXE_SINGLE_SOURCES SWIFTEXE_SINGLE_EXTERNAL_SOURCES ${name}
       DEPENDS
         ${SWIFTEXE_SINGLE_DEPENDS}
-      MODULE_NAME ${module_name}
+      MODULE_NAME ${name}
       SDK ${SWIFTEXE_SINGLE_SDK}
       ARCHITECTURE ${SWIFTEXE_SINGLE_ARCHITECTURE}
       COMPILE_FLAGS ${SWIFTEXE_SINGLE_COMPILE_FLAGS}
@@ -2405,7 +2405,6 @@
           "-${SWIFT_SDK_${sdk}_LIB_SUBDIR}"
           SWIFTEXE_TARGET_DEPENDS_with_suffix)
       _add_swift_target_executable_single(
-          ${name}
           ${VARIANT_NAME}
           ${SWIFTEXE_TARGET_SOURCES}
           DEPENDS ${SWIFTEXE_TARGET_DEPENDS_with_suffix}


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


--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -20,7 +20,6 @@
 Name[el]=VLC
 Name[en_GB]=VLC
 Name[es]=VLC
-Name[et]=VLC
 Name[eu]=VLC
 Name[fa]=وی‌ال‌سی (VLC)
 Name[fi]=VLC
@@ -67,7 +66,6 @@
 Comment[el]=Σύστημα υποστήριξης Phonon VLC
 Comment[en_GB]=Phonon VLC backend
 Comment[es]=Motor VLC para Phonon
-Comment[et]=Phononi VLC taustaprogramm
 Comment[eu]=Phonon-en VLC bizkarraldekoa
 Comment[fa]=پسانه‌ی وی‌ال‌سی برای فنون (Phonon VLC backend)
 Comment[fi]=Phonon VLC -taustajärjestelmä


checkout openthreads from svn rather than using full Openscenegraph source

--- CMake/External_openthread.cmake
+++ CMake/External_openthread.cmake
@@ -16,8 +16,8 @@

   ExternalProject_Add(${proj}
     PREFIX ${proj}
-    URL "http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip"
-    URL_MD5 4980f8692712a24d4c99f363f80c6814
+    SVN_REPOSITORY "http://svn.openscenegraph.org/osg/OpenThreads/tags/OpenThreads-2.3.0/"
+    SVN_REVISION -r 14667
     BINARY_DIR ${OPENTHREAD_SB_BUILD_DIR}
     INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
     CMAKE_CACHE_ARGS