Initial check for java compiler so we can disable the bindings if it
is not present.

svn path=/trunk/; revision=6783

--- cmake/modules/java.cmake
+++ cmake/modules/java.cmake
@@ -23,6 +23,19 @@

 # Options to enable Java bindings
 OPTION(ENABLE_java "Enable Java bindings" ON)
+
+IF (ENABLE_java)
+
+# Check for java compiler
+INCLUDE(CMakeDetermineJavaCompiler)
+
+IF (CMAKE_Java_COMPILER MATCHES "NOTFOUND$")
+  MESSAGE(STATUS "WARNING: "
+    "java compiler not found. Disabling java bindings")
+  SET(ENABLE_java OFF CACHE BOOL "Enable Java bindings" FORCE)
+ENDIF (CMAKE_Java_COMPILER MATCHES "NOTFOUND$")
+
+ENDIF (ENABLE_java)

 IF (ENABLE_java)


working out linking dependencies with the rest of the world

git-svn-id: cf55bc44fb097054a32fc70455a459c940dbbffc@7807 c9849af7-e679-4ec6-a44e-fc146a885bd3

--- cmake/new_lcmtypes.cmake
+++ cmake/new_lcmtypes.cmake
@@ -30,10 +30,12 @@
 #             unset(LCMTYPES_SEARCHDIR)
 #          after include(lcmtypes.cmake) and before lcmtypes_build.
 #
-#          After invoking this macro, the following variables will be set:
-#             LCMTYPES_INCLUDE_DIR
-#             LCMTYPES_LIBS
-#             LCMTYPES_JAR
+#          After invoking this macro, the lcmtypes include directory will
+#          automatically be added, and the target variables will be set:
+#             LCMTYPES_C_TARGET
+#             LCMTYPES_C_LIBRARY
+#             LCMTYPES_CPP_TARGET
+#             LCMTYPES_JAVA_TARGET
 #
 # C
 # ==
@@ -161,6 +163,9 @@
     unset(__agg_h_fname)

   endif()
+
+  set(LCMTYPES_C_TARGET lcmtype_agg_h ${LCMTYPES_C_LIBNAME})
+  set(LCMTYPES_C_LIBRARY ${LCMTYPES_C_LIBNAME})
 endmacro()

 macro(lcmtypes_build_cpp)
@@ -203,7 +208,10 @@
     install(FILES ${__agg_hpp_fname} DESTINATION lcmtypes)
     unset(__hpp_str)
     unset(__agg_hpp_fname)
-  endif()
+
+  endif()
+
+  set(LCMTYPES_CPP_TARGET lcmtype_agg_hpp)
 endmacro()

 macro(lcmtypes_build_java)
@@ -235,6 +243,8 @@
     	REQUIRES lcm-java
     	VERSION 0.0.0)
   endif()
+
+  set(LCMTYPES_JAVA_TARGET ${LCMTYPES_JARNAME})
 endmacro()


cmake: Add ext libraries as whole archives

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -215,12 +215,8 @@
       set(LIBR ${OS_LIB})
     endif()
   endif()
-  get_filename_component(LNAME ${LIBR} NAME_WE)
-  add_library(libr_${LNAME} STATIC IMPORTED)
-  set_target_properties(libr_${LNAME} PROPERTIES LINKER_LANGUAGE CXX)
-  set_target_properties(libr_${LNAME} PROPERTIES IMPORTED_LOCATION ${LIBR})
-
-  list(APPEND LIBR_CMAKE_NAMES "libr_${LNAME}")
+  # add as whole archive to allow strong symbols
+  list(APPEND LIBR_CMAKE_NAMES "--whole-archive ${LIBR} --no-whole-archive")
 endforeach()


cmake: link with libc again after libos

cmake: link with libc again after libos

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -466,6 +466,7 @@

   musl_syscalls
   libos
+  libc

   ${CRTN}
   )


Check availability of immintrin.h in the AVX512 compatibility test

--- cmake/system_check.cmake
+++ cmake/system_check.cmake
@@ -67,7 +67,7 @@
 endif()

 if (X86_64 OR X86)
-  file(WRITE ${PROJECT_BINARY_DIR}/avx512.tmp "int main(void){ __asm__ volatile(\"vbroadcastss -4 * 4(%rsi), %zmm2\"); }")
+  file(WRITE ${PROJECT_BINARY_DIR}/avx512.tmp "#include <immintrin.h>\n\nint main(void){ __asm__ volatile(\"vbroadcastss -4 * 4(%rsi), %zmm2\"); }")
 execute_process(COMMAND ${CMAKE_C_COMPILER} -march=skylake-avx512 -v -o ${PROJECT_BINARY_DIR}/avx512.o -x c ${PROJECT_BINARY_DIR}/avx512.tmp OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_AVX512)
 if (NO_AVX512 EQUAL 1)
 set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX512")


Fixed compiler checking for clang on apple for C++11

--- cmake/Cpp11.cmake
+++ cmake/Cpp11.cmake
@@ -1,11 +1,11 @@
 #### Enable C++11

 # Note that Microsoft Visual C++ compiler enables C++11 by default
-if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+if(CMAKE_COMPILER_IS_GNUCXX)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") # Remove deprecated warnings GCC
     #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=300") # Fix for a bug with boost signals2
 endif()
-if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
     include(CheckCXXCompilerFlag)
     check_cxx_compiler_flag(--std=c++11 SUPPORTS_STD_CXX11)
     check_cxx_compiler_flag(--std=c++0x SUPPORTS_STD_CXX01)


Also include the path already set for CBLAS_INC_DIR

--- cmake/cblas.cmake
+++ cmake/cblas.cmake
@@ -81,7 +81,7 @@
   set(CBLAS_FOUND ON)
   if(ATLAS_CLAPACK_INC_DIR)
     add_definitions(-DPADDLE_USE_LAPACK)
-    set(CBLAS_INC_DIR ${ATLAS_CLAPACK_INC_DIR})
+    set(CBLAS_INC_DIR ${CBLAS_INC_DIR} ${ATLAS_CLAPACK_INC_DIR})
     message(STATUS "Found lapack in ATLAS (include: ${ATLAS_CLAPACK_INC_DIR})")
   endif()
   return()


Update verify_ROOT to use new naming convention of SHASUMs (#292)

Co-authored-by: Ahmad Hesam <4f6f7b84f519543b4b2ac6956330c58f6e97077b@hotmail.com>

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -61,7 +61,17 @@
                 if (EXISTS ${CMAKE_THIRD_PARTY_DIR}/root/tar-sha256)
                     # check if SHA256 of installed ROOT is the same as the expected one
                     file(READ ${CMAKE_THIRD_PARTY_DIR}/root/tar-sha256 TAR_SHA256)
-                    if(NOT "${TAR_SHA256}" STREQUAL "${${DETECTED_OS_VERS}-ROOT}")
+                    if(APPLE)
+                        execute_process(COMMAND bash "-c" "xcodebuild -version | sed -En 's/Xcode[[:space:]]+([0-9\.]*)/\\1/p'" OUTPUT_VARIABLE XCODE_VERS)
+                        if("${XCODE_VERS}" GREATER_EQUAL "14.1")
+                            set(ROOT_SHA ${osx-xcode-14.1-${DETECTED_ARCH}-ROOT})
+                        else()
+                            set(ROOT_SHA ${osx-xcode-13.1-${DETECTED_ARCH}-ROOT})
+                        endif()
+                    else()
+                        set(ROOT_SHA ${${DETECTED_OS_VERS}-ROOT})
+                    endif()
+                    if(NOT "${TAR_SHA256}" STREQUAL "${ROOT_SHA}")
                         # BDM installed ROOT has wrong SHA256... deleting it
                         message(WARNING "The found ROOT version is not compatible... deleting it...")
                         file(REMOVE_RECURSE ${CMAKE_THIRD_PARTY_DIR}/root)


CMake: UB: fsanitize=integer

CMake: UB: fsanitize=integer

--- cmake/compiler-flags.cmake
+++ cmake/compiler-flags.cmake
@@ -76,6 +76,9 @@
     CMAKE_C_FLAGS_ASAN )

 set(ubsan "${SANITIZATION_DEFAULTS} -fsanitize=undefined -fno-sanitize-recover=undefined")
+if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+  set(ubsan "${ubsan} -fsanitize=integer -fno-sanitize-recover=integer")
+endif()
 SET(CMAKE_CXX_FLAGS_UBSAN
     "${ubsan}"
     CACHE STRING "Flags used by the C++ compiler during UBSAN builds."


[CMake] Hack GetSVN.cmake to handle unusual terminals.

I got a report of a hang in git's helper functions trying to figure out
how to display results of "git svn info" when run inside ninja, even though
the result is immediately piped to grep. This seems to avoid that.

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

--- cmake/modules/GetSVN.cmake
+++ cmake/modules/GetSVN.cmake
@@ -15,6 +15,9 @@
 get_filename_component(LLVM_DIR "${CMAKE_SCRIPT_MODE_FILE}" PATH)
 get_filename_component(LLVM_DIR "${LLVM_DIR}" PATH)
 get_filename_component(LLVM_DIR "${LLVM_DIR}" PATH)
+
+# Handle strange terminals
+set(ENV{TERM} "dumb")

 function(append_info name path)
   execute_process(COMMAND "${LLVM_DIR}/utils/GetSourceVersion" "${path}"


Use a more robust version of the TRANSFORM_VERSION macro.

svn path=/trunk/; revision=7339


fix(driver/bpf): exact check on bpf_probe_read_str() return value

Bump version of the driver to (commit: cd3d10123eef161d9f4e237581c1056fca29c130) that fixes #896
Summary of the needed fix can be found at patch [0]

[0] https://patch-diff.githubusercontent.com/raw/draios/sysdig/pull/1612.patch

Co-Authored-By: Leonardo Di Donato <2012e0ca99d70aa6c893822ff73002216e5dba72@gmail.com>
Signed-off-by: Lorenzo Fontana <638e8f0171575864326f06d2a5f8e72287427b15@linux.com>

--- cmake/modules/sysdig.cmake
+++ cmake/modules/sysdig.cmake
@@ -26,8 +26,8 @@
 # To update sysdig version for the next release, change the default below
 # In case you want to test against another sysdig version just pass the variable - ie., `cmake -DSYSDIG_VERSION=dev ..`
 if(NOT SYSDIG_VERSION)
-  set(SYSDIG_VERSION "be1ea2d9482d0e6e2cb14a0fd7e08cbecf517f94")
-  set(SYSDIG_CHECKSUM "SHA256=1c69363e4c36cdaeed413c2ef557af53bfc4bf1109fbcb6d6e18dc40fe6ddec8")
+  set(SYSDIG_VERSION "d809a4cc0575f0268963de8eb92ba9416a485d8b")
+  set(SYSDIG_CHECKSUM "SHA256=0b6bcae815c537893e75cef20a48287c91764a76f64b147b596d44f08242089f")
 endif()
 set(PROBE_VERSION "${SYSDIG_VERSION}")


3rdParty: raknet: cmake fix

3rdParty: raknet: cmake fix

Signed-off-by: pkovacs86 <341ef9d885064bd2b2496780309fd887a7e36b1c@sztaki.mta.hu>


CMake: Do not forget to clear some cached variables

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@33015 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/modules/FindMPI.cmake
+++ deal.II/cmake/modules/FindMPI.cmake
@@ -152,12 +152,14 @@
   CXX_FLAGS OPTIONAL MPI_CXX_COMPILE_FLAGS
   LINKER_FLAGS OPTIONAL MPI_CXX_LINK_FLAGS
   CLEAR
-    MPI_MPI_H
+    MPI_C_COMPILER
+    MPI_CXX_COMPILER
+    MPIEXEC
+    MPI_EXTRA_LIBRARY
+    MPI_Fortran_COMPILER
     MPI_HEADER_PATH
     MPI_LIB
-    MPIEXEC
-    MPI_CXX_COMPILER
-    MPI_C_COMPILER
-    MPI_Fortran_COMPILER
+    MPI_LIBRARY
+    MPI_MPI_H
   )


BUG: check if not DEFINED

BUG: check if not DEFINED

--- Packaging/prepare_search_dirs.cmake
+++ Packaging/prepare_search_dirs.cmake
@@ -3,7 +3,7 @@
   set(search_dirs)

   if(MSVC)
-    if(DEFINED ENV{UniversalCRTSdkDir})
+    if(NOT DEFINED ENV{UniversalCRTSdkDir})
       message(FATAL_ERROR "UniversalCRTSdkDir variable not set. Cannot continue")
     endif()
     if(NOT DEFINED ENV{VCINSTALLDIR})


Apply the same CMAKE_ARCHIVE_OUTPUT_DIRECTORY for all configurations

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1480,7 +1480,9 @@
   if(MSVC)
     set(EXTRA_GTEST_OPTS
       -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=\\\"\\\"
-      -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=\\\"\\\")
+      -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_MINSIZEREL:PATH=\\\"\\\"
+      -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=\\\"\\\"
+      -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO:PATH=\\\"\\\")
   endif()
   if(APPLE)
     set(EXTRA_GTEST_OPTS


ARROW-14178: [C++] Boost download location has moved

https://www.boost.org/users/news/boost_has_moved_downloads_to_jfr.html

Tagged releases on GitHub do not include submodules

Closes #11275 from bkmgit/bkmgit-update-boost-location

Authored-by: Benson Muite <e0844a8d1d85d7ae0a06d19fd8861a1c84037a1b@users.noreply.github.com>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -401,8 +401,8 @@
            # our currently used packages and doesn't fall out of sync with
            # ${ARROW_BOOST_BUILD_VERSION_UNDERSCORES}
            "https://github.com/ursa-labs/thirdparty/releases/download/latest/boost_${ARROW_BOOST_BUILD_VERSION_UNDERSCORES}.tar.gz"
+           "https://boostorg.jfrog.io/artifactory/main/release/${ARROW_BOOST_BUILD_VERSION}/source/boost_${ARROW_BOOST_BUILD_VERSION_UNDERSCORES}.tar.gz"
            "https://sourceforge.net/projects/boost/files/boost/${ARROW_BOOST_BUILD_VERSION}/boost_${ARROW_BOOST_BUILD_VERSION_UNDERSCORES}.tar.gz"
-           "https://github.com/boostorg/boost/archive/boost-${ARROW_BOOST_BUILD_VERSION}.tar.gz"
   )
 endif()


git-svn-id: svn://scm.gforge.inria.fr/svn/openvibe@1886 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/cmake-modules/FindThirdPartyBoost_Thread.cmake
+++ trunk/cmake-modules/FindThirdPartyBoost_Thread.cmake
@@ -10,13 +10,13 @@
 	IF(Boost_FOUND)
 		LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})

-		FIND_LIBRARY(LIB_Boost_Thread "boost_thread" PATHS $ENV{OpenViBE_dependencies}/lib NO_DEFAULT_PATH)
-		FIND_LIBRARY(LIB_Boost_Thread "boost_thread" PATHS $ENV{OpenViBE_dependencies}/lib)
+		FIND_LIBRARY(LIB_Boost_Thread NAMES "boost_thread-mt" PATHS $ENV{OpenViBE_dependencies}/lib NO_DEFAULT_PATH)
+		FIND_LIBRARY(LIB_Boost_Thread NAMES "boost_thread-mt" PATHS $ENV{OpenViBE_dependencies}/lib)
 		IF(LIB_Boost_Thread)
 			MESSAGE(STATUS "    [  OK  ] lib ${LIB_Boost_Thread}")
 			TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${LIB_Boost_Thread} )
 		ELSE(LIB_Boost_Thread)
-			MESSAGE(STATUS "    [FAILED] lib boost_thread")
+			MESSAGE(STATUS "    [FAILED] lib boost_thread-mt")
 		ENDIF(LIB_Boost_Thread)
 	ENDIF(Boost_FOUND)
 ENDIF(UNIX)


Update nightly checkout instructions to git

--- suite/nightly.cmake
+++ suite/nightly.cmake
@@ -1,4 +1,5 @@
 # **********************************************************
+# Copyright (c) 2014 Google, Inc.    All rights reserved.
 # Copyright (c) 2009 Derek Bruening.    All rights reserved.
 # **********************************************************

@@ -34,7 +35,7 @@
 #
 # 1) Pick a directory $nightly.  Create $nightly/run.
 # 2) Check out the sources (read-only):
-#    cd $nightly; svn checkout http://dynamorio.googlecode.com/svn/trunk/ src
+#    cd $nightly; git clone https://github.com/DynamoRIO/dynamorio.git src
 # 3) To keep the sources pristine, copy this file from
 #    $nightly/src/suite/nightly.cmake to $nightly/nightly.cmake.  Pick a site
 #    name and change the site= string below in $nightly/nightly.cmake.  The


Set -fPIC everywhere, use CMAKE_POSITION_INDEPENDENT_CODE to do it

--- standard/SetStandardOutputVariables.cmake
+++ standard/SetStandardOutputVariables.cmake
@@ -68,12 +68,11 @@
       string(TOUPPER ${config} config)
       string(CONCAT CMAKE_${config}_POSTFIX "${CMAKE_${config}_POSTFIX}" "64")
     endforeach()
+  endif()

-    # We want position-independent code for all 64-bit non-windows builds
-    if(NOT WIN32)
-      string(APPEND CMAKE_CXX_FLAGS " -fPIC")
-      string(APPEND CMAKE_C_FLAGS " -fPIC")
-    endif()
+  # We want -fPIC code for all 64-bit non-windows builds
+  if(NOT WIN32)
+    set(CMAKE_POSITION_INDEPENDENT_CODE ON)
   endif()

   # Always use c++11 compiler with hidden visibility


Fix typo (GCC->CLANG) in general Clang compiler defs.

Change-Id: I440f37723987c1dd85e7482f0d32ac157565e25d

--- framework/delibs/cmake/CFlags.cmake
+++ framework/delibs/cmake/CFlags.cmake
@@ -148,9 +148,9 @@
 	set(CLANG_COMMON_FLAGS "-Wall -Wextra -Wno-long-long -Wshadow -Wundef")

 	if (DE_CPU_IS_X86)
-		set(GCC_MACHINE_FLAGS "-m32")
+		set(CLANG_MACHINE_FLAGS "-m32")
 	elseif (DE_CPU_IS_X86_64)
-		set(GCC_MACHINE_FLAGS "-m64")
+		set(CLANG_MACHINE_FLAGS "-m64")
 	endif ()

 	# For 3rd party sw disable all warnings


[sanitizer] Add lld into dependency of sanitizer_common unittests

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

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -465,6 +465,11 @@
     set(TEST_LINK_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TEST_LINK_FLAGS}")
     separate_arguments(TEST_LINK_FLAGS)
   endif()
+  if(NOT COMPILER_RT_STANDALONE_BUILD AND COMPILER_RT_HAS_LLD)
+    # CMAKE_EXE_LINKER_FLAGS may contain -fuse=lld
+    # FIXME: -DLLVM_ENABLE_LLD=ON and -DLLVM_ENABLE_PROJECTS without lld case.
+    list(APPEND TEST_DEPS lld)
+  endif()
   add_custom_command(
     OUTPUT "${output_bin}"
     COMMAND ${COMPILER_RT_TEST_COMPILER} ${TEST_OBJECTS} -o "${output_bin}"


moved recurseive config file add into a own function

--- cmake/classes/Configuration.cmake
+++ cmake/classes/Configuration.cmake
@@ -1,9 +1,35 @@
 function(Configuration)
 	this_inherit(CommandRunner)
+
+	proto_declarefunction(AddConfigurationFilesRecurse )
+
+

 	# create a field containing all configurations
 	map_create(configurations)
 	this_set(configurations ${configurations})
+
+
+	# recursively adds configuration files to the configuration object
+	# starts with the given <path> and adds all coniguration files in <path> and its
+	# paretn directories up to
+	function(${AddConfigurationFilesRecurse} path)
+		# recursively add configuration files
+		set(current_dir "${path}")
+		while(true)
+			get_filename_component(new_current_dir "${current_dir}" PATH)
+			# current dir is equal to new_current_dir when current_dir is root (recursion anchor)
+			if("${new_current_dir}" STREQUAL "${current_dir}")
+				break()
+			endif()
+			set(current_dir ${new_current_dir})
+			# if cutil.config exists add it to configuration
+			if(EXISTS "${current_dir}/cutil.config")
+				string_normalize_string(name "${current_dir}/cutil.config")
+				obj_callmember(${this} AddConfigurationFile "${name}" "${current_dir}/cutil.config")
+			endif()
+		endwhile()
+	endfunction()

 	#  add a named configuration file to the configuration object
 	# configuration files are searched in reverse order for
@@ -12,6 +38,7 @@
 	proto_declarefunction(AddConfigurationFile)
 	function(${AddConfigurationFile} name config_file)
 		set(config)
+		message(DEBUG LEVEL 6 "Adding Configuration '${name}' @ ${config_file} ")
 		map_navigate_set("configurations.${name}.file" "${config_file}")
 		map_navigate_set("configurations.${name}.name" "${name}")
 		obj_callmember(${this} Load)


Update FindZookeepr

Update FindZookeepr

--- cmake/modules/FindZookeeper.cmake
+++ cmake/modules/FindZookeeper.cmake
@@ -49,7 +49,7 @@
     endif()
 else()
     set(Zookeeper_LIB_PATHS /usr/local/lib /opt/local/lib)
-    find_path(Zookeeper_INCLUDE_DIR zookeeper.h  /usr/local/include/zookeeper )
+    find_path(Zookeeper_INCLUDE_DIR zookeeper/zookeeper.h /usr/local/include)
     find_library(Zookeeper_LIBRARY NAMES zookeeper_mt PATHS ${Zookeeper_LIB_PATHS})
 endif()

@@ -64,3 +64,4 @@
     Zookeeper_LIBRARY Zookeeper_INCLUDE_DIR)

 mark_as_advanced(Zookeeper_INCLUDE_DIR Zookeeper_LIBRARY )
+


Fixed a bug in the parser

Fixed a bug in the parser

--- cmake_modules/CMakeUseBison.cmake
+++ cmake_modules/CMakeUseBison.cmake
@@ -67,6 +67,9 @@
         COMMAND "${BISON_EXECUTABLE}"
         ARGS "--name-prefix=${PREFIX}"
         "--defines"
+		"-t"
+		"-r all"
+		"--locations"
         "--output-file=${OUTFILE}"
         "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}"
         DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}")


bugfix: syntax for the -r option seems to be invalid on unix

--- cmake_modules/CMakeUseBison.cmake
+++ cmake_modules/CMakeUseBison.cmake
@@ -68,7 +68,7 @@
         ARGS "--name-prefix=${PREFIX}"
         "--defines"
 		"-t"
-		"-r all"
+		"-rall"
 		"--locations"
         "--output-file=${OUTFILE}"
         "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}"


Fix for linker argument mangling and prioritize user-supplied paths over system paths

--- cmakemodule/FindSuiteSparse.cmake
+++ cmakemodule/FindSuiteSparse.cmake
@@ -1,44 +1,44 @@
 ## CMake file to locate SuiteSparse and its useful composite projects
-## The first developpement of this file was made fro Windows users who
+## The first development of this file was made by Windows users who
 ## use:
 ##  https://github.com/jlblancoc/suitesparse-metis-for-windows
-## Anyway, it chould be work also on linux (tested on fedora 17 when you installed suitesparse from yum)
-##
-##
-## Inputs variables this file can process (variable must be given before find_package(SUITESPARES ...) command) :
+## Anyway, it should also work on linux (tested on fedora 17 when you installed suitesparse from yum)
+##
+##
+## Input variables this file can process (variable must be given before find_package(SUITESPARES ...) command) :
 ##   * SuiteSparse_VERBOSE			Default to OFF
 ##   * SuiteSparse_USE_LAPACK_BLAS	Default to OFF. If ON append to SuiteSparse_LIBRARIES the blas and lapack library
 ##   Note: SuiteSparse lib usually requires linking to a blas and lapack library.
 ##
 ##
-## Help variables this file handle internaly :
+## Help variables this file handles internally :
 ##   * SuiteSparse_SEARCH_LIB_POSTFIX		Is set in cache (as advanced) to look into the right lib/lib64 dir for libraries (user can change)
 ##
 ##
-## Variables this file provide :
+## Variables this file provides :
 ##   * SuiteSparse_FOUND         			True if SuiteSparse given COMPONENTS include and libraries were found
 ##   * SuiteSparse_INCLUDE_DIRS  			Paths containing SuiteSparse needed headers (depend on which COMPONENTS you gave)
 ##   * SuiteSparse_LIBRARIES     			Absolute paths of SuiteSparse libs found (depend on which COMPONENTS you gave)
 ##   If SuiteSparse_USE_LAPACK_BLAS is set to ON :
 ##   	* SuiteSparse_LAPACK_BLAS_LIBRARIES 	Which contain the libblas and liblapack libraries
 ##   	On windows:
-##   		* SuiteSparse_LAPACK_BLAS_DLL		Which contain all requiered binaries for use libblas and liblapack
+##   		* SuiteSparse_LAPACK_BLAS_DLL		Which contain all required binaries for use libblas and liblapack
 ##
 ##
 ## Detailed variables this file provide :
 ##   * SuiteSparse_<UPPPER_CASE_COMPONENT>_FOUND		True if the given component to look for is found (INCLUDE DIR and LIBRARY)
-##   * SuiteSparse_<UPPPER_CASE_COMPONENT>_INCLUDE_DIR	The path directory where we can found all compenent header files
+##   * SuiteSparse_<UPPPER_CASE_COMPONENT>_INCLUDE_DIR	The path directory where we can find all component header files
 ##   * SuiteSparse_<UPPPER_CASE_COMPONENT>_LIBRARY		The file path to the component library
 ##   Note: If a component is not found, a SuiteSparse_<UPPPER_CASE_COMPONENT>_DIR cache variable is set to allow user set the search directory.
 ##
 ##
-## Possible componnents to find are (maybe some others can be available):
+## Possible components to find are (maybe some others can be available):
 ##   * AMD
 ##   * CAMD
 ##   * COLAMD
 ##   * CCOLAMD
-##   * CHOLMOD	: this lib need all previous one. According to how it was build (a single static lib or a full dynamic one), you should looking for its dependencies.
-##   * metis (opt): may not be found (depend if suitesparse was build with metis or not) => required by CHOLMOD (optional)
+##   * CHOLMOD	: this lib needs all previous ones. According to how it was built (a single static lib or a full dynamic one), you should look for its dependencies.
+##   * metis (opt): may not be found (depends if suitesparse was built with metis or not) => required by CHOLMOD (optional)
 ##
 ##
 ## How to use this file :
@@ -46,7 +46,7 @@
 ##   (opt) set(SuiteSparse_USE_LAPACK_BLAS ON)
 ##   ( 1 ) find_package(SuiteSparse) ## metis is not search by default because it's not a part of suitesparse (suitesparse can be built without metis)
 ##   ( 2 ) find_package(SuiteSparse COMPONENTS metis CHOLMOD) 		## be careful, components are case sensitive
-##   ( 3 ) find_package(SuiteSparse COMPONENTS metis suitesparse)	## valid on windows (linux have no suitesparse library)
+##   ( 3 ) find_package(SuiteSparse COMPONENTS metis suitesparse)	## valid on windows (linux has no suitesparse library)
 ##   ( 4 ) find_package(SuiteSparse COMPONENTS suitesparse)
 ##
 ##    if(SuiteSparse_FOUND)
@@ -77,7 +77,8 @@
 endif()

-## set the LIB POSTFIX to find in a right directory according to what kind of compiler we use (32/64bits)
+## set the LIB POSTFIX to find in right directory according to what kind of compiler we use (32/64bits)
+## July 2017 git commit 1618fd1 made so only Linux/BSD/GNU installs to lib/lib64, others use lib; this remains to avoid breaking older installs
 if(CMAKE_SIZEOF_VOID_P EQUAL 8)  # Size in bytes!
 	set(SuiteSparse_SEARCH_LIB_POSTFIX "64" CACHE STRING "suffix for 32/64 dir placement")
 else()  # Size in bytes!
@@ -98,13 +99,13 @@
 ## we can use a generic way to find all of these with simple cmake lines of code
 macro(SuiteSparse_FIND_COMPONENTS )

-	## On windows : we absolutly need SuiteSparse_config.h every time for all projects
+	## On windows : we absolutely need SuiteSparse_config.h every time for all projects
 	if(WIN32)
 		list(FIND SuiteSparse_FIND_COMPONENTS "suitesparseconfig" SS_config_index)
 		if(${SS_config_index} MATCHES "-1")
 			list(APPEND SuiteSparse_FIND_COMPONENTS suitesparseconfig)
 			if(SuiteSparse_VERBOSE)
-				message(STATUS "   On windows, we absolutly need SuiteSparse_config.h every time for all projects : add suitesparseconfig component to look for")
+				message(STATUS "   On windows, we absolutely need SuiteSparse_config.h every time for all projects : add suitesparseconfig component to look for")
 			endif()
 		endif()
 	endif()
@@ -112,21 +113,21 @@
 	## special check for suitesparse component (allow to find on windows but not on linux because doesn't exist)
 	list(FIND SuiteSparse_FIND_COMPONENTS "suitesparse" ss_index)
 	if(${ss_index} MATCHES "-1")
-		## do nothing, the user didn't provide the suisparse componnent
+		## do nothing, the user didn't provide the suitesparse componnent
 	else()
 		if(WIN32)
-			## do nothing, the user provide the suisparse componnent we will try to find
+			## do nothing, the user provide the suitesparse componnent we will try to find
 		else()
 			list(REMOVE_AT SuiteSparse_FIND_COMPONENTS ${ss_index})
 			if(SuiteSparse_VERBOSE)
-				message(STATUS "   On this plateform : suitesparse lib doesn't exist (only on windows), so skip this component")
+				message(STATUS "   On this platform : suitesparse lib doesn't exist (only on windows), so skip this component")
 			endif()
 		endif()
 	endif()

 	## Look for each component the same way :
 	##  * For include dir the reference file is the <component>.h
-	##	* for library fileName the reference is the <component> itself (cmake will prepend/append necessary prefix/suffix according to the plateform)
+	##	* for library fileName the reference is the <component> itself (cmake will prepend/append necessary prefix/suffix according to the platform)
 	foreach(suitesparseComp ${SuiteSparse_FIND_COMPONENTS})

 		## used to construct specific cmake variables (in upper case) according to the component, but also used for find_*()
@@ -143,6 +144,14 @@
 		find_path(SuiteSparse_${suitesparseCompUC}_INCLUDE_DIR
 			NAMES 			${suitesparseComp}.h ${suitesparseCompLC}.h ${suitesparseCompUC}.h ${suitesparseComp_ALT}.h
 						${suitesparseComp}.hpp ${suitesparseCompLC}.hpp ${suitesparseCompUC}.hpp
+			HINTS			${SuiteSparse_DIR}/include
+						${SuiteSparse_DIR}/include/suitesparse
+						${SuiteSparse_DIR}/suitesparse/include
+						${SuiteSparse_DIR}/include/${suitesparseComp}
+						${SuiteSparse_DIR}/${suitesparseComp}/include
+						${${suitesparseCompUC}_DIR}/include
+						${${suitesparseCompUC}_DIR}/${suitesparseComp}/include
+						${${suitesparseCompUC}_DIR}
 			PATHS			/opt/local/include
 						/usr/include
 						/usr/local/include
@@ -150,19 +159,11 @@
 						/usr/local/include/suitesparse
 						/usr/include/${suitesparseComp}
 						/usr/local/include/${suitesparseComp}
-						${SuiteSparse_DIR}/include
-						${SuiteSparse_DIR}/include/suitesparse
-						${SuiteSparse_DIR}/suitesparse/include
-						${SuiteSparse_DIR}/include/${suitesparseComp}
-						${SuiteSparse_DIR}/${suitesparseComp}/include
-						${${suitesparseCompUC}_DIR}/include
-						${${suitesparseCompUC}_DIR}/${suitesparseComp}/include
-						${${suitesparseCompUC}_DIR}
 		)
 		## check if found
 		if(NOT SuiteSparse_${suitesparseCompUC}_INCLUDE_DIR)
 			if (SuiteSparse_VERBOSE)
-				message(WARNING "   Failed to find ${suitesparseComp} :\nSuiteSparse_${suitesparseCompUC}_INCLUDE_DIR not found.\nCheck you write correctly the component name (case sensitive),\nor set the SuiteSparse_${suitesparseCompUC}_DIR to look inside")
+				message(WARNING "   Failed to find ${suitesparseComp} :\nSuiteSparse_${suitesparseCompUC}_INCLUDE_DIR not found.\nCheck if you wrote the component name correctly (case sensitive),\nor set the SuiteSparse_${suitesparseCompUC}_DIR to look inside")
 			endif()
 		else()
 			list(APPEND SuiteSparse_INCLUDE_DIRS	${SuiteSparse_${suitesparseCompUC}_INCLUDE_DIR})
@@ -171,34 +172,35 @@
 		## try to find filepath lib name (looking for very important lib file)
 		find_library(SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE
 			NAMES 			lib${suitesparseComp} 	lib${suitesparseCompLC} lib${suitesparseCompUC}
-							${suitesparseComp} 		${suitesparseCompLC} 	${suitesparseCompUC}
+						${suitesparseComp} 		${suitesparseCompLC} 	${suitesparseCompUC}
+			HINTS			${SuiteSparse_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+						${${suitesparseCompUC}_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+						${${suitesparseCompUC}_DIR}
+						${SuiteSparse_DIR}/${CMAKE_INSTALL_LIBDIR}
+						${${suitesparseCompUC}_DIR}/${CMAKE_INSTALL_LIBDIR}
 			PATHS 			/opt/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-							/usr/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-							/usr/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-							${SuiteSparse_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-							${${suitesparseCompUC}_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-							${${suitesparseCompUC}_DIR}
-							/opt/local/${CMAKE_INSTALL_LIBDIR}
-							/usr/${CMAKE_INSTALL_LIBDIR}
-							/usr/local/${CMAKE_INSTALL_LIBDIR}
-							${SuiteSparse_DIR}/${CMAKE_INSTALL_LIBDIR}
-							${${suitesparseCompUC}_DIR}/${CMAKE_INSTALL_LIBDIR}
+						/usr/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+						/usr/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+						/opt/local/${CMAKE_INSTALL_LIBDIR}
+						/usr/${CMAKE_INSTALL_LIBDIR}
+						/usr/local/${CMAKE_INSTALL_LIBDIR}
 			PATH_SUFFIXES	Release
 		)
 		find_library(SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG
 			NAMES 			${suitesparseComp}d		${suitesparseCompLC}d 		${suitesparseCompUC}d
-							lib${suitesparseComp}d 	lib${suitesparseCompLC}d 	lib${suitesparseCompUC}d
+						lib${suitesparseComp}d 	lib${suitesparseCompLC}d 	lib${suitesparseCompUC}d
+			HINTS			${SuiteSparse_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+						${${suitesparseCompUC}_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+						${${suitesparseCompUC}_DIR}
+						${SuiteSparse_DIR}/${CMAKE_INSTALL_LIBDIR}
+						${${suitesparseCompUC}_DIR}/${CMAKE_INSTALL_LIBDIR}
+
 			PATHS 			/opt/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-							/usr/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-							/usr/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-							${SuiteSparse_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-							${${suitesparseCompUC}_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-							${${suitesparseCompUC}_DIR}
-							/opt/local/${CMAKE_INSTALL_LIBDIR}
-							/usr/${CMAKE_INSTALL_LIBDIR}
-							/usr/local/${CMAKE_INSTALL_LIBDIR}
-							${SuiteSparse_DIR}/${CMAKE_INSTALL_LIBDIR}
-							${${suitesparseCompUC}_DIR}/${CMAKE_INSTALL_LIBDIR}
+						/usr/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+						/usr/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+						/opt/local/${CMAKE_INSTALL_LIBDIR}
+						/usr/${CMAKE_INSTALL_LIBDIR}
+						/usr/local/${CMAKE_INSTALL_LIBDIR}
 			PATH_SUFFIXES	Debug
 		)

@@ -218,7 +220,7 @@
 		if(NOT SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE AND NOT SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG)
 			if (SuiteSparse_VERBOSE)
 			message(WARNING "   Failed to find ${suitesparseComp} :
-			Check you write correctly the component name (case sensitive),
+			Check if you wrote the correct component name (case sensitive),
 			or set the SuiteSparse_${suitesparseCompUC}_DIR to look inside,
 			or set directly SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG and SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE
 			")
@@ -234,7 +236,7 @@
 			set(SuiteSparse_${suitesparseCompUC}_FOUND ON)
 		endif()

-		## if one of both (include dir or filepath lib), then we provide a new cmake cache variable for the search. Otherwise we don't need anymore to expose all intermediates variables
+		## if one or both (include dir or filepath lib), then we provide a new cmake cache variable for the search. Otherwise we don't need anymore to expose all intermediate variables
 		if(NOT SuiteSparse_${suitesparseCompUC}_FOUND)
 			set(SuiteSparse_${suitesparseCompUC}_DIR "$ENV{SuiteSparse_${suitesparseCompUC}_DIR}" CACHE PATH "${suitesparseComp} root directory")
 		else()
@@ -275,12 +277,12 @@
 		endif()
 		if(NOT ${componentToCheck})
 			set(SuiteSparse_FOUND OFF)
-			break() ## one component not found is enought to failed
+			break() ## one component not found is enough to failed
 		endif()
 	endforeach()
 endmacro()

-## Default behavior if user don't use the COMPONENTS flag in find_package(SuiteSparse ...) command
+## Default behavior if user doesn't use the COMPONENTS flag in find_package(SuiteSparse ...) command
 if(NOT SuiteSparse_FIND_COMPONENTS)
 	list(APPEND SuiteSparse_FIND_COMPONENTS AMD CAMD CCOLAMD COLAMD CHOLMOD SPQR LDL BTF KLU CXSPARSE UMFPACK)  ## suitesparse and metis are not searched by default (special case)
 endif()
@@ -314,23 +316,22 @@
 	## try to find blas lib
 	find_library(SuiteSparse_BLAS_LIBRARY
 		NAMES 			blas cblas libblas
+		HINTS			${SuiteSparse_BLAS_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+					${SuiteSparse_BLAS_DIR}
+					${SuiteSparse_BLAS_DIR}/${CMAKE_INSTALL_LIBDIR}
+					${ADDITIONAL_SEARCH_DIRS}
 		PATHS 			/opt/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-						/usr/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-						/usr/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-						${SuiteSparse_BLAS_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-						${SuiteSparse_BLAS_DIR}
-						${ADDITIONAL_SEARCH_DIRS}
-						/opt/local/${CMAKE_INSTALL_LIBDIR}
-						/usr/${CMAKE_INSTALL_LIBDIR}
-						/usr/local/${CMAKE_INSTALL_LIBDIR}
-						${SuiteSparse_BLAS_DIR}/${CMAKE_INSTALL_LIBDIR}
-						$
+					/usr/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+					/usr/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+					/opt/local/${CMAKE_INSTALL_LIBDIR}
+					/usr/${CMAKE_INSTALL_LIBDIR}
+					/usr/local/${CMAKE_INSTALL_LIBDIR}
 		PATH_SUFFIXES	Release Debug
 	)
 	if(NOT SuiteSparse_BLAS_LIBRARY)
 		if (SuiteSparse_VERBOSE)
 			# Send all msgs as "STATUS": We'll send an error at the bottom, only if "REQUIRED" is set.
-			message(STATUS "   Failed to find SuiteSparse_BLAS_LIBRARY.Set it manually or set the SuiteSparse_BLAS_DIR to looking for it inside.")
+			message(STATUS "   Failed to find SuiteSparse_BLAS_LIBRARY. Set it manually or set the SuiteSparse_BLAS_DIR to look for it inside.")
 		endif()
 			set(SuiteSparse_BLAS_DIR "$ENV{SuiteSparse_BLAS_DIR}" CACHE PATH "blas root directory")
 	else()
@@ -343,22 +344,22 @@
 	## try to find lapack lib
 	find_library(SuiteSparse_LAPACK_LIBRARY
 		NAMES 			lapack liblapack
+		HINTS			${SuiteSparse_LAPACK_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+					${SuiteSparse_LAPACK_DIR}
+					${SuiteSparse_LAPACK_DIR}/${CMAKE_INSTALL_LIBDIR}
+					${ADDITIONAL_SEARCH_DIRS}
 		PATHS 			/opt/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-						/usr/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-						/usr/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-						${SuiteSparse_LAPACK_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
-						${SuiteSparse_LAPACK_DIR}
-						${ADDITIONAL_SEARCH_DIRS}
-						/opt/local/${CMAKE_INSTALL_LIBDIR}
-						/usr/${CMAKE_INSTALL_LIBDIR}
-						/usr/local/${CMAKE_INSTALL_LIBDIR}
-						${SuiteSparse_LAPACK_DIR}/${CMAKE_INSTALL_LIBDIR}
+					/usr/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+					/usr/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+					/opt/local/${CMAKE_INSTALL_LIBDIR}
+					/usr/${CMAKE_INSTALL_LIBDIR}
+					/usr/local/${CMAKE_INSTALL_LIBDIR}
 		PATH_SUFFIXES	Release Debug
 	)
 	if(NOT SuiteSparse_LAPACK_LIBRARY)
 		if (SuiteSparse_VERBOSE)
 			# Send all msgs as "STATUS": We'll send an error at the bottom, only if "REQUIRED" is set.
-			message(STATUS "   Failed to find SuiteSparse_LAPACK_LIBRARY.Set it manually or set the SuiteSparse_LAPACK_DIR to looking for it inside.")
+			message(STATUS "   Failed to find SuiteSparse_LAPACK_LIBRARY. Set it manually or set the SuiteSparse_LAPACK_DIR to look for it inside.")
 		endif()
 		set(SuiteSparse_LAPACK_DIR "$ENV{SuiteSparse_LAPACK_DIR}" CACHE PATH "lapack root directory")
 	else()
@@ -435,8 +436,11 @@
 if(SuiteSparse_INCLUDE_DIRS)
 	list(REMOVE_DUPLICATES SuiteSparse_INCLUDE_DIRS)
 endif()
+
 if(SuiteSparse_LIBRARIES)
-	list(REMOVE_DUPLICATES SuiteSparse_LIBRARIES)
+	## This approach doesn't work because the list contains debug information
+	## Linker gets messed up, since 1st lib will only be used in optimized builds, 2nd lib will only be used in debug builds
+	#list(REMOVE_DUPLICATES SuiteSparse_LIBRARIES)
 endif()

 if(SuiteSparse_LAPACK_BLAS_LIBRARIES)


ENH: ExternalData: Factor out series matching into macro

The file series matching is only one possible strategy for collecting
files associated with a DATA{} reference.  Move the logic out of the
main argument conversion function to a dedicated macro to make it more
readable.

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -295,6 +295,30 @@
   set(internal "") # Entries internal to the source tree.
   set(have_original 0)

+  _ExternalData_arg_series()
+
+  if(NOT have_original)
+    message(FATAL_ERROR "Data file referenced by argument\n"
+      "  ${arg}\n"
+      "corresponds to source tree path\n"
+      "  ${reldata}\n"
+      "that does not exist (with or without an extension)!")
+  endif()
+
+  if(external)
+    # Make the series available in the build tree.
+    set_property(GLOBAL APPEND PROPERTY
+      _ExternalData_${target}_FETCH "${external}")
+    set_property(GLOBAL APPEND PROPERTY
+      _ExternalData_${target}_LOCAL "${internal}")
+    set("${var_file}" "${top_bin}/${reldata}" PARENT_SCOPE)
+  else()
+    # The whole series is in the source tree.
+    set("${var_file}" "${top_src}/${reldata}" PARENT_SCOPE)
+  endif()
+endfunction()
+
+macro(_ExternalData_arg_series)
   # Configure series parsing and matching.
   if(ExternalData_SERIES_PARSE)
     if(NOT "${ExternalData_SERIES_PARSE}" MATCHES
@@ -335,27 +359,7 @@
   _ExternalData_exact_regex(series_ext "${ext}")
   _ExternalData_arg_find_files("${relbase}*${ext}"
     "${series_base}${series_match}${series_ext}")
-
-  if(NOT have_original)
-    message(FATAL_ERROR "Data file referenced by argument\n"
-      "  ${arg}\n"
-      "corresponds to source tree path\n"
-      "  ${reldata}\n"
-      "that does not exist (with or without an extension)!")
-  endif()
-
-  if(external)
-    # Make the series available in the build tree.
-    set_property(GLOBAL APPEND PROPERTY
-      _ExternalData_${target}_FETCH "${external}")
-    set_property(GLOBAL APPEND PROPERTY
-      _ExternalData_${target}_LOCAL "${internal}")
-    set("${var_file}" "${top_bin}/${reldata}" PARENT_SCOPE)
-  else()
-    # The whole series is in the source tree.
-    set("${var_file}" "${top_src}/${reldata}" PARENT_SCOPE)
-  endif()
-endfunction()
+endmacro()

 function(_ExternalData_arg_find_files pattern regex)
   file(GLOB globbed RELATIVE "${top_src}" "${top_src}/${pattern}*")


Added new option MITK_USE_VTK_5_8_IN_SUPERBUILD

--- CMakeExternals/VTK.cmake
+++ CMakeExternals/VTK.cmake
@@ -36,8 +36,15 @@
         )
   ENDIF()

+  OPTION(MITK_USE_VTK_5_8_IN_SUPERBUILD OFF)
+  IF(MITK_USE_VTK_5_8_IN_SUPERBUILD)
+    SET(VTK_URL http://mitk.org/download/thirdparty/vtk-5.8.0.tar.gz)
+  ELSE()
+    SET(VTK_URL http://mitk.org/download/thirdparty/vtk-5.6.1.tar.gz)
+  ENDIF()
+
   ExternalProject_Add(${proj}
-    URL http://mitk.org/download/thirdparty/vtk-5.6.1.tar.gz
+    URL ${VTK_URL}
     BINARY_DIR ${proj}-build
     INSTALL_COMMAND ""
     CMAKE_GENERATOR ${gen}
@@ -50,6 +57,7 @@
         -DBUILD_SHARED_LIBS:BOOL=ON
         -DVTK_USE_PARALLEL:BOOL=ON
         -DVTK_USE_CHARTS:BOOL=OFF
+        -DVTK_USE_QTCHARTS:BOOL=ON
         -DVTK_USE_GEOVIS:BOOL=OFF
         -DVTK_USE_SYSTEM_FREETYPE:BOOL=${VTK_USE_SYSTEM_FREETYPE}
         ${vtk_QT_ARGS}


Removed redundant code.

Removed redundant code.

--- CMakeExternals/VTK.cmake
+++ CMakeExternals/VTK.cmake
@@ -51,6 +51,7 @@

   if(APPLE)
     set(VTK_PATCH_COMMAND ${CMAKE_COMMAND} -DTEMPLATE_FILE:FILEPATH=${MITK_SOURCE_DIR}/CMakeExternals/EmptyFileForPatching.dummy -P ${MITK_SOURCE_DIR}/CMakeExternals/PatchVTK-5.10-Mac.cmake)
+  endif()

     ExternalProject_Add(${proj}
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src
@@ -78,35 +79,6 @@
      DEPENDS ${proj_DEPENDENCIES}
     )

-  else()
-
-    ExternalProject_Add(${proj}
-     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src
-     BINARY_DIR ${proj}-build
-     PREFIX ${proj}-cmake
-     URL ${VTK_URL}
-     URL_MD5 ${VTK_URL_MD5}
-     INSTALL_COMMAND ""
-     CMAKE_GENERATOR ${gen}
-     CMAKE_ARGS
-         ${ep_common_args}
-         -DVTK_WRAP_TCL:BOOL=OFF
-         -DVTK_WRAP_PYTHON:BOOL=OFF
-         -DVTK_WRAP_JAVA:BOOL=OFF
-         -DBUILD_SHARED_LIBS:BOOL=ON
-         -DVTK_USE_PARALLEL:BOOL=ON
-         -DVTK_USE_CHARTS:BOOL=OFF
-         -DVTK_USE_QTCHARTS:BOOL=ON
-         -DVTK_USE_GEOVIS:BOOL=OFF
-         -DVTK_USE_SYSTEM_FREETYPE:BOOL=${VTK_USE_SYSTEM_FREETYPE}
-         -DVTK_USE_QVTK_QTOPENGL:BOOL=OFF
-         -DVTK_LEGACY_REMOVE:BOOL=ON
-         ${additional_cmake_args}
-      DEPENDS ${proj_DEPENDENCIES}
-    )
-
-  endif()
-
   set(VTK_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj}-build)

 else()


Skip the line for Dr.Heapstat if ~~Dr.M~~ is anywhere in the line.

The %ANYLINE patterns can move these markers off of the start of the
line.  This change will allow the winthreads test to pass under
drheapstat.

SVN-Revision: 672

--- tests/runtest.cmake
+++ tests/runtest.cmake
@@ -391,10 +391,11 @@
     string(REGEX REPLACE "\n" "\r?\n" line "${line}")
   endif (WIN32)
   if (NOT "${cmd_tomatch}" MATCHES "${line}")
-    # ignore Dr. Memory lines for Dr. Heapstat
+    # Ignore Dr. Memory lines for Dr. Heapstat.  Match ~~Dr.M~~ anywhere in the
+    # line, since %ANYLINE can insert a paren at the beginning of the line.
     # FIXME PR 470723: add Dr. Heapstat-specific tests
     if (NOT TOOL_DR_HEAPSTAT OR
-        NOT "${line}" MATCHES "^~~Dr\\\\.M~~")
+        NOT "${line}" MATCHES "~~Dr\\\\.M~~")
       strip_trailing_newline_regex(line "${line}")
       set(msg "stderr failed to match \"${line}\"")
       # try to find what was meant to match


FindFreetype needs to look for the header ft2build.h separately; might be in a different directory.

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

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -43,11 +43,15 @@
 message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")

 find_path(FREETYPE_INCLUDE_DIR NAMES freetype/freetype.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES freetype2)
+find_path(FREETYPE_FT2BUILD_INCLUDE_DIR NAMES ft2build.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS})
 find_library(FREETYPE_LIBRARY_REL NAMES ${FREETYPE_LIBRARY_NAMES} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
 find_library(FREETYPE_LIBRARY_DBG NAMES ${FREETYPE_LIBRARY_NAMES_DBG} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
 make_library_set(FREETYPE_LIBRARY)

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

 # Reset framework finding
 set(CMAKE_FIND_FRAMEWORK "FIRST")


COMP: Fix deprecated interface warning when building designer plugin with Qt5

This commit fixes the following warning:

```
In file included from /path/to/CTK-build/CTK-build/Libs/Widgets/Plugins/../../../../../CTK/Libs/Widgets/Plugins/ctkWidgetsPlugins.h:27:0,
                 from /path/to/CTK-build/CTK-build/Libs/Widgets/Plugins/moc_ctkWidgetsPlugins.cpp:9:
/path/to/Qt5.9.1/5.9.1/gcc_64/include/QtDesigner/QDesignerCustomWidgetCollectionInterface:4:4: warning: #warning Header <QtDesigner/QDesignerCustomWidgetCollectionInterface> is deprecated. Please include <QtUiPlugin/QDesignerCustomWidgetCollectionInterface> instead. [-Wcpp]
 #  warning Header <QtDesigner/QDesignerCustomWidgetCollectionInterface> is deprecated. Please include <QtUiPlugin/QDesignerCustomWidgetCollectionInterface> instead.
    ^
```

--- CMake/ctkMacroBuildQtPlugin.cmake
+++ CMake/ctkMacroBuildQtPlugin.cmake
@@ -136,8 +136,12 @@
   string(REGEX REPLACE "(.*)Plugin[s]?" "\\1" label ${lib_name})

   # Apply properties to the library target.
+  set(compile_flags "-DQT_PLUGIN")
+  if(CTK_QT_VERSION VERSION_GREATER "4")
+    set(compile_flags "${compile_flags} -DHAVE_QT5")
+  endif()
   set_target_properties(${lib_name}  PROPERTIES
-    COMPILE_FLAGS "-DQT_PLUGIN"
+    COMPILE_FLAGS "${compile_flags}"
     LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${MY_PLUGIN_DIR}"
     LABELS ${label}
     )


configure the steering script for local cdash and to execute the tests

--- ctest/steer.cmake
+++ ctest/steer.cmake
@@ -1,32 +1,147 @@
-macro(debug msg)
-    message(STATUS "DEBUG ${msg}")
-endmacro()
+# -----------------------------------------------------------
+# -- Get environment
+# -----------------------------------------------------------

-macro(debugValue variableName)
-    debug("${variableName}=\${${variableName}}")
-endmacro()
+## -- Set hostname
+## --------------------------
+find_program(HOSTNAME_CMD NAMES hostname)
+exec_program(${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)

-# -- Get environment
-## SourceDirectory - /Users/rmudafor/Development/openfast
-## BuildDirectory - /Users/rmudafor/Development/openfast/ctest-build
+set(CTEST_SITE                          "${HOSTNAME}")

-find_program(CTEST_COMMAND NAMES ctest)
-set(CTEST_BUILD_NAME "openfast")
-set(CTEST_SOURCE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
-set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/ctest-build")
-message(${CTEST_SOURCE_DIRECTORY})
-message(${CTEST_BINARY_DIRECTORY})
+## -- Set site / build name
+## --------------------------

+find_program(UNAME NAMES uname)
+macro(getuname name flag)
+  exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
+endmacro(getuname)
+
+getuname(osname -s)
+getuname(osrel  -r)
+getuname(cpu    -m)
+
+set(CTEST_BUILD_NAME                    "${osname}-${cpu}-prod")
+
+## -- SVN command
+## ----------------
+find_program(CTEST_SVN_COMMAND NAMES git)
+
+## -- make command
+## -----------------
+find_program(MAKE NAMES make)
+
+# -----------------------------------------------------------
+# -- build specific
+# -----------------------------------------------------------
+
+set(MODEL                               "analysis")
+
+## -- DashBoard Root
+#set(CTEST_DASHBOARD_ROOT                "$ENV{HOME}/automatedBuild")
+set(CTEST_DASHBOARD_ROOT                "$ENV{HOME}/Sites/CDash")
+
+## -- SRC Dir
+#set(CTEST_SOURCE_DIRECTORY              "${CTEST_DASHBOARD_ROOT}/src")
+set(CTEST_SOURCE_DIRECTORY              "${CMAKE_CURRENT_SOURCE_DIR}")
+
+## -- BIN Dir
+#set(CTEST_BINARY_DIRECTORY              "${CTEST_SOURCE_DIRECTORY}/build-${CTEST_BUILD_NAME}")
+set(CTEST_BINARY_DIRECTORY              "${CTEST_SOURCE_DIRECTORY}/ctest-build")
+
+## -- Build options
+set(OPTION_BUILD                        "-j16")
+
+# -----------------------------------------------------------
+# -- commands
+# -----------------------------------------------------------
+
+## -- Checkout command
+if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
+	set(CTEST_CHECKOUT_COMMAND     "${CTEST_SVN_COMMAND} clone https://github.com/OpenFAST/openfast.git ${CTEST_SOURCE_DIRECTORY}")
+endif(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
+
+## -- Update Command
+set(CTEST_UPDATE_COMMAND               "${CTEST_SVN_COMMAND}")
+
+## -- Configure Command
+set(CTEST_CONFIGURE_COMMAND            "${CTEST_SOURCE_DIRECTORY}/configure configure --enable-optimization=3 --disable-debug --enable-doc=mono")
+
+## -- Build Command
+set(CTEST_BUILD_COMMAND                "${MAKE} ${OPTION_BUILD}")
+
+# -----------------------------------------------------------
 # -- Configure CTest
-configure_file(${CTEST_SOURCE_DIRECTORY}/ctest/CTestConfig.cmake ${CTEST_BINARY_DIRECTORY}/CTestConfig.cmake)
+# -----------------------------------------------------------
+
+## -- CTest Config
+#configure_file($ENV{HOME}/CTestConfiguration/CTestConfig.cmake	${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
+configure_file(${CTEST_SOURCE_DIRECTORY}/ctest/CTestConfig.cmake	${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
+
+## -- CTest Custom
+#configure_file($ENV{HOME}/CTestConfiguration/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+#configure_file(${CTEST_SOURCE_DIRECTORY}/ctest/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+
+## -- CTest Testfile
+#configure_file($ENV{HOME}/CTestConfiguration/CTestTestfile.cmake ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake)
 configure_file(${CTEST_SOURCE_DIRECTORY}/ctest/CTestTestfile.cmake ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake)
-#configure_file(${CTEST_SOURCE_DIRECTORY}/ctest/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+
+## -- read CTestCustom.cmake file
+#ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
 #ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")

-#set(CTEST_TIMEOUT "7200")
-#set($ENV{LC_MESSAGES} "en_EN" )
-#set(MODEL analysis)
+# -----------------------------------------------------------
+# -- Settings
+# -----------------------------------------------------------

+## -- Process timeout in seconds
+set(CTEST_TIMEOUT           "7200")
+
+## -- Set output to english
+set( $ENV{LC_MESSAGES}      "en_EN" )
+
+# -----------------------------------------------------------
 # -- Run CTest
+# -----------------------------------------------------------
+
+## -- Start
+message(" -- Start dashboard ${MODEL} - ${CTEST_BUILD_NAME} --")
 ctest_start(${MODEL} TRACK ${MODEL})
-ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+
+## -- Update
+message(" -- Update ${MODEL} - ${CTEST_BUILD_NAME} --")
+ctest_update(           SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
+
+## -- Run autoreconf
+message(" -- Autoreconf ${MODEL} - ${CTEST_BUILD_NAME} --")
+execute_process(COMMAND "/usr/bin/autoreconf" "-f" "-i" WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY} RESULT_VARIABLE autoreconfResult
+	OUTPUT_VARIABLE autoreconfLog ERROR_VARIABLE autoreconfLog)
+file(WRITE ${CTEST_BINARY_DIRECTORY}/Testing/autoreconf.log "${autoreconfLog}")
+
+if( NOT ${autoreconfResult} )
+
+	## -- Configure
+	message(" -- Configure ${MODEL} - ${CTEST_BUILD_NAME} --")
+	ctest_configure(BUILD  "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+
+	## -- BUILD
+	message(" -- Build ${MODEL} - ${CTEST_BUILD_NAME} --")
+	ctest_build(    BUILD  "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+
+	## -- INSTALL
+#	message(" -- Install ${MODEL} - ${CTEST_BUILD_NAME} --")
+#	execute_process(COMMAND "${MAKE} install ${OPTION_BUILD}" WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
+#		RESULT_VARIABLE makeInstallResult OUTPUT_VARIABLE makeInstallLog ERROR_VARIABLE makeInstallLog)
+#	file(WRITE ${CTEST_BINARY_DIRECTORY}/Testing/makeinstall.log "${makeInstallLog}")
+
+	## -- TEST
+	message(" -- Test ${MODEL} - ${CTEST_BUILD_NAME} --")
+	ctest_test(     BUILD  "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+
+endif( NOT ${autoreconfResult} )
+
+## -- SUBMIT
+message(" -- Submit ${MODEL} - ${CTEST_BUILD_NAME} --")
+ctest_submit(                                              RETURN_VALUE res)
+
+message(" -- Finished ${MODEL}  - ${CTEST_BUILD_NAME} --")


fix utils

fix utils

--- utils.cmake
+++ utils.cmake
@@ -122,7 +122,7 @@

 	if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
 		ADD_TEST(NAME ${TESTNAME}
-			COMMAND ${CMAKE_SOURCE_DIR}/cmake/run_test.sh ${TESTNAME}
+			COMMAND ${CMAKE_SOURCE_DIR}/cmaki/run_test.sh ${TESTNAME}
 					WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
 	else()
 		ADD_TEST(NAME ${TESTNAME}


Change CHANGE_SUMMARY parsing method

Change CHANGE_SUMMARY parsing method

--- Modules/ManageReleaseFedora.cmake
+++ Modules/ManageReleaseFedora.cmake
@@ -150,9 +150,9 @@
 	M_MSG(${M_INFO2}
 	    "MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE=${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE}")
 	SET(_cmdOpts "")
-	IF (NOT CHANGE_SUMMARY STREQUAL "")
+	IF (NOT "${CHANGE_SUMMARY}" STREQUAL "")
 	    SET(CHANGE_SUMMARY "Release ${PROJECT_NAME}-${PRJ_VER}")
-	ENDIF(NOT CHANGE_SUMMARY STREQUAL "")
+	ENDIF(NOT ${CHANGE_SUMMARY}" STREQUAL "")

 	IF (NOT REDHAT_BUGZILLA STREQUAL "")
 	    LIST(APPEND _cmdOpts "-b" "${REDHAT_BUGZILLA}")


[Build] Prepared the externalisation of AirRAC.

--- project_config_embeddable.cmake
+++ project_config_embeddable.cmake
@@ -292,6 +292,10 @@
       get_stdair (${_arg_version})
     endif (${_arg_lower} STREQUAL "stdair")

+    if (${_arg_lower} STREQUAL "airrac")
+      get_airrac (${_arg_version})
+    endif (${_arg_lower} STREQUAL "airrac")
+
     if (${_arg_lower} STREQUAL "doxygen")
       get_doxygen (${_arg_version})
     endif (${_arg_lower} STREQUAL "doxygen")
@@ -542,6 +546,38 @@
   endif (StdAir_FOUND)

 endmacro (get_stdair)
+
+# ~~~~~~~~~~ AirRAC ~~~~~~~~~
+macro (get_airrac)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires AirRAC-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires AirRAC without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (AirRAC ${_required_version} REQUIRED
+	HINTS ${WITH_AIRRAC_PREFIX})
+  if (AirRAC_FOUND)
+    #
+    message (STATUS "Found AirRAC version: ${AIRRAC_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${AIRRAC_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AIRRAC_LIBRARIES})
+
+  else (AirRAC_FOUND)
+    set (ERROR_MSG "The AirRAC library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_AIRRAC_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<AirRAC install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (AirRAC_FOUND)
+
+endmacro (get_airrac)

 ##############################################
@@ -1500,6 +1536,20 @@
     message (STATUS "  - STDAIR_SAMPLE_DIR .......... : ${STDAIR_SAMPLE_DIR}")
   endif (StdAir_FOUND)
 endmacro (display_stdair)
+
+# AirRAC
+macro (display_airrac)
+  if (AirRAC_FOUND)
+    message (STATUS)
+    message (STATUS "* AirRAC:")
+    message (STATUS "  - AIRRAC_VERSION ............. : ${AIRRAC_VERSION}")
+    message (STATUS "  - AIRRAC_BINARY_DIRS ......... : ${AIRRAC_BINARY_DIRS}")
+    message (STATUS "  - AIRRAC_EXECUTABLES ......... : ${AIRRAC_EXECUTABLES}")
+    message (STATUS "  - AIRRAC_LIBRARY_DIRS ........ : ${AIRRAC_LIBRARY_DIRS}")
+    message (STATUS "  - AIRRAC_LIBRARIES ........... : ${AIRRAC_LIBRARIES}")
+    message (STATUS "  - AIRRAC_INCLUDE_DIRS ........ : ${AIRRAC_INCLUDE_DIRS}")
+  endif (AirRAC_FOUND)
+endmacro (display_airrac)

 ##
 macro (display_status_all_modules)
@@ -1585,6 +1635,7 @@
   display_mysql ()
   display_soci ()
   display_stdair ()
+  display_airrac ()
   #
   message (STATUS)
   message (STATUS "Change a value with: cmake -D<Variable>=<Value>" )


Fixing gflags static link

Fixing gflags static link

Former-commit-id: c869b0a3ac87b2e847f2105bec12b14ffc93033f

--- cmake-modules/Fetch_Ceres.cmake
+++ cmake-modules/Fetch_Ceres.cmake
@@ -43,9 +43,9 @@

     message(STATUS "ceres flags: ${FLAGS}")
-    message(STATUS "GFLAGS_LIBRARIES    : ${GFLAGS_LIBRARIES}")
+    message(STATUS "GFLAGS_LIBRARY_DIR  : ${GFLAGS_LIBRARY_DIR}")
     message(STATUS "GFLAGS_INCLUDE_DIR  : ${GFLAGS_INCLUDE_DIR}")
-    message(STATUS "GLOG_LIBRARIES      : ${GLOG_LIBRARIES}")
+    message(STATUS "GLOG_LIBRARY_DIR    : ${GLOG_LIBRARY_DIR}")
     message(STATUS "GLOG_INCLUDE_DIR    : ${GLOG_INCLUDE_DIR}")

     include(ExternalProject)
@@ -70,10 +70,10 @@
             -DEIGEN_INCLUDE_DIR_HINTS:PATH=${EIGEN3_INCLUDE_DIR}
             -DEIGEN_PREFER_EXPORTED_EIGEN_CMAKE_CONFIGURATION:BOOL=FALSE
             -DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION:BOOL=FALSE
-            -DGFLAGS_INCLUDE_DIR_HINTS:PATH=${GFLAGS_INCLUDE_DIR}
+            -DGFLAGS_INCLUDE_DIR_HINTS:PATH=${GFLAGS_INCLUDE_DIR} ${GLOG_INCLUDE_DIR}
             -DGFLAGS_LIBRARY_DIR_HINTS:PATH=${GFLAGS_LIBRARY_DIR}
             -DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION:BOOL=FALSE
-            -DGLOG_INCLUDE_DIR_HINTS:PATH=${GLOG_INCLUDE_DIR}
+            -DGLOG_INCLUDE_DIR_HINTS:PATH=${GLOG_INCLUDE_DIR} ${GFLAGS_INCLUDE_DIR}
             -DGLOG_LIBRARY_DIR_HINTS:PATH=${GLOG_LIBRARY_DIR}
             -DLAPACK:BOOL=OFF
             -DEIGENSPARSE:BOOL=ON


added -fPIC to sl-compiler.cmake

added -fPIC to sl-compiler.cmake

--- cmake-modules/sl-compiler.cmake
+++ cmake-modules/sl-compiler.cmake
@@ -4,6 +4,9 @@
         ##      ##    or <http://opensource.org/licenses/MIT>
         ##      ##
 ##########      ############################################################# shaduzlabs.com #######
+
+set (CMAKE_C_FLAGS "$CMAKE_C_FLAGS -fPIC")
+set (CMAKE_CXX_FLAGS "$CMAKE_CXX_FLAGS -fPIC")

 if( CMAKE_CXX_COMPILER_ID MATCHES "GNU|AppleClang|Clang" )
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=256 -std=c++11")


adding Travis

adding Travis

Former-commit-id: 1ab0513a6b8a1ea1f9bd735b8eb56a9c63913d4c

--- cmake/Find_or_install_GSL.cmake
+++ cmake/Find_or_install_GSL.cmake
@@ -36,7 +36,9 @@
         message(FATAL_ERROR "GSL not found and failed to install: ${res_var}")
     endif()
     include(${PROJECT_SOURCE_DIR}/libs/gsl/FindGSL.cmake)
+    get_libraries(${GSL_LIB_DIR} gsl  GSL_LIBRARIES)
     message("SUCCESSFULLY INSTALLED GSL:   ${GSL_LIBRARIES}")
+
 endif()


rm hiredis finder

rm hiredis finder

--- cmake/Modules/FindHiredis.cmake
+++ cmake/Modules/FindHiredis.cmake
@@ -1,137 +0,0 @@
-#
-# This module is designed to find/handle hiredis library
-#
-# Requirements:
-# - CMake >= 2.8.3 (for new version of find_package_handle_standard_args)
-#
-# The following variables will be defined for your use:
-#   - HIREDIS_INCLUDE_DIRS  : hiredis include directory
-#   - HIREDIS_LIBRARIES     : hiredis libraries
-#   - HIREDIS_VERSION       : complete version of hiredis (x.y.z)
-#   - HIREDIS_MAJOR_VERSION : major version of hiredis
-#   - HIREDIS_MINOR_VERSION : minor version of hiredis
-#   - HIREDIS_PATCH_VERSION : patch version of hiredis
-#
-# How to use:
-#   1) Copy this file in the root of your project source directory
-#   2) Then, tell CMake to search this non-standard module in your project directory by adding to your CMakeLists.txt:
-#        set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
-#   3) Finally call find_package(Hiredis) once
-#
-# Here is a complete sample to build an executable:
-#
-#   set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
-#
-#   find_package(Hiredis REQUIRED) # Note: name is case sensitive
-#
-#   include_directories(${HIREDIS_INCLUDE_DIRS})
-#   add_executable(myapp myapp.c)
-#   target_link_libraries(myapp ${HIREDIS_LIBRARIES})
-#
-
-
-#=============================================================================
-# Copyright (c) 2012, julp
-#
-# Distributed under the OSI-approved BSD License
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-#=============================================================================
-
-cmake_minimum_required(VERSION 2.8.3)
-
-########## Private ##########
-if(NOT DEFINED HIREDIS_PUBLIC_VAR_NS)
-    set(HIREDIS_PUBLIC_VAR_NS "HIREDIS")
-endif(NOT DEFINED HIREDIS_PUBLIC_VAR_NS)
-if(NOT DEFINED HIREDIS_PRIVATE_VAR_NS)
-    set(HIREDIS_PRIVATE_VAR_NS "_${HIREDIS_PUBLIC_VAR_NS}")
-endif(NOT DEFINED HIREDIS_PRIVATE_VAR_NS)
-
-function(hiredis_debug _VARNAME)
-    if(${HIREDIS_PUBLIC_VAR_NS}_DEBUG)
-        if(DEFINED ${HIREDIS_PUBLIC_VAR_NS}_${_VARNAME})
-            message("${HIREDIS_PUBLIC_VAR_NS}_${_VARNAME} = ${${HIREDIS_PUBLIC_VAR_NS}_${_VARNAME}}")
-        else(DEFINED ${HIREDIS_PUBLIC_VAR_NS}_${_VARNAME})
-            message("${HIREDIS_PUBLIC_VAR_NS}_${_VARNAME} = <UNDEFINED>")
-        endif(DEFINED ${HIREDIS_PUBLIC_VAR_NS}_${_VARNAME})
-    endif(${HIREDIS_PUBLIC_VAR_NS}_DEBUG)
-endfunction(hiredis_debug)
-
-# Workaround for find_package: no way to force case of variable's names it creates (I don't want to change MY coding standard)
-function(totitle _STRING _OUTPUT_VAR)
-    string(SUBSTRING ${_STRING} 0  1 FIRST_CHAR)
-    string(SUBSTRING ${_STRING} 1 -1 STRING_REST)
-    string(TOLOWER ${STRING_REST} LOWCASE_STRING_REST)
-    string(TOUPPER ${FIRST_CHAR} UPCASED_FIRST_CHAR)
-    set(${_OUTPUT_VAR} "${UPCASED_FIRST_CHAR}${LOWCASE_STRING_REST}" PARENT_SCOPE)
-endfunction(totitle)
-
-totitle(${HIREDIS_PUBLIC_VAR_NS} ${HIREDIS_PRIVATE_VAR_NS}_FIND_PKG_PREFIX)
-# Alias all Hiredis_FIND_X variables to HIREDIS_FIND_X
-get_directory_property(${HIREDIS_PRIVATE_VAR_NS}_CURRENT_VARIABLES VARIABLES)
-foreach(${HIREDIS_PRIVATE_VAR_NS}_VARNAME ${${HIREDIS_PRIVATE_VAR_NS}_CURRENT_VARIABLES})
-    if(${HIREDIS_PRIVATE_VAR_NS}_VARNAME MATCHES "^${${HIREDIS_PRIVATE_VAR_NS}_FIND_PKG_PREFIX}")
-        string(REGEX REPLACE "^${${HIREDIS_PRIVATE_VAR_NS}_FIND_PKG_PREFIX}" "${HIREDIS_PUBLIC_VAR_NS}" ${HIREDIS_PRIVATE_VAR_NS}_NORMALIZED_VARNAME ${${HIREDIS_PRIVATE_VAR_NS}_VARNAME})
-        set(${${HIREDIS_PRIVATE_VAR_NS}_NORMALIZED_VARNAME} ${${${HIREDIS_PRIVATE_VAR_NS}_VARNAME}})
-    endif(${HIREDIS_PRIVATE_VAR_NS}_VARNAME MATCHES "^${${HIREDIS_PRIVATE_VAR_NS}_FIND_PKG_PREFIX}")
-endforeach(${HIREDIS_PRIVATE_VAR_NS}_VARNAME)
-
-########## Public ##########
-find_path(
-    ${HIREDIS_PUBLIC_VAR_NS}_INCLUDE_DIRS
-    NAMES hiredis.h
-    PATH_SUFFIXES "hiredis"
-)
-
-if(${HIREDIS_PUBLIC_VAR_NS}_INCLUDE_DIRS)
-
-    find_library(
-        ${HIREDIS_PUBLIC_VAR_NS}_LIBRARIES
-        NAMES hiredis
-    )
-
-    file(READ "${${HIREDIS_PUBLIC_VAR_NS}_INCLUDE_DIRS}/hiredis.h" ${HIREDIS_PRIVATE_VAR_NS}_H_CONTENT)
-    string(REGEX REPLACE ".*# *define *HIREDIS_MAJOR *([0-9]+).*" "\\1" ${HIREDIS_PUBLIC_VAR_NS}_MAJOR_VERSION ${${HIREDIS_PRIVATE_VAR_NS}_H_CONTENT})
-    string(REGEX REPLACE ".*# *define *HIREDIS_MINOR *([0-9]+).*" "\\1" ${HIREDIS_PUBLIC_VAR_NS}_MINOR_VERSION ${${HIREDIS_PRIVATE_VAR_NS}_H_CONTENT})
-    string(REGEX REPLACE ".*# *define *HIREDIS_PATCH *([0-9]+).*" "\\1" ${HIREDIS_PUBLIC_VAR_NS}_PATCH_VERSION ${${HIREDIS_PRIVATE_VAR_NS}_H_CONTENT})
-    set(${HIREDIS_PUBLIC_VAR_NS}_VERSION "${${HIREDIS_PUBLIC_VAR_NS}_MAJOR_VERSION}.${${HIREDIS_PUBLIC_VAR_NS}_MINOR_VERSION}.${${HIREDIS_PUBLIC_VAR_NS}_PATCH_VERSION}")
-
-    include(FindPackageHandleStandardArgs)
-    if(${HIREDIS_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${HIREDIS_PUBLIC_VAR_NS}_FIND_QUIETLY)
-        find_package_handle_standard_args(
-            ${HIREDIS_PUBLIC_VAR_NS}
-            REQUIRED_VARS ${HIREDIS_PUBLIC_VAR_NS}_LIBRARIES ${HIREDIS_PUBLIC_VAR_NS}_INCLUDE_DIRS
-            VERSION_VAR ${HIREDIS_PUBLIC_VAR_NS}_VERSION
-        )
-    else(${HIREDIS_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${HIREDIS_PUBLIC_VAR_NS}_FIND_QUIETLY)
-        find_package_handle_standard_args(${HIREDIS_PUBLIC_VAR_NS} "hiredis not found" ${HIREDIS_PUBLIC_VAR_NS}_LIBRARIES ${HIREDIS_PUBLIC_VAR_NS}_INCLUDE_DIRS)
-    endif(${HIREDIS_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${HIREDIS_PUBLIC_VAR_NS}_FIND_QUIETLY)
-
-else(${HIREDIS_PUBLIC_VAR_NS}_INCLUDE_DIRS)
-
-    if(${HIREDIS_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${HIREDIS_PUBLIC_VAR_NS}_FIND_QUIETLY)
-        message(FATAL_ERROR "Could not find hiredis include directory")
-    endif(${HIREDIS_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${HIREDIS_PUBLIC_VAR_NS}_FIND_QUIETLY)
-
-endif(${HIREDIS_PUBLIC_VAR_NS}_INCLUDE_DIRS)
-
-mark_as_advanced(
-    ${HIREDIS_PUBLIC_VAR_NS}_INCLUDE_DIRS
-    ${HIREDIS_PUBLIC_VAR_NS}_LIBRARIES
-)
-
-# IN (args)
-hiredis_debug("FIND_REQUIRED")
-hiredis_debug("FIND_QUIETLY")
-hiredis_debug("FIND_VERSION")
-# OUT
-# Linking
-hiredis_debug("INCLUDE_DIRS")
-hiredis_debug("LIBRARIES")
-# Version
-hiredis_debug("MAJOR_VERSION")
-hiredis_debug("MINOR_VERSION")
-hiredis_debug("PATCH_VERSION")
-hiredis_debug("VERSION")


Revert inadvertant checkin of CMake libdeps.

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

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -1,28 +1,28 @@
-set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMAsmPrinter LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMARMDisassembler LLVMARMCodeGen LLVMARMInfo LLVMMC LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMARMDisassembler LLVMARMCodeGen LLVMARMInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMARMInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMMCParser LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBlackfinInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
 set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
 set(MSVC_LIB_DEPS_LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCppBackendInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMInstCombine LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
@@ -30,46 +30,45 @@
 set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils)
-set(MSVC_LIB_DEPS_LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMMBlazeAsmPrinter LLVMMC LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMBlazeAsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMBlazeCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMBlazeAsmPrinter LLVMMBlazeInfo LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMBlazeDisassembler LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMC LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMDisassembler LLVMARMInfo LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsCodeGen LLVMMipsInfo LLVMPTXCodeGen LLVMPTXInfo LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystem LLVMSystemZCodeGen LLVMSystemZInfo LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreCodeGen LLVMXCoreInfo)
-set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMMC LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430AsmPrinter LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMObject LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMPTXAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMPTXInfo LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMPTXCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPTXInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMPTXAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMPTXInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMPTXCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPTXInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPTXInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMMC LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCAsmPrinter LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
 set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcInfo LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMSystem )
-set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMSystemZInfo LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMSystemZCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMSystemZInfo LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystemZInfo LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSystemZCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystemZInfo LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMipa)
-set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMSystem LLVMTarget LLVMX86Info)
-set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMMC LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMTarget LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86AsmPrinter LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Info LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMXCoreInfo)
-set(MSVC_LIB_DEPS_LLVMXCoreCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMXCoreInfo)
+set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMXCoreInfo)
+set(MSVC_LIB_DEPS_LLVMXCoreCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreInfo)
 set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)


[CMake] Fix creation of swiftmodule directories on Apple platforms (2)

The previous commit resulted in multiple targets that claimed to be
able to generate the directories in question. Instead, just create the
directories as a pre-build step for the targets that actually need
them. (This does keep the cleanup for the existing directory creation
target, though.)

More https://bugs.swift.org/browse/SR-10029

--- cmake/modules/SwiftSource.cmake
+++ cmake/modules/SwiftSource.cmake
@@ -195,6 +195,7 @@

   # Compute flags for the Swift compiler.
   set(swift_flags)
+  set(swift_module_flags)

   _add_variant_swift_compile_flags(
       "${SWIFTFILE_SDK}"
@@ -309,6 +310,8 @@
     if(SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
       set(specific_module_dir "${module_base}.swiftmodule")
       set(module_base "${module_base}.swiftmodule/${SWIFTFILE_ARCHITECTURE}")
+    else()
+      set(specific_module_dir)
     endif()
     set(module_file "${module_base}.swiftmodule")
     set(module_doc_file "${module_base}.swiftdoc")
@@ -321,14 +324,8 @@

     if(SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES)
       set(interface_file "${module_base}.swiftinterface")
-      list(APPEND swift_flags
-          "-emit-parseable-module-interface-path" "${interface_file}")
-    endif()
-
-    if(SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
-      list(APPEND dirs_to_create "${specific_module_dir}")
-    else()
-      list(APPEND dirs_to_create "${module_dir}")
+      list(APPEND swift_module_flags
+           "-emit-parseable-module-interface-path" "${interface_file}")
     endif()

     # If we have extra regexp flags, check if we match any of the regexps. If so
@@ -495,9 +492,12 @@
         COMMAND
           "${CMAKE_COMMAND}" "-E" "remove" "-f" ${module_outputs}
         COMMAND
+          "${CMAKE_COMMAND}" "-E" "make_directory" ${module_dir}
+          ${specific_module_dir}
+        COMMAND
           "${PYTHON_EXECUTABLE}" "${line_directive_tool}" "@${file_path}" --
           "${swift_compiler_tool}" "-emit-module" "-o" "${module_file}"
-          ${swift_flags} "@${file_path}"
+          ${swift_flags} ${swift_module_flags} "@${file_path}"
         ${command_touch_module_outputs}
         OUTPUT ${module_outputs}
         DEPENDS


add function(add_target_link_flags TARGET_NAME)

--- project/cmake/CompilerOption.cmake
+++ project/cmake/CompilerOption.cmake
@@ -102,6 +102,14 @@
             endif ()
         endif ()
     endfunction(remove_target_properties)
+
+    function(add_target_link_flags TARGET_NAME)
+        if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.12.0")
+            add_target_properties(${TARGET_NAME} LINK_OPTIONS ${ARGN})
+        else ()
+            add_target_properties(${TARGET_NAME} LINK_FLAGS ${ARGN})
+        endif ()
+    endfunction(add_target_link_flags)

     # Auto compiler options, support gcc,MSVC,Clang,AppleClang
     if( ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")


commented FRI CMake code

commented FRI CMake code

--- config/FRI-Client-SDK_Cpp.cmake
+++ config/FRI-Client-SDK_Cpp.cmake
@@ -1,3 +1,15 @@
+# Sets up KUKA Sunrise FRI Cpp SDK with KUKA connectivity suite
+
+# Variables
+# FRI_Client_SDK_Cpp_zip_PATH - Path to folder containing FRI-Client-SDK_Cpp.zip
+#
+# Targets
+# KukaFRIClient     - KukaFRIClient Libraries you should link to to use Kuka FRI APIs
+# nanopb            - nanopb library used to communicate with FRI on Kuka controller
+# friUdpConnection  - UDP components for demo code (not needed by github.com/ahundt/grl)
+#
+# Author: Andrew Hundt <ATHundt@gmail.com>
+
 # Sets up KUKA Sunrise FRI Cpp SDK with KUKA connectivity suite
 message(STATUS "Looking for File Path to FRI-Client-SDK_Cpp.zip KUKA FRI C++ API zip file from sunrise connectivity suite v1.9")
 set(FRI_Client_SDK_Cpp_zip_PATH "${CMAKE_SOURCE_DIR}/data/" CACHE FILEPATH "File Path to FRI-Client-SDK_Cpp.zip KUKA FRI C++ API zip file from sunrise connectivity suite v1.9")


COMP: itk::RGBAPixel< unsigned short > is always used.

--- Wrapping/WrapITK/WrapITKTypes.cmake
+++ Wrapping/WrapITK/WrapITKTypes.cmake
@@ -114,9 +114,7 @@
 SET(itk_Wrap_RGBPixel ${WRAPPER_TEMPLATES})

 WRAP_TYPE("itk::RGBAPixel" "RGBA")
-  IF(WRAP_rgba_unsigned_char)
-    WRAP_TEMPLATE("${ITKM_UC}" "${ITKT_UC}")
-  ENDIF(WRAP_rgba_unsigned_char)
+  WRAP_TEMPLATE("${ITKM_UC}" "${ITKT_UC}")

   IF(WRAP_rgba_unsigned_short)
     WRAP_TEMPLATE("${ITKM_US}" "${ITKT_US}")


Revert to earlier version of vigra due to interface and vigranumpy test segmentation fault

--- vigra.cmake
+++ vigra.cmake
@@ -20,10 +20,16 @@
 include (boost)
 include (numpy)

+#external_source (vigra
+#    1.8.0
+#    vigra-1.8.0-src.tar.gz
+#    15c5544448e529ee60020758ab6be264
+#    http://hci.iwr.uni-heidelberg.de/vigra)
+
 external_source (vigra
-    1.8.0
-    vigra-1.8.0-src.tar.gz
-    15c5544448e529ee60020758ab6be264
+    1.7.1
+    vigra-1.7.1-src.tar.gz
+    2bde208e0fd7626770169dd4fa097282
     http://hci.iwr.uni-heidelberg.de/vigra)

 # Note the number of forced -D CMake variable sets in the configure.


Fix up size class generation

Fix up size class generation

--- Utilities.cmake
+++ Utilities.cmake
@@ -46,9 +46,29 @@
 # Thankfully, no floating point calcs
 #
 # Defined upon return:
+# - psz ("yes" or "no")
+# - bin ("yes" or "no")
 # - lg_delta_lookup (${lg_delta} or "no")
-# - bin ("yes" or "no")
 function(size_class index lg_grp lg_delta ndelta lg_p lg_g lg_kmax output_file)
+
+  if(${lg_delta} GREATER ${lg_p})
+    set(psz "yes")
+  else()
+    pow2(${lg_p} "p")
+    pow2(${lg_grp} "grp")
+    pow2(${lg_delta} "delta")
+
+    math(EXPR sz "${grp} + ${delta} * ${ndelta}")
+    math(EXPR npgs "${sz} / ${p}")
+
+    # Check if the integer division above had a rem
+    math(EXPR product "${npgs} * ${p}")
+    if(${sz} EQUAL ${product})
+      set(psz "yes")
+    else()
+      set(psz "no")
+    endif()
+  endif()

   lg( ${ndelta} "lg_ndelta")
   pow2(${lg_ndelta} "pow2_result")
@@ -88,18 +108,20 @@

   ## TODO: Formatted output maybe necessary
   file (APPEND "${output_file}"
-    "    SC(  ${index}, ${lg_grp},  ${lg_delta},  ${ndelta}, ${bin},  ${lg_delta_lookup}) \\\n"
+    "    SC(  ${index}, ${lg_grp},  ${lg_delta},  ${ndelta}, ${psz}, ${bin}, ${lg_delta_lookup}) \\\n"
     )

   # Defined upon return:
+  # - psz ("yes" or "no")
+  # - bin ("yes" or "no")
   # - lg_delta_lookup (${lg_delta} or "no")
-  # - bin ("yes" or "no")

   # Promote to PARENT_SCOPE
+  set(psz ${psz} PARENT_SCOPE)
+  set(bin ${bin} PARENT_SCOPE)
   set(lg_delta_lookup ${lg_delta_lookup} PARENT_SCOPE)
-  set(bin ${bin} PARENT_SCOPE)
-
-  # message(STATUS "size_class_result: lg_delta_lookup: ${lg_delta_lookup} bin: ${bin}")
+
+  # message(STATUS "size_class_result: psz: ${psz} bin: ${bin} lg_delta_lookup: ${lg_delta_lookup}")
 endfunction(size_class)

 ####################################################################
@@ -111,6 +133,7 @@
 # - nlbins
 # - nbins
 # - nsizes
+# - npsizes
 # - lg_tiny_maxclass
 # - lookup_maxclass
 # - small_maxclass
@@ -124,13 +147,14 @@

   file(APPEND "${output_file}"
     "#define	SIZE_CLASSES \\\n"
-    "  /* index, lg_grp, lg_delta, ndelta, bin, lg_delta_lookup */ \\\n"
+    "  /* index, lg_grp, lg_delta, ndelta, psz, bin, lg_delta_lookup */ \\\n"
   )

   set(ntbins 0)
   set(nlbins 0)
   set(lg_tiny_maxclass "\"NA\"")
   set(nbins 0)
+  set(npsizes 0)

   # Tiny size classes.
   set(ndelta 0)
@@ -146,6 +170,9 @@

     if(NOT "${lg_delta_lookup}" STREQUAL "no")
       math(EXPR nlbins "${index} + 1")
+    endif()
+    if(${psz} STREQUAL "yes")
+      math(EXPR npsizes "${npsizes} + 1")
     endif()
     if(NOT "${bin}" STREQUAL "no")
       math(EXPR nbins "${index} + 1")
@@ -171,12 +198,18 @@
     math(EXPR index "${index} + 1")
     math(EXPR lg_grp "${lg_grp} + 1")
     math(EXPR lg_delta "${lg_delta} + 1")
+    if(${psz} STREQUAL "yes")
+      math(EXPR npsizes "${npsizes} + 1")
+    endif()
   endif()

   while (${ndelta} LESS ${g})
     size_class( ${index} ${lg_grp} ${lg_delta} ${ndelta} ${lg_p} ${lg_g} ${lg_kmax} "${output_file}")
     math(EXPR index "${index} + 1")
     math(EXPR ndelta "${ndelta} + 1")
+    if(${psz} STREQUAL "yes")
+      math(EXPR npsizes "${npsizes} + 1")
+    endif()
   endwhile (${ndelta} LESS ${g})

   # All remaining groups.
@@ -205,7 +238,9 @@
         # Final written value is correct:
         set(lookup_maxclass "((((size_t)1) << ${lg_grp}) + (((size_t)${ndelta}) << ${lg_delta}))")
       endif()
-
+      if(${psz} STREQUAL "yes")
+        math(EXPR npsizes "${npsizes} + 1")
+      endif()
       if(NOT "${bin}" STREQUAL "no")
         math(EXPR nbins "${index} + 1")
         # # Final written value is correct:
@@ -234,6 +269,7 @@
   # - nlbins
   # - nbins
   # - nsizes
+  # - npsizes
   # - lg_tiny_maxclass
   # - lookup_maxclass
   # - small_maxclass
@@ -245,6 +281,7 @@
   set(nlbins ${nlbins} PARENT_SCOPE)
   set(nbins ${nbins} PARENT_SCOPE)
   set(nsizes ${nsizes} PARENT_SCOPE)
+  set(npsizes ${npsizes} PARENT_SCOPE)
   set(lg_tiny_maxclass ${lg_tiny_maxclass} PARENT_SCOPE)
   set(lookup_maxclass ${lookup_maxclass} PARENT_SCOPE)
   set(small_maxclass ${small_maxclass} PARENT_SCOPE)
@@ -255,11 +292,12 @@
           # "nlbins ${nlbins} "
           # "nbins ${nbins} "
           # "nsizes ${nsizes} "
+          # "npsizes ${npsizes} "
           # "lg_tiny_maxclass ${lg_tiny_maxclass} "
           # "lookup_maxclass ${lookup_maxclass} "
           # "small_maxclass ${small_maxclass} "
           # "lg_large_minclass ${lg_large_minclass} "
-          # "huge_maxclass ${huge_maxclass}"
+          # "large_maxclass ${huge_maxclass}"
           # )

 endfunction(size_classes)
@@ -296,12 +334,13 @@
 " *\n"
 " *   LG_SIZE_CLASS_GROUP: Lg of size class count for each size doubling.\n"
 " *   SIZE_CLASSES: Complete table of\n"
-" *                 SC(index, lg_grp, lg_delta, ndelta, bin, lg_delta_lookup)\n"
+" *                 SC(index, lg_grp, lg_delta, ndelta, psz, bin, lg_delta_lookup)\n"
 " *                 tuples.\n"
 " *     index: Size class index.\n"
 " *     lg_grp: Lg group base size (no deltas added).\n"
 " *     lg_delta: Lg delta to previous size class.\n"
 " *     ndelta: Delta multiplier.  size == 1<<lg_grp + ndelta<<lg_delta\n"
+" *     psz: 'yes' if a multiple of the page size, 'no' otherwise.\n"
 " *     bin: 'yes' if a small bin size class, 'no' otherwise.\n"
 " *     lg_delta_lookup: Same as lg_delta if a lookup table size class, 'no'\n"
 " *                      otherwise.\n"
@@ -309,6 +348,7 @@
 " *   NLBINS: Number of bins supported by the lookup table.\n"
 " *   NBINS: Number of small size class bins.\n"
 " *   NSIZES: Number of size classes.\n"
+" *   NPSIZES: Number of size classes that are a multiple of (1U << LG_PAGE).\n"
 " *   LG_TINY_MAXCLASS: Lg of maximum tiny size class.\n"
 " *   LOOKUP_MAXCLASS: Maximum size class included in lookup table.\n"
 " *   SMALL_MAXCLASS: Maximum small size class.\n"
@@ -334,6 +374,7 @@
           "#define	NLBINS			${nlbins}\n"
           "#define	NBINS			${nbins}\n"
           "#define	NSIZES			${nsizes}\n"
+          "#define	NPSIZES			${npsizes}\n"
           "#define	LG_TINY_MAXCLASS	${lg_tiny_maxclass}\n"
           "#define	LOOKUP_MAXCLASS		${lookup_maxclass}\n"
           "#define	SMALL_MAXCLASS		${small_maxclass}\n"


improve compiler flag handling

improve compiler flag handling

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -1,8 +1,12 @@
 ##
 # This file sets compiler flags and things related
-# to OS detection
+# to compiler detection
 ##

+
+#
+# The mode (standard) to be used by the compiler
+#
 set (C_MODE "-std=gnu99 -pedantic")

 if (COMPILE_CXX11_MODE)
@@ -11,8 +15,10 @@
 	set (CXX_MODE "-std=c++98 -pedantic")
 endif()

-set (EXTRA_FLAGS "${EXTRA_FLAGS} -Wall -Wextra")

+#
+# Extra handling/flags for specific compilers/OS
+#
 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
 	set (EXTRA_FLAGS "${EXTRA_FLAGS} -Wno-error=non-pod-varargs")
 	message (STATUS "Clang detected")
@@ -22,15 +28,30 @@
 	message (STATUS "GCC detected")
 endif (CMAKE_COMPILER_IS_GNUCXX)

-if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
-	set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_MODE} ${EXTRA_FLAGS} -Wsign-compare -Wfloat-equal -Wformat-security")
-	set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_MODE} ${EXTRA_FLAGS} -Wshadow -Wno-missing-field-initializers")
-
-	message (STATUS "C flags are ${CMAKE_C_FLAGS})
-	message (STATUS "CXX flags are ${CMAKE_CXX_FLAGS})
-endif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
-
 if (WIN32)
 	set (HAVE_WIN32 "1")
 	message (STATUS "Win32 detected")
 endif (WIN32)
+
+
+
+#
+# Common flags can be used by both C and C++
+#
+set (COMMON_FLAGS "${COMMON_FLAGS} -Wall -Wextra")
+
+
+
+#
+# Now set flags for compilers
+#
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
+	set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_MODE} ${EXTRA_FLAGS} ${COMMON_FLAGS} -Wsign-compare -Wfloat-equal -Wformat-security")
+	set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_MODE} ${EXTRA_FLAGS} ${COMMON_FLAGS} -Wshadow -Wno-missing-field-initializers")
+
+	message (STATUS "C flags are ${CMAKE_C_FLAGS}")
+	message (STATUS "CXX flags are ${CMAKE_CXX_FLAGS}")
+else (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
+	message (STATUS "Compiler is nor clang nor gnu gcc, no compiler flags are set")
+endif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
+


fix flag for clang

fix flag for clang

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -94,7 +94,7 @@
 	set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage -lgcov")
 endif (ENABLE_COVERAGE)

-set (CXX_EXTRA_FLAGS "${CXX_EXTRA_FLAGS} -Wstrict-null-sentinel -Wno-missing-field-initializers")
+set (CXX_EXTRA_FLAGS "${CXX_EXTRA_FLAGS} -Wno-missing-field-initializers")
 set (CXX_EXTRA_FLAGS "${CXX_EXTRA_FLAGS} -Wold-style-cast -Woverloaded-virtual  -Wsign-promo")

 #


add support for latest Turing gpu and cuda 10

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -81,6 +81,8 @@
     set(__cuda_arch_bin "6.0 6.1")
   elseif(CUDA_GENERATION STREQUAL "Volta")
     set(__cuda_arch_bin "7.0")
+  elseif(CUDA_GENERATION STREQUAL "Turing")
+    set(__cuda_arch_bin "7.5")
   elseif(CUDA_GENERATION STREQUAL "Auto")
     execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" ${CUDA_NVCC_FLAGS} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
                      WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
@@ -105,7 +107,7 @@
                        ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
       if(NOT _nvcc_res EQUAL 0)
         message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.")
-        set(__cuda_arch_bin "5.3 6.2 7.0")
+        set(__cuda_arch_bin "5.3 6.2 7.0 7.5")
       else()
         set(__cuda_arch_bin "${_nvcc_out}")
         string(REPLACE "2.1" "2.1(2.0)" __cuda_arch_bin "${__cuda_arch_bin}")
@@ -114,8 +116,10 @@
     else()
       if(${CUDA_VERSION} VERSION_LESS "9.0")
         set(__cuda_arch_bin "2.0 3.0 3.5 3.7 5.0 5.2 6.0 6.1")
+      elseif(${CUDA_VERSION} VERSION_LESS "10.0")
+        set(__cuda_arch_bin "3.0 3.5 3.7 5.0 5.2 6.0 6.1 7.0")
       else()
-        set(__cuda_arch_bin "3.0 3.5 3.7 5.0 5.2 6.0 6.1 7.0")
+        set(__cuda_arch_bin "3.0 3.5 3.7 5.0 5.2 6.0 6.1 7.0 7.5")
       endif()
     endif()
   endif()


Removes the debug statement

Removes the debug statement

--- cmake/Platform/Arduino.cmake
+++ cmake/Platform/Arduino.cmake
@@ -1150,7 +1150,6 @@
         )

     list(APPEND AVRDUDE_ARGS ${AVRDUDE_FLAGS})
-    message(STATUS "DEBUG: ARGS: ${AVRDUDE_ARGS}")

     set(${OUTPUT_VAR} ${AVRDUDE_ARGS} PARENT_SCOPE)
 endfunction()


OSX: fix variable

OSX: fix variable

--- cmake/PlatformSpecific.cmake
+++ cmake/PlatformSpecific.cmake
@@ -107,7 +107,7 @@
 #	INCLUDE_DIRECTORIES( ../macos/include )
 #	set(BUILD_LUXMARK on)
 	set(LUXRAYS_NO_DEFAULT_CONFIG true)
-	set(LUXRAY_CUSTOM_CONFIG Config_OSX)
+	set(LUXRAYS_CUSTOM_CONFIG Config_OSX)

 	#OSX-flags by jensverwiebe
 	set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -Wall -fPIC -O3 -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller")


fix incorrect check-lint cmake

fix incorrect check-lint cmake

--- cmake/clang-cpp-checks.cmake
+++ cmake/clang-cpp-checks.cmake
@@ -65,11 +65,11 @@
         )

         ADD_CUSTOM_TARGET(
-            check-lint COMMAND !
+            check-lint COMMAND
             ${RUN_CLANG_TIDY} -header-filter=${CMAKE_SOURCE_DIR} -j${NPROC}
             | tee ${CMAKE_BINARY_DIR}/check_lint_file.txt
             # WARNING: fix to stop with error if there are problems
-            COMMAND ! grep -c ": error: " > /dev/null ${CMAKE_BINARY_DIR}/check_lint_file.txt > /dev/null
+            COMMAND ! grep -c ": error: " ${CMAKE_BINARY_DIR}/check_lint_file.txt > /dev/null
             COMMENT "Checking for problems in source files"
         )
     ENDIF()


Fix CMAKE_MODULE_PATH bug in FindPoco.cmake

--- cmake/modules/FindPoco.cmake
+++ cmake/modules/FindPoco.cmake
@@ -33,7 +33,7 @@
 endif()

 # avoiding recursion
-set ( __store CMAKE_MODULE_PATH )
+set ( __store ${CMAKE_MODULE_PATH} )
 unset ( CMAKE_MODULE_PATH )

 find_package ( Poco
@@ -42,7 +42,7 @@
     QUIET
 )

-set ( CMAKE_MODULE_PATH __store )
+set ( CMAKE_MODULE_PATH ${__store} )
 unset ( __store )

 if ( Poco_FOUND )


src-deps: set openmp version for C to 4.0 too

Apparently matters when rs is being built as a submodule.

--- cmake/src-dependencies.cmake
+++ cmake/src-dependencies.cmake
@@ -29,11 +29,14 @@
     set(OPENMP_VERSION_SPECIFIER "-fopenmp-version=40")
   endif()

+  set(CMAKE_C_FLAGS_SAVE "${CMAKE_C_FLAGS}")
   set(CMAKE_CXX_FLAGS_SAVE "${CMAKE_CXX_FLAGS}")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPENMP_VERSION_SPECIFIER}")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPENMP_VERSION_SPECIFIER}")

   find_package(OpenMP 4.0)

+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_SAVE}")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_SAVE}")

   if(NOT OPENMP_FOUND)


Removed obsolete FindGLUT.cmake module

Removed obsolete FindGLUT.cmake module

--- cmake_modules/FindGLUT.cmake
+++ cmake_modules/FindGLUT.cmake
@@ -1,105 +0,0 @@
-# - try to find glut library and include files
-#  GLUT_INCLUDE_DIR, where to find GL/glut.h, etc.
-#  GLUT_LIBRARIES, the libraries to link against
-#  GLUT_FOUND, If false, do not try to use GLUT.
-# Also defined, but not for general use are:
-#  GLUT_glut_LIBRARY = the full path to the glut library.
-#  GLUT_Xmu_LIBRARY  = the full path to the Xmu library.
-#  GLUT_Xi_LIBRARY   = the full path to the Xi Library.
-
-#=============================================================================
-# Copyright 2001-2009 Kitware, Inc.
-#
-# 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 distributed this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-include(LibFindMacros)
-
-if ((NOT GLUT_INCLUDE_DIR) AND (NOT GLUT_LIBRARY))
-  libfind_pkg_check_modules(GLUT_PKGCONF glut)
-
-  IF (WIN32)
-    FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h
-      PATHS  ${GLUT_PKGCONF_INCLUDE_DIRS} ${GLUT_ROOT_PATH}/include )
-    FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut glut32
-      PATHS
-      ${GLUT_PKGCONF_LIBRARY_DIRS}
-      ${OPENGL_LIBRARY_DIR}
-      ${GLUT_ROOT_PATH}/Release
-      )
-  ELSE (WIN32)
-
-    IF (APPLE)
-      # These values for Apple could probably do with improvement.
-      FIND_PATH( GLUT_INCLUDE_DIR glut.h
-	/System/Library/Frameworks/GLUT.framework/Versions/A/Headers
-	${OPENGL_LIBRARY_DIR}
-	)
-      SET(GLUT_glut_LIBRARY "-framework GLUT" CACHE STRING "GLUT library for OSX")
-      SET(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
-    ELSE (APPLE)
-      message("glut   	${GLUT_PKGCONF_INCLUDE_DIRS}")
-      if (NOT GLUT_PKGCONF_INCLUDE_DIRS)
-	libfind_pkg_check_modules(GLUT_PKGCONF freeglut3)
-      endif(NOT GLUT_PKGCONF_INCLUDE_DIRS)
-      FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h
-	${GLUT_PKGCONF_INCLUDE_DIRS}
-	/usr/include
-	/usr/openwin/share/include
-	/usr/openwin/include
-	/opt/graphics/OpenGL/include
-	/opt/graphics/OpenGL/contrib/libglut
-	)
-
-      FIND_LIBRARY( GLUT_glut_LIBRARY glut
-	${GLUT_PKGCONF_LIBRARY_DIRS}
-	/usr/openwin/lib
-	/usr/lib
-	)
-
-      #    FIND_LIBRARY( GLUT_Xi_LIBRARY Xi
-      #      /usr/openwin/lib
-      #      )
-
-      #    FIND_LIBRARY( GLUT_Xmu_LIBRARY Xmu
-      #      /usr/openwin/lib
-      #      )
-
-    ENDIF (APPLE)
-
-  ENDIF (WIN32)
-
-  SET( GLUT_FOUND "NO" )
-  IF(GLUT_INCLUDE_DIR)
-    IF(GLUT_glut_LIBRARY)
-      # Is -lXi and -lXmu required on all platforms that have it?
-      # If not, we need some way to figure out what platform we are on.
-      SET( GLUT_LIBRARIES
-	${GLUT_glut_LIBRARY}
-	${GLUT_Xmu_LIBRARY}
-	${GLUT_Xi_LIBRARY}
-	${GLUT_cocoa_LIBRARY}
-	)
-      SET( GLUT_FOUND "YES" )
-
-      #The following deprecated settings are for backwards compatibility with CMake1.4
-      SET (GLUT_LIBRARY ${GLUT_LIBRARIES})
-      SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR})
-
-    ENDIF(GLUT_glut_LIBRARY)
-  ENDIF(GLUT_INCLUDE_DIR)
-
-  MARK_AS_ADVANCED(
-    GLUT_INCLUDE_DIR
-    GLUT_glut_LIBRARY
-    #  GLUT_Xmu_LIBRARY
-    #  GLUT_Xi_LIBRARY
-    )
-endif ((NOT GLUT_INCLUDE_DIR) AND (NOT GLUT_LIBRARY))


Update compiler.cmake

Update compiler.cmake

Fixed typo in flag

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -206,7 +206,7 @@
                      " -Wno-conditional-uninitialized"
                      " -Wno-exit-time-destructors"
                      " -Wno-undefined-func-template"
-                     " -Wnoc++98-compat"
+                     " -Wno-c++98-compat"
                      )
              string(CONCAT CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
              #endif ()


idl-config: When passing idl file, do not pass source files to idl.py

Change-Id: I296359c62d6ff8b67105af5672a32a1b439776ab
Reviewed-on: http://gerrit.aldebaran.lan:8080/17140
Reviewed-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>
Tested-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>

--- codegen/src/idl-config.cmake
+++ codegen/src/idl-config.cmake
@@ -109,6 +109,7 @@
   if ("${ARG_IDL}" STREQUAL "")
     # no IDL specified, generate it from sources and classes
     # or do nothing, will be generated at each call
+    set(IDL ${ARG_SRC} ${ARG_DOXYSRC})
   else()
     set(IDL ${ARG_IDL})
   endif()
@@ -152,7 +153,6 @@
       SRC ${ARG_SRC} ${ARG_DOXYSRC}
       COMMAND ${_python_executable} ${IDLPY}
         ${IDL}
-        ${ARG_SRC} ${ARG_DOXYSRC}
         "${classes}"
         -m proxyFuture --interface
         ${kclasses}
@@ -176,7 +176,6 @@
        SRC ${ARG_SRC} ${ARG_DOXYSRC}
        COMMAND ${_python_executable} ${IDLPY}
          ${IDL}
-         ${ARG_SRC} ${ARG_DOXYSRC}
          ${kclasses}
          -m cxxservicebouncerregister --interface
          -c ${c}:cxxservicebouncerregister
@@ -192,7 +191,6 @@
       SRC ${ARG_SRC} ${ARG_DOXYSRC}
       COMMAND ${_python_executable} ${IDLPY}
         ${IDL}
-        ${ARG_SRC} ${ARG_DOXYSRC}
         ${kclasses}
         -m cxxservicebouncerregister --interface
         -c ${c}:cxxservicebouncer
@@ -218,7 +216,6 @@
        SRC ${ARG_SRC} ${ARG_DOXYSRC}
        COMMAND ${_python_executable} ${IDLPY}
          ${IDL}
-         ${ARG_SRC} ${ARG_DOXYSRC}
          ${kclasses}
          -m cxxservicebouncerregister --interface
          "${carg}"
@@ -233,7 +230,6 @@
      SRC ${ARG_SRC} ${ARG_DOXYSRC}
      COMMAND ${_python_executable} ${IDLPY}
        ${IDL}
-       ${ARG_SRC} ${ARG_DOXYSRC}
        ${classes}
        ${kclasses}
        -m interface --interface


COMP: fix test driver calls

COMP: fix test driver calls

--- openCherry/CMake/cherryTestingHelpers.cmake
+++ openCherry/CMake/cherryTestingHelpers.cmake
@@ -35,7 +35,7 @@
   #
   FOREACH( test ${OPENCHERRY_TESTS} )
     GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
-    ADD_TEST(${TName} ${EXECUTABLE_OUTPUT_PATH}/TestDriver_${plugin_target} ${TName})
+    ADD_TEST(${TName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestDriver_${plugin_target} ${TName})
   ENDFOREACH( test )

 ENDMACRO(OPENCHERRY_CREATE_TESTS)