FindFFTW3.cmake: fix formatting

FindFFTW3.cmake: fix formatting

--- cmake/FindFFTW3.cmake
+++ cmake/FindFFTW3.cmake
@@ -43,21 +43,21 @@
 			${FFTW3_DIR})
 	endif()

-    macro(_fftw3_lib _SUFFIXV _SUFFIXF)
-        find_library("FFTW3${_SUFFIXV}_LIBRARY"
-                NAMES
-                    "libfftw3${_SUFFIXF}-${FFTW3_VERSION_MINOR}"
-                    "fftw3${_SUFFIXF}-${FFTW3_VERSION_MINOR}"
-                PATHS ${_subdirs})
-        if("${FFTW3${_SUFFIXV}_LIBRARY}")
-            list(APPEND FFTW3_LIBRARIES "${FFTW3${_SUFFIXV}_LIBRARY}")
-        endif()
-    endmacro()
+	macro(_fftw3_lib _SUFFIXV _SUFFIXF)
+		find_library("FFTW3${_SUFFIXV}_LIBRARY"
+				NAMES
+					"libfftw3${_SUFFIXF}-${FFTW3_VERSION_MINOR}"
+					"fftw3${_SUFFIXF}-${FFTW3_VERSION_MINOR}"
+				PATHS ${_subdirs})
+		if("${FFTW3${_SUFFIXV}_LIBRARY}")
+			list(APPEND FFTW3_LIBRARIES "${FFTW3${_SUFFIXV}_LIBRARY}")
+		endif()
+	endmacro()

-    _fftw3_lib(D "")
-    _fftw3_lib(F f)
-    _fftw3_lib(L l)
-    _fftw3_lib(Q q)
+	_fftw3_lib(D "")
+	_fftw3_lib(F f)
+	_fftw3_lib(L l)
+	_fftw3_lib(Q q)

 	find_path(FFTW3_INCLUDE_DIR fftw3.h
 		PATHS ${_subdirs}
@@ -67,62 +67,62 @@
 else ()
 	find_package(PkgConfig)

-    macro(_fftw3_lib _SUFFIXV _SUFFIXF)
-        set(_stem "FFTW3${_SUFFIXV}")
-        set(_threads_library "${_stem}_THREADS_LIBRARY")
-        set(_library "${_stem}_LIBRARY")
-        set(_fstem "fftw3${_SUFFIXF}")
+	macro(_fftw3_lib _SUFFIXV _SUFFIXF)
+		set(_stem "FFTW3${_SUFFIXV}")
+		set(_threads_library "${_stem}_THREADS_LIBRARY")
+		set(_library "${_stem}_LIBRARY")
+		set(_fstem "fftw3${_SUFFIXF}")

-        if(PkgConfig_FOUND)
-            pkg_check_modules("PC_${_stem}" QUIET ${_fstem})
-        endif()
+		if(PkgConfig_FOUND)
+			pkg_check_modules("PC_${_stem}" QUIET ${_fstem})
+		endif()

-        find_library(${_library}
-            NAMES
-                "${_fstem}"
-                "lib${_fstem}"
-            HINTS "${PC_${_stem}_LIBRARY_DIRS}")
+		find_library(${_library}
+			NAMES
+				"${_fstem}"
+				"lib${_fstem}"
+			HINTS "${PC_${_stem}_LIBRARY_DIRS}")

-        if("${_library}")
+		if("${_library}")
 #            message(STATUS "found: ${${_library}}")
-            list(APPEND FFTW3_LIBRARIES "${${_library}}")
+			list(APPEND FFTW3_LIBRARIES "${${_library}}")

-            find_library(${_threads_library}
-                NAMES
-                    "${_fstem}_threads"
-                    "lib${_fstem}_threads"
-                HINTS "${PC_${_stem}_LIBRARY_DIRS}")
+			find_library(${_threads_library}
+				NAMES
+					"${_fstem}_threads"
+					"lib${_fstem}_threads"
+				HINTS "${PC_${_stem}_LIBRARY_DIRS}")

-            if("${_threads_library}")
+			if("${_threads_library}")
 #                message(STATUS "found: ${${_threads_library}}")
-                list(APPEND FFTW3_LIBRARIES "${${_threads_library}}")
-            endif()
+				list(APPEND FFTW3_LIBRARIES "${${_threads_library}}")
+			endif()

-            set("${_stem}_DEFINITIONS"
-                    "${PC_${_stem}_CFLAGS_OTHER}")
-            list(APPEND FFTW3_DEFINITIONS "${${_stem}_DEFINITIONS}")
-        endif()
-    endmacro()
+			set("${_stem}_DEFINITIONS"
+					"${PC_${_stem}_CFLAGS_OTHER}")
+			list(APPEND FFTW3_DEFINITIONS "${${_stem}_DEFINITIONS}")
+		endif()
+	endmacro()

-#    if(FFTW3_FIND_COMPONENTS)
-#        foreach(_comp ${FFTW3_FIND_COMPONENTS})
-#            if(_comp STREQUAL "fftw3")
-#                _fftw3_lib(D "")
+	#    if(FFTW3_FIND_COMPONENTS)
+	#        foreach(_comp ${FFTW3_FIND_COMPONENTS})
+	#            if(_comp STREQUAL "fftw3")
+	#                _fftw3_lib(D "")

-    _fftw3_lib(D "")
-    _fftw3_lib(F f)
-    _fftw3_lib(L l)
-    _fftw3_lib(Q q)
+	_fftw3_lib(D "")
+	_fftw3_lib(F f)
+	_fftw3_lib(L l)
+	_fftw3_lib(Q q)

-    find_path(FFTW3_INCLUDE_DIR fftw3.h
-        HINTS
-            ${PC_FFTW3F_INCLUDE_DIRS}
-            ${PC_FFTW3D_INCLUDE_DIRS}
-            ${PC_FFTW3L_INCLUDE_DIRS}
-            ${PC_FFTW3Q_INCLUDE_DIRS})
+	find_path(FFTW3_INCLUDE_DIR fftw3.h
+		HINTS
+			${PC_FFTW3F_INCLUDE_DIRS}
+			${PC_FFTW3D_INCLUDE_DIRS}
+			${PC_FFTW3L_INCLUDE_DIRS}
+			${PC_FFTW3Q_INCLUDE_DIRS})

-    list(REMOVE_DUPLICATES FFTW3_DEFINITIONS)
-    set(FFTW3_VERSION ${PC_FFTW3D_VERSION})
+	list(REMOVE_DUPLICATES FFTW3_DEFINITIONS)
+	set(FFTW3_VERSION ${PC_FFTW3D_VERSION})
 endif()

 if(NOT FFTW3_LIBRARIES)
@@ -135,48 +135,48 @@
 # handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE
 # if all listed variables are TRUE
 find_package_handle_standard_args(FFTW3
-    REQUIRED_VARS FFTW3_LIBRARIES FFTW3_INCLUDE_DIRS
-    VERSION_VAR FFTW3_VERSION)
+	REQUIRED_VARS FFTW3_LIBRARIES FFTW3_INCLUDE_DIRS
+	VERSION_VAR FFTW3_VERSION)

 mark_as_advanced(FFTW3_INCLUDE_DIRS FFTW3_LIBRARIES
-        FFTW3F_LIBRARY FFTW3F_THREADS_LIBRARY
-        FFTW3D_LIBRARY FFTW3D_THREADS_LIBRARY
-        FFTW3L_LIBRARY FFTW3L_THREADS_LIBRARY
-        FFTW3Q_LIBRARY FFTW3Q_THREADS_LIBRARY
-        FFTW3_INCLUDE_DIR)
+	FFTW3F_LIBRARY FFTW3F_THREADS_LIBRARY
+	FFTW3D_LIBRARY FFTW3D_THREADS_LIBRARY
+	FFTW3L_LIBRARY FFTW3L_THREADS_LIBRARY
+	FFTW3Q_LIBRARY FFTW3Q_THREADS_LIBRARY
+	FFTW3_INCLUDE_DIR)

 if(FFTW3_FOUND AND NOT TARGET fftw3)
-    macro(_fftw3_component_target _SUFFIXV _SUFFIXF)
-        set(_stem "FFTW3${_SUFFIXV}")
-        set(_threads_library "${_stem}_THREADS_LIBRARY")
-        set(_library "${_stem}_LIBRARY")
-        set(_fstem "fftw3${_SUFFIXF}")
+	macro(_fftw3_component_target _SUFFIXV _SUFFIXF)
+		set(_stem "FFTW3${_SUFFIXV}")
+		set(_threads_library "${_stem}_THREADS_LIBRARY")
+		set(_library "${_stem}_LIBRARY")
+		set(_fstem "fftw3${_SUFFIXF}")
 #        message(STATUS "_fftw3_component_target ${_SUFFIX}")
-        if("${_library}")
-            add_library(${_fstem} UNKNOWN IMPORTED)
+		if("${_library}")
+			add_library(${_fstem} UNKNOWN IMPORTED)
 #            message(STATUS "add_library(${_fstem})")
-            set_target_properties(${_fstem} PROPERTIES
-                    IMPORTED_LINK_INTERFACE_LANGUAGES "C"
-                    IMPORTED_LOCATION "${${_library}}"
-                    INTERFACE_COMPILE_OPTIONS "${${_stem}_DEFINITIONS}"
-                    INTERFACE_INCLUDE_DIRECTORIES ${FFTW3_INCLUDE_DIR})
+			set_target_properties(${_fstem} PROPERTIES
+					IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+					IMPORTED_LOCATION "${${_library}}"
+					INTERFACE_COMPILE_OPTIONS "${${_stem}_DEFINITIONS}"
+					INTERFACE_INCLUDE_DIRECTORIES ${FFTW3_INCLUDE_DIR})
 #            message(STATUS "IMPORTED_LOCATION ${${_library}}")
 #            message(STATUS "INTERFACE_INCLUDE_DIRECTORIES ${FFTW3_INCLUDE_DIR}")
-            if("${_threads_library}")
-                add_library("${_fstem}_threads" UNKNOWN IMPORTED)
+			if("${_threads_library}")
+				add_library("${_fstem}_threads" UNKNOWN IMPORTED)
 #                message(STATUS "add_library(${_fstem}_threads)")
-                set_target_properties("${_fstem}_threads" PROPERTIES
-                        IMPORTED_LINK_INTERFACE_LANGUAGES "C"
-                        IMPORTED_LOCATION "${${_threads_library}}")
+				set_target_properties("${_fstem}_threads" PROPERTIES
+						IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+						IMPORTED_LOCATION "${${_threads_library}}")
 #                message(STATUS "IMPORTED_LOCATION ${${_threads_library}}")
-                set_target_properties(${_fstem} PROPERTIES
-                        INTERFACE_LINK_LIBRARIES "${_fstem}_threads")
-            endif()
-        endif()
-    endmacro()
+				set_target_properties(${_fstem} PROPERTIES
+						INTERFACE_LINK_LIBRARIES "${_fstem}_threads")
+			endif()
+		endif()
+	endmacro()

-    _fftw3_component_target(D "")
-    _fftw3_component_target(F f)
-    _fftw3_component_target(L l)
-    _fftw3_component_target(Q q)
+	_fftw3_component_target(D "")
+	_fftw3_component_target(F f)
+	_fftw3_component_target(L l)
+	_fftw3_component_target(Q q)
 endif()


Fix CMake FindFFTW3 module

Fix CMake FindFFTW3 module

--- cmake/FindFFTW3.cmake
+++ cmake/FindFFTW3.cmake
@@ -46,7 +46,7 @@
 endif(FFTW3_INCLUDE_DIR)

 find_package(PkgConfig QUIET)
-pkg_check_modules(PC_FFTW3 QUIET fftw)
+pkg_check_modules(PC_FFTW3 QUIET fftw3)

 set(FFTW3_VERSION ${PC_FFTW3_VERSION})


Change language to C instead cxx

Change language to C instead cxx

--- cmake/FindIconv.cmake
+++ cmake/FindIconv.cmake
@@ -25,7 +25,7 @@
 #

 include(CheckFunctionExists)
-include(CheckCXXSourceCompiles)
+include(CheckCSourceCompiles)

 if(ICONV_INCLUDE_DIR)
   set(ICONV_FIND_QUIETLY TRUE)
@@ -114,7 +114,7 @@
         message(STATUS "One (and only one) of the ICONV_ACCEPTS_... tests must pass")
     endif()

-    check_cxx_source_compiles(
+    check_c_source_compiles(
         "#include <iconv.h>
          int main() {
             char *p = 0;
@@ -122,7 +122,7 @@
          }"
         ICONV_ACCEPTS_NONCONST_INPUT)

-    check_cxx_source_compiles(
+    check_c_source_compiles(
         "#include <iconv.h>
          int main() {
             char const *p = 0;


cmake/FindIconv.cmake: CheckCSourceCompiles instead of CheckCXXSourceCompiles [ci skip]

--- cmake/FindIconv.cmake
+++ cmake/FindIconv.cmake
@@ -7,7 +7,7 @@
 #  ICONV_LDFLAGS - Link these to use Iconv (string)
 #  ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const
 #
-include(CheckCXXSourceCompiles)
+include(CheckCSourceCompiles)

 IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
   # Already in cache, be silent
@@ -27,7 +27,7 @@
   SET (CMAKE_REQUIRED_LIBRARIES_PREVIOUS ${CMAKE_REQUIRED_LIBRARIES})
   SET (CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
   SET (CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
-  CHECK_CXX_SOURCE_COMPILES ("
+  CHECK_C_SOURCE_COMPILES ("
   #include <iconv.h>
   int main(){
     iconv_t conv = 0;


CMake: Use check_symbol_exists instead of check_cxx_symbol_exists.

check_cxx_symbol_exists requires CMake 2.8.6, so even though I
recommended it to Owen it's probably better to stay away for now.
This check is not technically correct because we're checking <math.h>
but then using <cmath> in the actual code, but if we run into problems we
can do the same sort of dance as isinf() and isnan() where we check /both/
headers and then write a wrapper header around them.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -7,7 +7,6 @@
 include(CheckLibraryExists)
 include(CheckSymbolExists)
 include(CheckFunctionExists)
-include(CheckCXXSymbolExists)
 include(CheckCXXSourceCompiles)
 include(TestBigEndian)

@@ -120,12 +119,12 @@
 check_symbol_exists(ceilf math.h HAVE_CEILF)
 check_symbol_exists(floorf math.h HAVE_FLOORF)
 check_symbol_exists(fmodf math.h HAVE_FMODF)
-check_cxx_symbol_exists(log cmath HAVE_LOG)
-check_cxx_symbol_exists(log2 cmath HAVE_LOG2)
-check_cxx_symbol_exists(log10 cmath HAVE_LOG10)
-check_cxx_symbol_exists(exp cmath HAVE_EXP)
-check_cxx_symbol_exists(exp2 cmath HAVE_EXP2)
-check_cxx_symbol_exists(exp10 cmath HAVE_EXP10)
+check_symbol_exists(log math.h HAVE_LOG)
+check_symbol_exists(log2 math.h HAVE_LOG2)
+check_symbol_exists(log10 math.h HAVE_LOG10)
+check_symbol_exists(exp math.h HAVE_EXP)
+check_symbol_exists(exp2 math.h HAVE_EXP2)
+check_symbol_exists(exp10 math.h HAVE_EXP10)
 if( HAVE_SETJMP_H )
   check_symbol_exists(longjmp setjmp.h HAVE_LONGJMP)
   check_symbol_exists(setjmp setjmp.h HAVE_SETJMP)


Use CPACK_RPM_FILE_NAME="RPM-DEFAULT"

Use CPACK_RPM_FILE_NAME="RPM-DEFAULT"

This has been implemented in for cmake-3.6 to match distro version
of what the filename should look like.

Thanks to Domen Vranka for the suggestion.

--- cmake/cpack_rpm.cmake
+++ cmake/cpack_rpm.cmake
@@ -28,7 +28,11 @@
                          Common Client SharedLibraries)

 SET(CPACK_RPM_PACKAGE_NAME "MariaDB")
-SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}")
+IF(CMAKE_VERSION VERSION_LESS "3.6.0")
+  SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}")
+ELSE()
+  SET(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
+ENDIF()

 SET(CPACK_RPM_PACKAGE_RELEASE "1%{?dist}")
 SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2")


MAINT: fix compilation errors in static build.

--- cmake/do_macros.cmake
+++ cmake/do_macros.cmake
@@ -187,12 +187,16 @@
       OUTPUT_NAME ${_library_output_name}
       OUTPUT_NAME_DEBUG ${_library_output_name_debug})

+    # Set correct compile definitions when building the libraries.
     if (DO_BUILD_SHARED_LIBS)
-      set_target_properties(
-        DO_${DO_PROJECT_NAME}_${_library_name}
-        PROPERTIES
-        COMPILE_DEFINITIONS "DO_EXPORTS")
+      set(_library_defs "DO_EXPORTS")
+    else ()
+      set(_library_defs "DO_STATIC")
     endif ()
+    set_target_properties(
+      DO_${DO_PROJECT_NAME}_${_library_name}
+      PROPERTIES
+      COMPILE_DEFINITIONS ${_library_defs})

     # Specify where to install the static library.
     install(
@@ -254,6 +258,7 @@
   target_link_libraries(${_test_name}
                         ${_additional_lib_deps}
                         gtest)
+
   set_target_properties(
     ${_test_name}
     PROPERTIES


FIX (#2107): moved files from internal module

--- Modules/DiffusionImaging/files.cmake
+++ Modules/DiffusionImaging/files.cmake
@@ -19,12 +19,21 @@
   IODataStructures/QBallImages/mitkNrrdQBallImageWriterFactory.cpp
   IODataStructures/mitkDiffusionImagingObjectFactory.cpp
   IODataStructures/QBallImages/mitkQBallImage.cpp
+  Rendering/vtkMaskedGlyph2D.cpp
+  Rendering/vtkMaskedGlyph3D.cpp
+  Rendering/vtkMaskedProgrammableGlyphFilter.cpp
+  Rendering/mitkVectorImageMapper2D.cpp
+  Rendering/mitkVectorImageVtkGlyphMapper3D.cpp
+  Rendering/vtkOdfSource.cxx
+  Rendering/vtkThickPlane.cxx
 )

 SET(H_FILES
   Reconstruction/itkDiffusionQballReconstructionImageFilter.h
   Reconstruction/itkPointShell.h
+  Reconstruction/itkOrientationDistributionFunction.h
   IODataStructures/DiffusionWeightedImages/mitkDiffusionVolumes.h
+  Rendering/mitkOdfVtkMapper2D.h
 )

 SET( TOOL_FILES


added filter to cmake

added filter to cmake

--- Modules/DiffusionImaging/files.cmake
+++ Modules/DiffusionImaging/files.cmake
@@ -156,6 +156,7 @@
   Algorithms/itkProjectionFilter.h
   Algorithms/itkSkeletonizationFilter.h
   Algorithms/itkReduceDirectionGradientsFilter.h
+  Algorithms/itkResidualImageFilter.h
 )

 SET( TOOL_FILES


SuperBuild: geos: update to revision that works with vs2015

--- SuperBuild/CMake/External_geos.cmake
+++ SuperBuild/CMake/External_geos.cmake
@@ -4,8 +4,8 @@

 ExternalProject_Add(GEOS
   PREFIX GEOS
-  URL "http://download.osgeo.org/geos/geos-3.4.2.tar.bz2"
-  URL_MD5 fc5df2d926eb7e67f988a43a92683bae
+  URL "https://orfeo-toolbox.org/packages/geos-3.6.0dev-714127e.tar.xz"
+  URL_MD5 a388d0cfdaf1c6e8defdbb4d400c1bdb
   SOURCE_DIR ${GEOS_SB_SRC}
   BINARY_DIR ${GEOS_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
@@ -14,6 +14,7 @@
   ${SB_CMAKE_CACHE_ARGS}
   -DBUILD_TESTING:BOOL=OFF
   -DGEOS_ENABLE_TESTS:BOOL=OFF
+  -DProject_WC_REVISION:STRING=99999
   CMAKE_COMMAND ${SB_CMAKE_COMMAND} )

 SUPERBUILD_UPDATE_CMAKE_VARIABLES(GEOS FALSE)


ENH: Upgrade PROJ to 4.4.0

ENH: Upgrade PROJ to 4.4.0

--- SuperBuild/CMake/External_proj.cmake
+++ SuperBuild/CMake/External_proj.cmake
@@ -30,8 +30,8 @@
   set(PROJ_MD5 9f874e227d221daf95f7858dc55dfa3e)
   set(PROJ_FLAGS -DBUILD_LIBPROJ_SHARED:BOOL=TRUE -DVERSIONED_OUTPUT:BOOL=FALSE -DPROJ_TESTS:BOOL=OFF)
 else()
-  set(PROJ_URL "https://download.osgeo.org/proj/proj-8.1.1.tar.gz")
-  set(PROJ_MD5 f017fd7d35311b0d65b2cf0503844690)
+  set(PROJ_URL "https://download.osgeo.org/proj/proj-8.2.0.tar.gz")
+  set(PROJ_MD5 c157faf5d4cf9967ffbe3028d7d9a921)
   set(PROJ_FLAGS -DBUILD_SHARED_LIBS:BOOL=TRUE -DBUILD_TESTING:BOOL=OFF -DENABLE_TIFF:BOOL=ON -DENABLE_CURL:BOOL=ON)
 endif()


BUGsFIX: Slicer Extension Building

BUGsFIX: Slicer Extension Building

--- SuperBuild/External_QtToCppXML.cmake
+++ SuperBuild/External_QtToCppXML.cmake
@@ -52,10 +52,10 @@

   IF(Qt4_SUPPORT)
     set(QT_VERSION 4)
-    set(${proj}_DEPENDENCIES SlicerExecutionModel Qt4 )
+    set(${proj}_DEPENDENCIES  Qt4 )
   ELSE()
     set(QT_VERSION 5)
-    set(${proj}_DEPENDENCIES SlicerExecutionModel Qt5 )
+    set(${proj}_DEPENDENCIES  Qt5 )
   ENDIF()

   # Include dependent projects if any


Bump for unversioned install, static plugin

Updates made in ParaView master to ease packaging issues uncovered after
we moved to ParaView master.

Signed-off-by: Marcus D. Hanwell <cf7042e2e8eee958b5bcde1ae2cbefef82efc184@kitware.com>

--- versions.cmake
+++ versions.cmake
@@ -80,7 +80,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision locally before proposing a move
-  set(_paraview_revision "e18817ab55ee31a7533e84ab139ba7430e38d500")
+  set(_paraview_revision "4054602f6ce1e74e6f23611e877d6045945bf94e")
 endif()
 # Locally patched ParaView repo, or main repo
 #set(_paraview_repo "https://gitlab.kitware.com/paraview/paraview.git")


Always use non-rooted search (even when cross-compiling) to find the source tree and library based on URHO3D_HOME environment variable.

--- Source/CMake/Modules/FindUrho3D.cmake
+++ Source/CMake/Modules/FindUrho3D.cmake
@@ -41,7 +41,7 @@
     file (TO_CMAKE_PATH ${URHO3D_HOME} URHO3D_HOME)

     # Construct source tree paths from URHO3D_HOME environment variable
-    find_file (SOURCE_TREE_PATH Urho3D.h.in ${URHO3D_HOME}/Source/Engine NO_DEFAULT_PATH)
+    find_file (SOURCE_TREE_PATH Urho3D.h.in ${URHO3D_HOME}/Source/Engine NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
     if (SOURCE_TREE_PATH)
         get_filename_component (SOURCE_TREE_PATH ${SOURCE_TREE_PATH} PATH)
         set (URHO3D_INCLUDE_DIR
@@ -75,7 +75,7 @@
             set (URHO3D_INCLUDE_DIR ${URHO3D_INCLUDE_DIR} ${URHO3D_HOME}/Build/Engine)
             set (URHO3D_LIB_SEARCH_PATH ${URHO3D_HOME}/Lib)
         endif ()
-        find_library (URHO3D_LIBRARIES NAMES ${URHO3D_LIB_NAMES} PATHS ${URHO3D_LIB_SEARCH_PATH} NO_DEFAULT_PATH)
+        find_library (URHO3D_LIBRARIES NAMES ${URHO3D_LIB_NAMES} PATHS ${URHO3D_LIB_SEARCH_PATH} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
     endif ()
 else ()
     set (URHO3D_INC_SEARCH_PATH /opt/include)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


daily version number

daily version number

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -1,10 +1,10 @@
 # Do not edit!  Generated by kwsysDateStamp.py

 # KWSys version date year component.  Format is CCYY.
-SET(KWSYS_VERSION_DATE_YEAR  2007)
+SET(KWSYS_DATE_STAMP_YEAR  2007)

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


[doc] Let all dialect docs generate to the same directory (#4910)

--- build_tools/cmake/iree_tablegen_doc.cmake
+++ build_tools/cmake/iree_tablegen_doc.cmake
@@ -76,7 +76,7 @@
   endwhile()

   # Put all dialect docs at one place.
-  set(_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR}/doc/Dialects/)
+  set(_DOC_DIR ${IREE_BINARY_DIR}/doc/Dialects/)
   # Set a target to drive copy.
   add_custom_target(${_NAME}_target
             ${CMAKE_COMMAND} -E make_directory ${_DOC_DIR}


- Fix UWP builds, now forced to use C++17 for UWP builds

--- cmake/Toolchains/windows-uwp_windows.toolchain.cmake
+++ cmake/Toolchains/windows-uwp_windows.toolchain.cmake
@@ -25,4 +25,4 @@

 include_directories ( "${NATIVE_LIBRARY_DIR}/include" )

-set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1 /std:c++17" )
+set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1 /std:c++17" CACHE STRING "" )


[cmake] Indentation fix (NFC)

[cmake] Indentation fix (NFC)

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

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -283,7 +283,7 @@
   set(PROFILE_SOURCES ../profile/InstrProfiling
                       ../profile/InstrProfilingBuffer
                       ../profile/InstrProfilingPlatformDarwin
-		      ../profile/InstrProfilingWriter)
+                      ../profile/InstrProfilingWriter)
   foreach (os ${ARGN})
     list_union(DARWIN_BUILTIN_ARCHS DARWIN_${os}_ARCHS BUILTIN_SUPPORTED_ARCH)
     foreach (arch ${DARWIN_BUILTIN_ARCHS})


opencv: only support opencv 1

opencv: only support opencv 1

--- cmake/qibuild/modules/opencv-config.cmake
+++ cmake/qibuild/modules/opencv-config.cmake
@@ -23,26 +23,21 @@
 ## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 ## SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+#This is the old OpenCV please prefer opencv2_* packages
 clean(OPENCV)
-# Old API
-# include <cv.h>
+
 fpath(OPENCV cv.h PATH_SUFFIXES opencv)
-# include <opencv/cv.h>
 fpath(OPENCV opencv/cv.h)

-# New API:
-# include <opencv2/cv.hpp>
-# fpath(OPENCV opencv2/cp.hpp PATH_SUFFIXES opencv2)
+flib(OPENCV OPTIMIZED NAMES cv      cv200      )
+flib(OPENCV DEBUG     NAMES cv      cv200d     )
+flib(OPENCV OPTIMIZED NAMES cvaux   cvaux200   )
+flib(OPENCV DEBUG     NAMES cvaux   cvaux200d  )
+flib(OPENCV OPTIMIZED NAMES cxcore  cxcore200  )
+flib(OPENCV DEBUG     NAMES cxcore  cxcore200d )
+flib(OPENCV OPTIMIZED NAMES highgui highgui200 )
+flib(OPENCV DEBUG     NAMES highgui highgui200d)
+flib(OPENCV OPTIMIZED NAMES ml      ml200d     )
+flib(OPENCV DEBUG     NAMES ml      ml200      )

-
-flib(OPENCV OPTIMIZED NAMES cv      cv200       opencv_legacy)
-flib(OPENCV DEBUG     NAMES cv      cv200d      opencv_legacy)
-flib(OPENCV OPTIMIZED NAMES cvaux   cvaux200    opencv_contrib)
-flib(OPENCV DEBUG     NAMES cvaux   cvaux200d   opencv_contrib)
-flib(OPENCV OPTIMIZED NAMES cxcore  cxcore200   opencv_core)
-flib(OPENCV DEBUG     NAMES cxcore  cxcore200d  opencv_core)
-flib(OPENCV OPTIMIZED NAMES highgui highgui200  opencv_highgui)
-flib(OPENCV DEBUG     NAMES highgui highgui200d opencv_highgui)
-flib(OPENCV OPTIMIZED NAMES ml      ml200d      opencv_ml)
-flib(OPENCV DEBUG     NAMES ml      ml200       opencv_ml)
 export_lib(OPENCV)


Fix python module

Fix python module

Change-Id: I55f5c71d5297220be7fb1799809a8359a8142efc
Reviewed-on: http://gerrit.aldebaran.lan/39605
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: ncornu <13ba26b8f12d26c819f48749c65f2f7f5c1d13db@aldebaran-robotics.com>

--- cmake/qibuild/modules/python-config.cmake
+++ cmake/qibuild/modules/python-config.cmake
@@ -26,7 +26,7 @@
   clean(PYTHON)
   unset(PYTHON_INCLUDE_DIRS)
   unset(PYTHON_INCLUDE_DIRS CACHE)
-  find_package(PythonLibs)
+  find_package(PythonLibs VERSION 2)
   if(PYTHONLIBS_FOUND)
     qi_persistent_set(PYTHON_PACKAGE_FOUND FALSE)
   else()


[FIX] Really suppressing warnings about unsafe STL functions in MSVC.

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

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -225,7 +225,7 @@
   add_definitions (/W2)

   # Disable warnings about unsecure (although standard) functions.
-  add_definitions (-D_SCL_SECURE_NO_WARNING)
+  add_definitions (-D_SCL_SECURE_NO_WARNINGS)
 endif (MSVC)

 # ----------------------------------------------------------------------------


Add latest visual studio version 1911

Add latest visual studio version 1911

Map to same version as 1910 for now.

--- CMake/mitkFunctionGetMSVCVersion.cmake
+++ CMake/mitkFunctionGetMSVCVersion.cmake
@@ -27,8 +27,12 @@
     set(VISUAL_STUDIO_VERSION_MAJOR "14" PARENT_SCOPE)
     set(VISUAL_STUDIO_VERSION_MINOR "1" PARENT_SCOPE)
     set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2017" PARENT_SCOPE)
+  elseif(MSVC_VERSION EQUAL 1911)
+    set(VISUAL_STUDIO_VERSION_MAJOR "14" PARENT_SCOPE)
+    set(VISUAL_STUDIO_VERSION_MINOR "1" PARENT_SCOPE)
+    set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2017" PARENT_SCOPE)
   else()
-    message(WARNING "Unknown Visual Studio version. Please update CMake/mitkFunctionGetMSVCVersion.cmake.")
+    message(WARNING "Unknown Visual Studio version ${MSVC_VERSION}. Please update CMake/mitkFunctionGetMSVCVersion.cmake.")
   endif()

   if("${CMAKE_GENERATOR}" MATCHES ".*Win64")


Update license path.

Update license path.

--- build/package.cmake
+++ build/package.cmake
@@ -39,7 +39,7 @@
   set(CPACK_PACKAGE_FILE_NAME
     "centreon-broker-${CENTREON_BROKER_VERSION}")
   set(CPACK_PACKAGE_INSTALL_DIRECTORY "centreon-broker")
-  set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/license.txt")
+  set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
   set(CPACK_PACKAGE_CONTACT
     "Matthieu Kermagoret <mkermagoret@centreon.com>")


BUG: shilly bug in PATH_SUFFIXES (sharkxx -> shark)

--- CMake/FindShark.cmake
+++ CMake/FindShark.cmake
@@ -44,7 +44,7 @@
 find_path( SHARK_INCLUDE_DIR
   NAMES shark/Core/Shark.h
   PATHS "${SHARK_SEARCH_PATH}"
-  PATH_SUFFIXES include include/sharkxx sharkxx
+  PATH_SUFFIXES include include/shark shark
   )

 find_library( SHARK_LIBRARY
@@ -102,7 +102,14 @@

 set(SHARK_USE_OPENMP_matched)
 #define SHARK_USE_OPENMP
-file(STRINGS "${SHARK_INSTALLDIR}/include/shark/Core/Shark.h" SHARK_H_CONTENTS)
+find_file( SHARK_H_FILE
+  NAMES shark/Core/Shark.h
+  PATHS "${SHARK_SEARCH_PATH}"
+  PATH_SUFFIXES include include/shark shark
+  )
+
+#define SHARK_USE_OPENMP
+file(STRINGS "${SHARK_H_FILE}" SHARK_H_CONTENTS)
 string(REGEX MATCH
   "#define.SHARK_USE_OPENMP"
   SHARK_USE_OPENMP_matched "${SHARK_H_CONTENTS}")


Modifications to enable linking in missing libc functions.

--- CMake/toolchain.cmake
+++ CMake/toolchain.cmake
@@ -47,3 +47,8 @@
 set(CMAKE_CXX_FLAGS_INIT           "${CMAKE_CXX_FLAGS_INIT} ${_CPU_COMPILATION_OPTIONS} ${_CPU_DEFINES}" CACHE STRING "" FORCE)
 set(CMAKE_MODULE_LINKER_FLAGS_INIT "${CMAKE_MODULE_LINKER_FLAGS_INIT} ${_CPU_COMPILATION_OPTIONS}" CACHE STRING "" FORCE)
 set(CMAKE_EXE_LINKER_FLAGS_INIT    "${CMAKE_EXE_LINKER_FLAGS_INIT} -T\"${CMAKE_CURRENT_LIST_DIR}/../ld/memory.x\" -T\"${CMAKE_CURRENT_LIST_DIR}/../ld/periph.x\" -T\"${CMAKE_CURRENT_LIST_DIR}/../ld/msp430.x\"" CACHE STRING "" FORCE)
+
+
+# <LINK_LIBRARIES> is grouped with system libraries so that system library
+# functions (e.g. putchar) can be overridden by symbols in <LINK_LIBRARIES>
+set(CMAKE_C_LINK_EXECUTABLE       "<CMAKE_C_COMPILER> ${CMAKE_C_FLAGS_INIT} <CMAKE_C_LINK_FLAGS> <LINK_FLAGS>  -Wl,--start-group <OBJECTS> <LINK_LIBRARIES> ${GLOBALLY_LINKED_TARGET_LIBS} -lc -Wl,--end-group -o <TARGET>")


For some reason old header was in files.cmake.

--- Core/Code/files.cmake
+++ Core/Code/files.cmake
@@ -59,7 +59,7 @@
   DataManagement/mitkImageToItk.txx
   DataManagement/mitkTimeSlicedGeometry.h # Deprecated, empty for compatibilty reasons.
   DataManagement/mitkPropertyListReplacedObserver.cpp
-  DataManagement/mitkOldTypeConversions.h
+  DataManagement/mitkVectorDeprecated.h
   DataManagement/mitkArray.h
   DataManagement/mitkQuaternion.h
   DataManagement/mitkTypes.h


Fix MSVC AVX codec compiler switch

Fix MSVC AVX codec compiler switch

--- cmake/Modules/TargetSIMDInstructionSet.cmake
+++ cmake/Modules/TargetSIMDInstructionSet.cmake
@@ -28,7 +28,7 @@
         set(COMPILE_FLAGS_SSSE3 " ")
         set(COMPILE_FLAGS_SSE41 " ")
         set(COMPILE_FLAGS_SSE42 " ")
-        set(COMPILE_FLAGS_AVX "/arch:AVX2")
+        set(COMPILE_FLAGS_AVX "/arch:AVX")
         set(COMPILE_FLAGS_AVX2 "/arch:AVX2")
     endif()
 endmacro(define_SIMD_compile_flags)


iOS: fixed CMake configuration errors.

iOS: fixed CMake configuration errors.

--- toolchains/ios.toolchain.cmake
+++ toolchains/ios.toolchain.cmake
@@ -8,12 +8,12 @@
 #
 # http://www.cmake.org/Wiki/CMake_Cross_Compiling
 #
-# https://cmake.org/pipermail/cmake-developers/2014-September/023068.html [cmake-developers] iOS support
 # https://github.com/Kitware/VTK/blob/master/CMake/ios.toolchain.xcode.cmake
 # https://github.com/cristeab/ios-cmake
 # https://github.com/plenluno/ios-cmake
 # https://code.google.com/archive/p/ios-cmake
 # https://llvm.org/svn/llvm-project/llvm/trunk/cmake/platforms/iOS.cmake
+# https://cmake.org/pipermail/cmake-developers/2014-September/023068.html [cmake-developers] iOS support
 #
 ################################################################################

@@ -27,13 +27,14 @@
 set( iOS   true )

 # Skip the platform compiler checks for cross compiling (or not)...
-set( CMAKE_CXX_COMPILER_WORKS false                       )
+set( CMAKE_CXX_COMPILER_WORKS true CACHE STRING "Skip CMake compiler detection (requires a functioning code signing identity and provisioning profile)." )
 set( CMAKE_C_COMPILER_WORKS   ${CMAKE_CXX_COMPILER_WORKS} )
 if ( NOT CMAKE_CXX_COMPILER_WORKS )
     # Make sure all executables are bundles otherwise try compiles will fail.
-    set( CMAKE_MACOSX_BUNDLE                      true )
-    set( CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer" CACHE STRING "how to sign executables" )
-    set( MACOSX_BUNDLE_GUI_IDENTIFIER             "com.le.cmake-try-compile" )
+    set( CMAKE_MACOSX_BUNDLE                         true                         )
+    set( CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY    "iPhone Developer"           )
+   #set( CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO"                         )
+    set( MACOSX_BUNDLE_GUI_IDENTIFIER                "com.tnun.cmake-try-compile" )
 endif()

@@ -44,9 +45,9 @@

 set( CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY libc++ )

-set( CMAKE_OSX_ARCHITECTURES                "${ARCHS_STANDARD}" ) # http://www.cocoanetics.com/2014/10/xcode-6-drops-armv7s
-set( CMAKE_XCODE_ATTRIBUTE_ARCHS            "${ARCHS_STANDARD}" )
-set( CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS      "${ARCHS_STANDARD}" )
+set( CMAKE_OSX_ARCHITECTURES                "$(ARCHS_STANDARD)" ) # http://www.cocoanetics.com/2014/10/xcode-6-drops-armv7s
+set( CMAKE_XCODE_ATTRIBUTE_ARCHS            "$(ARCHS_STANDARD)" )
+set( CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS      "$(ARCHS_STANDARD)" )
 set( CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH NO                  )
 set( CMAKE_XCODE_ATTRIBUTE_SDKROOT          iphoneos            ) # iphoneos == "Latest iOS"


Update YCM modules to YCM 0.10.2

Update YCM modules to YCM 0.10.2

--- cmake/InstallBasicPackageFiles.cmake
+++ cmake/InstallBasicPackageFiles.cmake
@@ -615,13 +615,13 @@
           set(_match 0)
         elseif(_len EQUAL 2)
           list(GET _dep_list 1 _dep1)
-          if(NOT "${_dep1}" MATCHES "^[0-9][0-9\.]*$")
+          if(NOT "${_dep1}" MATCHES "^[0-9][0-9\\.]*$")
             set(_match 1)
           endif()
         elseif(_len EQUAL 3)
           list(GET _dep_list 1 _dep1)
           list(GET _dep_list 2 _dep2)
-          if((NOT "${_dep1}" MATCHES "^[0-9][0-9\.]*$") OR (NOT "${_dep2}" STREQUAL "EXACT"))
+          if((NOT "${_dep1}" MATCHES "^[0-9][0-9\\.]*$") OR (NOT "${_dep2}" STREQUAL "EXACT"))
             set(_match 1)
           endif()
         else()
@@ -644,13 +644,13 @@
             set(_match 0)
           elseif(_len EQUAL 2)
             list(GET _dep_list 1 _dep1)
-            if(NOT "${_dep1}" MATCHES "^[0-9][0-9\.]*$")
+            if(NOT "${_dep1}" MATCHES "^[0-9][0-9\\.]*$")
               set(_match 1)
             endif()
           elseif(_len EQUAL 3)
             list(GET _dep_list 1 _dep1)
             list(GET _dep_list 2 _dep2)
-            if((NOT "${_dep1}" MATCHES "^[0-9][0-9\.]*$") OR (NOT "${_dep2}" STREQUAL "EXACT"))
+            if((NOT "${_dep1}" MATCHES "^[0-9][0-9\\.]*$") OR (NOT "${_dep2}" STREQUAL "EXACT"))
               set(_match 1)
             endif()
           else()


Renderscript: CMake variable RS_TARGET_API must be set

--- cmake/modules/FindRenderScript.cmake
+++ cmake/modules/FindRenderScript.cmake
@@ -89,10 +89,6 @@
   NAME llvm-rs-cc
   HINTS ${ANDROID_SOURCE_DIR}/out/host/${HOST_TYPE}/bin
   DOC "RenderScript compiler executable")
-
-IF (NOT RS_TARGET_API)
-  SET (RS_TARGET_API 18)
-ENDIF (NOT RS_TARGET_API)

 SET (RS_FLAGS -allow-rs-prefix -reflect-c++ -target-api ${RS_TARGET_API} -o ./)

@@ -131,7 +127,7 @@

 FIND_PACKAGE_HANDLE_STANDARD_ARGS (RenderScript REQUIRED_VARS
-    ANDROID_SOURCE_DIR TARGET_NAME HOST_TYPE NDK_TOOLCHAIN_DIR
+    ANDROID_SOURCE_DIR TARGET_NAME HOST_TYPE NDK_TOOLCHAIN_DIR RS_TARGET_API
     RS_INCLUDE_DIR RS_EXECUTABLE NDK_CXX_EXECUTABLE NDK_LIBRARY_DIR)


Work around ICC not being IEEE-compliant

The default behavior of ICC is to not be IEEE fp compliant for some
operations. With -fp-model source I seem to get the correct behavior out
of ICC.

Fixes gh-39

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

--- cmake/FindMIC.cmake
+++ cmake/FindMIC.cmake
@@ -154,6 +154,8 @@
    list(APPEND CMAKE_MIC_CXX_FLAGS "-diag-disable 61") # warning #61: integer operation result is out of range
    list(APPEND CMAKE_MIC_CXX_FLAGS "-diag-disable 173") # warning #173: floating-point value does not fit in required integral type
    list(APPEND CMAKE_MIC_CXX_FLAGS "-diag-disable 264") # warning #264: floating-point value does not fit in required floating-point type
+
+   list(APPEND CMAKE_MIC_CXX_FLAGS "-fp-model source") # fix IEEE FP comliance

    set(VC_MIC_CXX_FLAGS "")


Fixed an issue where setting Tbb_INCLUDE_DIR could cause CMake to fail

Signed-off-by: Nick Avramoussis <ce9ae7fb000f2865db247e53b12753caeda92c74@users.noreply.github.com>

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -169,6 +169,8 @@
     PATHS ${_TBB_INCLUDE_SEARCH_DIRS}
     PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR} include
   )
+else()
+  set(Tbb_LEGACY_INCLUDE_DIR ${Tbb_INCLUDE_DIR})
 endif()

 # Look for a new tbb header installation


Improvements to FindZMQ script

Improvements to FindZMQ script

This change hides a few CMake variables behind the "advanced" button in
the CMake GUI, and it adds a new cache variable called ZMQ_DIR which it
uses as the primary search directory when it looks for the ZeroMQ files.

--- cmake/FindZMQ.cmake
+++ cmake/FindZMQ.cmake
@@ -13,7 +13,9 @@
 # If ZeroMQ was not found, ZMQ_FOUND is set to false.
 #
 cmake_minimum_required (VERSION 2.8.11)
-
+set (ZMQ_DIR "${ZMQ_DIR}" CACHE FILEPATH
+    "The directory where ZeroMQ is installed, i.e., the parent directory of the 'bin', 'lib' and 'include' directories that contain the ZeroMQ libraries and headers."
+)

 # A function which prefixes all items in a list with a string.
 function (_prefixStrings targetVarName prefix)
@@ -112,29 +114,34 @@
         set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
         find_library (ZMQ_RELEASE_LIB
             NAMES ${releaseLibNames}
-            PATHS $ENV{ZMQ_DIR} ${extraPrefixPaths}
+            PATHS ${ZMQ_DIR} $ENV{ZMQ_DIR} ${extraPrefixPaths}
             PATH_SUFFIXES "lib")
         _getHintsDirective(hints ${ZMQ_RELEASE_LIB})
         find_library (ZMQ_DEBUG_LIB
             NAMES ${debugLibNames}
             ${hints}
-            PATHS $ENV{ZMQ_DIR} ${extraPrefixPaths}
+            PATHS ${ZMQ_DIR} $ENV{ZMQ_DIR} ${extraPrefixPaths}
             PATH_SUFFIXES "lib")
         set (CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
         find_library (ZMQ_RELEASE_DLL
             NAMES ${releaseLibNames}
             ${hints}
-            PATHS $ENV{ZMQ_DIR} ${extraPrefixPaths}
+            PATHS ${ZMQ_DIR} $ENV{ZMQ_DIR} ${extraPrefixPaths}
             PATH_SUFFIXES "bin" "lib")
         find_library (ZMQ_DEBUG_DLL
             NAMES ${debugLibNames}
             ${hints}
-            PATHS $ENV{ZMQ_DIR} ${extraPrefixPaths}
+            PATHS ${ZMQ_DIR} $ENV{ZMQ_DIR} ${extraPrefixPaths}
             PATH_SUFFIXES "bin" "lib")
         find_path (ZMQ_HEADER_DIR "zmq.h"
             ${_hints}
-            PATHS $ENV{ZMQ_DIR} ${extraPrefixPaths}
+            PATHS ${ZMQ_DIR} $ENV{ZMQ_DIR} ${extraPrefixPaths}
             PATH_SUFFIXES "include")
+        mark_as_advanced (
+            ZMQ_RELEASE_LIB ZMQ_DEBUG_LIB
+            ZMQ_RELEASE_DLL ZMQ_DEBUG_DLL
+            ZMQ_HEADER_DIR
+        )

         set (${releaseDll} "${ZMQ_RELEASE_DLL}" PARENT_SCOPE)
         set (${releaseLib} "${ZMQ_RELEASE_LIB}" PARENT_SCOPE)
@@ -153,13 +160,14 @@
 # The function which searches for the libraries and headers on *NIX.
 function (_findUnixLibs library includeDir)
     find_library (ZMQ_LIBRARY "zmq"
-        PATHS $ENV{ZMQ_DIR}
+        PATHS ${ZMQ_DIR} $ENV{ZMQ_DIR}
         PATH_SUFFIXES "lib")
     _getHintsDirective(hints ${ZMQ_LIBRARY})
     find_path (ZMQ_HEADER_DIR "zmq.h"
         ${hints}
-        PATHS $ENV{ZMQ_DIR}
+        PATHS ${ZMQ_DIR} $ENV{ZMQ_DIR}
         PATH_SUFFIXES "include")
+    mark_as_advanced (ZMQ_LIBRARY ZMQ_HEADER_DIR)
     set (${library} "${ZMQ_LIBRARY}" PARENT_SCOPE)
     set (${includeDir} "${ZMQ_HEADER_DIR}"  PARENT_SCOPE)
 endfunction ()


Fixed FindZMQ.cmake for Linux

Fixed FindZMQ.cmake for Linux

--- cmake/FindZMQ.cmake
+++ cmake/FindZMQ.cmake
@@ -151,23 +151,16 @@
 endfunction ()

 # The function which searches for the libraries and headers on *NIX.
-function (_findUnixLibs releaseLib debugLib includeDir)
-    find_library (ZMQ_RELEASE_LIB
-        NAMES ${releaseLibNames}
+function (_findUnixLibs library includeDir)
+    find_library (ZMQ_LIBRARY "zmq"
         PATHS $ENV{ZMQ_DIR}
         PATH_SUFFIXES "lib")
-    _getHintsDirective(hints ${ZMQ_RELEASE_LIB})
-    find_library (ZMQ_DEBUG_LIB
-        NAMES ${debugLibNames}
-        ${hints}
-        PATHS $ENV{ZMQ_DIR}
-        PATH_SUFFIXES "lib")
+    _getHintsDirective(hints ${ZMQ_LIBRARY})
     find_path (ZMQ_HEADER_DIR "zmq.h"
         ${_hints}
         PATHS $ENV{ZMQ_DIR}
         PATH_SUFFIXES "include")
-    set (${releaseLib} "${ZMQ_RELEASE_LIB}" PARENT_SCOPE)
-    set (${debugLib}   "${ZMQ_DEBUG_LIB}"   PARENT_SCOPE)
+    set (${library} "${ZMQ_LIBRARY}" PARENT_SCOPE)
     set (${includeDir} "${ZMQ_HEADER_DIR}"  PARENT_SCOPE)
 endfunction ()

@@ -192,11 +185,12 @@
     set (_releaseLinkLib _releaseImplib)
     set (_debugLinkLib _debugImplib)
 else ()
-    _findUnixLibs(_releaseLocation _debugLocation ZMQ_INCLUDE_DIRS)
+    _findUnixLibs(_releaseLocation ZMQ_INCLUDE_DIRS)
     unset (_releaseImplib)
+    unset (_debugLocation)
     unset (_debugImplib)
     set (_releaseLinkLib _releaseLocation)
-    set (_debugLinkLib _debugLocation)
+    unset (_debugLinkLib)
 endif ()

 if (_releaseLinkLib OR _debugLinkLib)


Patch to remote -k flag for gzip

Patch to remote -k flag for gzip

--- Utilities/Doxygen/ITKDoxygenTags.cmake
+++ Utilities/Doxygen/ITKDoxygenTags.cmake
@@ -14,8 +14,11 @@
         TIMEOUT 60
         STATUS statusITKDoxygenTagFile
         SHOW_PROGRESS )
-  list(GET statusITKDoxygenTagFile 0 statusITKDoxygenTagFile)
-  if(statusITKDoxygenTagFile)
+  list(GET statusITKDoxygenTagFile 0 statusVal)
+  list(GET statusITKDoxygenTagFile 1 statusMessage)
+  if(statusVal)
+    message(WARNING "Warning: failed to download ITK tag file.")
+    message("Message: " ${statusMessage} )
     file(REMOVE ${ITK_DOXYGEN_COMPRESSED_TAG_FILE})
   endif()
 endif(NOT EXISTS ${ITK_DOXYGEN_COMPRESSED_TAG_FILE})
@@ -25,8 +28,10 @@
   find_program(GZIP_TOOL NAMES gzip)
   if(GZIP_TOOL)
     message("Decompressing ITK tag file")
-    # Note the "-k" option, which doesn't exist in older versions of gzip
-    execute_process(COMMAND ${GZIP_TOOL} -dkf ${ITK_DOXYGEN_COMPRESSED_TAG_FILE})
+    execute_process(COMMAND ${GZIP_TOOL} -df ${ITK_DOXYGEN_COMPRESSED_TAG_FILE} RESULT_VARIABLE GZIP_OUT)
+    if (${GZIP_OUT} )
+        MESSAGE(WARNING "gzip result message: " ${GZIP_OUT})
+    endif()
     set(DOXYGEN_TAGFILES_PARAMETER "${ITK_DOXYGEN_TAG_FILE}=http://www.itk.org/Doxygen/html/")
   endif()
 else()


Fixed cmake/modules/FindPsiPluginsApi.cmake

--- cmake/modules/FindPsiPluginsApi.cmake
+++ cmake/modules/FindPsiPluginsApi.cmake
@@ -40,9 +40,9 @@

 if(EXISTS "${ABS_PLUGINS_ROOT_DIR}/cmake/modules/variables.cmake")
     set(PLUGINS_DIRECTORY "${ABS_PLUGINS_ROOT_DIR}")
-elseif(EXISTS "${ABS_CURRENT_DIR}/src/plugins/cmake/modules/variables.cmake")
+elseif(EXISTS "${ABS_CURRENT_DIR}/plugins/cmake/modules/variables.cmake")
     set(PLUGINS_DIRECTORY "${ABS_CURRENT_DIR}/src/plugins")
-elseif(EXISTS "${ABS_PARENT_DIR}/src/plugins/cmake/modules/variables.cmake")
+elseif(EXISTS "${ABS_PARENT_DIR}/plugins/cmake/modules/variables.cmake")
     set(PLUGINS_DIRECTORY "${ABS_CURRENT_DIR}/src/plugins")
 endif()

@@ -50,7 +50,7 @@
     set(SEARCH_FLAG NO_CMAKE_SYSTEM_PATH CMAKE_FIND_ROOT_PATH_BOTH)
 endif()

-if(PLUGINS_PATH)
+if(PLUGINS_DIRECTORY)
     if(EXISTS "${PLUGINS_DIRECTORY}/cmake/modules/variables.cmake")
         set(PsiPluginsApi_DIR "${PLUGINS_DIRECTORY}/cmake/modules")
     endif()


Disable warning C4181: "qualifier applied to reference type; ignored"
This was causing a flooding of warnings with MSVC 2008. This warning was removed in MSVC 2010.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -153,7 +153,7 @@
     -wd4715 # Suppress ''function' : not all control paths return a value'
     -wd4800 # Suppress ''type' : forcing value to bool 'true' or 'false' (performance warning)'
     -wd4065 # Suppress 'switch statement contains 'default' but no 'case' labels'
-
+    -wd4181 # Suppress 'qualifier applied to reference type; ignored'
     -w14062 # Promote "enumerator in switch of enum is not handled" to level 1 warning.
     )


Simplify CMake rules in HandleLLVMOptions module.

Summary: No functionality change.

Reviewers: Bigcheese

Reviewed By: Bigcheese

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D535

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -59,6 +59,24 @@
   endif(UNIX)
 endif(WIN32)

+function(add_flag_or_print_warning flag)
+  check_c_compiler_flag(${flag} C_SUPPORTS_${flag})
+  check_cxx_compiler_flag(${flag} CXX_SUPPORTS_${flag})
+  if (C_SUPPORTS_${flag} AND CXX_SUPPORTS_${flag})
+    message(STATUS "Building with ${flag}")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" PARENT_SCOPE)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}" PARENT_SCOPE)
+  else()
+    message(WARNING "${flag} is not supported.")
+  endif()
+endfunction()
+
+function(append_if variable value condition)
+  if (${condition})
+    set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
+  endif()
+endfunction()
+
 if( LLVM_ENABLE_PIC )
   if( XCODE )
     # Xcode has -mdynamic-no-pic on by default, which overrides -fPIC. I don't
@@ -67,23 +85,14 @@
   elseif( WIN32 OR CYGWIN)
     # On Windows all code is PIC. MinGW warns if -fPIC is used.
   else()
-    check_cxx_compiler_flag("-fPIC" SUPPORTS_FPIC_FLAG)
-    if( SUPPORTS_FPIC_FLAG )
-      message(STATUS "Building with -fPIC")
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
-    else( SUPPORTS_FPIC_FLAG )
-      message(WARNING "-fPIC not supported.")
-    endif()
+    add_flag_or_print_warning("-fPIC")

     if( WIN32 OR CYGWIN)
       # MinGW warns if -fvisibility-inlines-hidden is used.
     else()
       check_cxx_compiler_flag("-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG)
-      if( SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG )
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
-      endif()
-     endif()
+      append_if(CMAKE_CXX_FLAGS "-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG)
+    endif()
   endif()
 endif()

@@ -194,24 +203,14 @@
     if (LLVM_ENABLE_PEDANTIC)
       add_llvm_definitions( -pedantic -Wno-long-long )
       check_cxx_compiler_flag("-Werror -Wnested-anon-types" CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG)
-      if( CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG )
-        set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nested-anon-types" )
-      endif()
+      append_if(CMAKE_CXX_FLAGS "-Wno-nested-anon-types" CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG)
     endif (LLVM_ENABLE_PEDANTIC)
     check_cxx_compiler_flag("-Werror -Wcovered-switch-default" CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)
-    if( CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG )
-      set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wcovered-switch-default" )
-    endif()
+    append_if(CMAKE_CXX_FLAGS "-Wcovered-switch-default" CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)
     check_c_compiler_flag("-Werror -Wcovered-switch-default" C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)
-    if( C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG )
-      set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcovered-switch-default" )
-    endif()
-    if (USE_NO_UNINITIALIZED)
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-uninitialized")
-    endif()
-    if (USE_NO_MAYBE_UNINITIALIZED)
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized")
-    endif()
+    append_if(CMAKE_C_FLAGS "-Wcovered-switch-default" C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)
+    append_if(CMAKE_CXX_FLAGS "-Wno-uninitialized" USE_NO_UNINITIALIZED)
+    append_if(CMAKE_CXX_FLAGS "-Wno-maybe-uninitialized" USE_NO_MAYBE_UNINITIALIZED)
   endif (LLVM_ENABLE_WARNINGS)
   if (LLVM_ENABLE_WERROR)
     add_llvm_definitions( -Werror )


Applied patch from Ben Morgan (ROOT-6512 - RootConfiguration.cmake hardcodes paths into installed ROOTConfig.cmake)

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -444,17 +444,22 @@
                ${CMAKE_BINARY_DIR}/ROOTConfig.cmake @ONLY)

 #---To be used from the install tree--------------------------------------------------------------------------
+# Need to calculate actual relative paths from CMAKEDIR to other locations
+file(RELATIVE_PATH ROOT_CMAKE_TO_INCLUDE_DIR "${CMAKE_INSTALL_FULL_CMAKEDIR}" "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
+file(RELATIVE_PATH ROOT_CMAKE_TO_LIB_DIR "${CMAKE_INSTALL_FULL_CMAKEDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}")
+file(RELATIVE_PATH ROOT_CMAKE_TO_BIN_DIR "${CMAKE_INSTALL_FULL_CMAKEDIR}" "${CMAKE_INSTALL_FULL_BINDIR}")
+
 set(ROOT_INCLUDE_DIR_SETUP "
 # ROOT configured for the install with relative paths, so use these
-get_filename_component(ROOT_INCLUDE_DIRS \"\${_thisdir}/../include\" ABSOLUTE)
+get_filename_component(ROOT_INCLUDE_DIRS \"\${_thisdir}/${ROOT_CMAKE_TO_INCLUDE_DIR}\" ABSOLUTE)
 ")
 set(ROOT_LIBRARY_DIR_SETUP "
 # ROOT configured for the install with relative paths, so use these
-get_filename_component(ROOT_LIBRARY_DIR \"\${_thisdir}/../lib\" ABSOLUTE)
+get_filename_component(ROOT_LIBRARY_DIR \"\${_thisdir}/${ROOT_CMAKE_TO_LIB_DIR}\" ABSOLUTE)
 ")
 set(ROOT_BINARY_DIR_SETUP "
 # ROOT configured for the install with relative paths, so use these
-get_filename_component(ROOT_BINARY_DIR \"\${_thisdir}/../bin\" ABSOLUTE)
+get_filename_component(ROOT_BINARY_DIR \"\${_thisdir}/${ROOT_CMAKE_TO_BIN_DIR}\" ABSOLUTE)
 ")
 set(ROOT_MODULE_PATH_SETUP "
 # ROOT configured for use CMake modules from installation tree


update zookeeper package so archive name and package version match

--- cmake/projects/zookeeper/hunter.cmake
+++ cmake/projects/zookeeper/hunter.cmake
@@ -15,9 +15,9 @@
     VERSION
     "3.4.9-p1"
     URL
-    "https://github.com/hunter-packages/zookeeper/archive/3.4.9-hunter-7.tar.gz"
+    "https://github.com/hunter-packages/zookeeper/archive/3.4.9-p1.tar.gz"
     SHA1
-    6d73772207e55d7b614a2aaa3f5ba5203c2df045
+    477ddb59d7071e83fc1acc9f8f0425f97ccfa56a
 )

 # Pick a download scheme


We don't need to look for MHD if we already have ulfius

--- example_programs/cmake-modules/FindMHD.cmake
+++ example_programs/cmake-modules/FindMHD.cmake
@@ -1,64 +0,0 @@
-#.rst:
-# FindJansson
-# -----------
-#
-# Find libmicrohttpd
-#
-# Find libmicrohttpd headers and libraries.
-#
-# ::
-#
-#   MHD_FOUND          - True if libmicrohttpd found.
-#   MHD_INCLUDE_DIRS   - Where to find microhttpd.h.
-#   MHD_LIBRARIES      - List of libraries when using libmicrohttpd.
-#   MHD_VERSION_STRING - The version of libmicrohttpd found.
-
-#=============================================================================
-# Copyright 2018 Nicolas Mora <mail@babelouest.org>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# as published by the Free Software Foundation;
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-# GNU GENERAL PUBLIC LICENSE for more details.
-#
-# You should have received a copy of the GNU General Public
-# License along with this library.	If not, see <http://www.gnu.org/licenses/>.
-#=============================================================================
-
-find_package(PkgConfig QUIET)
-pkg_check_modules(PC_MHD QUIET libmicrohttpd)
-
-find_path(MHD_INCLUDE_DIR
-        NAMES microhttpd.h
-        HINTS ${PC_MHD_INCLUDEDIR} ${PC_MHD_INCLUDE_DIRS})
-
-find_library(MHD_LIBRARY
-        NAMES libmicrohttpd microhttpd
-        HINTS ${PC_MHD_LIBDIR} ${PC_MHD_LIBRARY_DIRS})
-
-if (PC_MHD_VERSION)
-    set(MHD_VERSION_STRING ${PC_MHD_VERSION})
-elseif (MHD_INCLUDE_DIR AND EXISTS "${MHD_INCLUDE_DIR}/microhttpd.h")
-    set(regex_mhd_version "^#define[ \t]+MHD_VERSION[ \t]+([^\"]+).*")
-    file(STRINGS "${MHD_INCLUDE_DIR}/microhttpd.h" mhd_version REGEX "${regex_mhd_version}")
-    string(REGEX REPLACE "${regex_mhd_version}" "\\1" MHD_VERSION_STRING "${mhd_version}")
-    unset(regex_mhd_version)
-    unset(mhd_version)
-endif ()
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(mhd
-        REQUIRED_VARS MHD_LIBRARY MHD_INCLUDE_DIR
-        VERSION_VAR MHD_VERSION_STRING)
-
-if (MHD_FOUND)
-    set(MHD_LIBRARIES ${MHD_LIBRARY})
-    set(MHD_INCLUDE_DIRS ${MHD_INCLUDE_DIR})
-endif ()
-
-mark_as_advanced(MHD_INCLUDE_DIR MHD_LIBRARY)


BUG: Fixed older XCode linking error

BUG: Fixed older XCode linking error

Added an excluding condition (Clang <= 3.2) of USE_COMPILER_HIDDEN_VISIBILITY

Change-Id: I6b0fc1fdcf52f4a67f9f2105f416d473c12a6478

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -7,9 +7,10 @@
 include(${_ITKModuleMacros_DIR}/ITKModuleHeaderTest.cmake)
 include(${_ITKModuleMacros_DIR}/ITKModuleKWStyleTest.cmake)

-# With Apple's GGC <=4.2 and LLVM-GCC <=4.2 visibility of template
-# don't work. Set the option to off and hide it.
-if(APPLE AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION  VERSION_LESS "4.3")
+# With Apple's (GGC <=4.2 and LLVM-GCC <=4.2) or (Clang < 3.2)
+# visibility of template  don't work. Set the option to off and hide it.
+if(APPLE AND ((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION  VERSION_LESS "4.3")
+   OR ((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND CMAKE_CXX_COMPILER_VERSION  VERSION_LESS "3.2")))
   set( USE_COMPILER_HIDDEN_VISIBILITY OFF CACHE INTERNAL "" )
 endif()
 include(GenerateExportHeader)


Update FindOGRE to find new things like GL3+ renderer.

--- CMakeModules/FindOGRE.cmake
+++ CMakeModules/FindOGRE.cmake
@@ -28,8 +28,10 @@
 #  Plugin_BSPSceneManager, Plugin_CgProgramManager,
 #  Plugin_OctreeSceneManager, Plugin_OctreeZone,
 #  Plugin_ParticleFX, Plugin_PCZSceneManager,
-#  RenderSystem_GL, RenderSystem_Direct3D9,
-#  Paging, Terrain
+#  RenderSystem_GL, RenderSystem_GL3Plus,
+#  RenderSystem_GLES, RenderSystem_GLES2,
+#  RenderSystem_Direct3D9, RenderSystem_Direct3D11
+#  Paging, Terrain, Volume, Overlay
 #
 # For each of these components, the following variables are defined:
 #
@@ -54,8 +56,6 @@

 # Get path, convert backslashes as ${ENV_${var}}
-getenv_path(OGRE_BYATIS)
-getenv_path(OGRE_GHADAMON)
 getenv_path(OGRE_HOME)
 getenv_path(OGRE_SDK)
 getenv_path(OGRE_SOURCE)
@@ -70,14 +70,13 @@
   set(OGRE_LIB_SUFFIX "")
 endif ()

-
-if(APPLE)
-    set(OGRE_LIBRARY_NAMES "Ogre${OGRE_LIB_SUFFIX}")
+if(APPLE AND NOT OGRE_STATIC)
+	set(OGRE_LIBRARY_NAMES "Ogre${OGRE_LIB_SUFFIX}")
 else()
     set(OGRE_LIBRARY_NAMES "OgreMain${OGRE_LIB_SUFFIX}")
 endif()
 get_debug_names(OGRE_LIBRARY_NAMES)
-
+
 # construct search paths from environmental hints and
 # OS specific guesses
 if (WIN32)
@@ -98,7 +97,7 @@
   )
 endif ()
 set(OGRE_PREFIX_PATH
-  ${OGRE_HOME} ${OGRE_SDK} ${ENV_OGRE_HOME} ${ENV_OGRE_SDK} ${ENV_OGRE_BYATIS} ${ENV_OGRE_GHADAMON}
+  ${OGRE_HOME} ${OGRE_SDK} ${ENV_OGRE_HOME} ${ENV_OGRE_SDK}
   ${OGRE_PREFIX_GUESSES}
 )
 create_search_paths(OGRE)
@@ -108,8 +107,8 @@
 set(OGRE_PREFIX_DEPENDENCIES_DIR ${OGRE_DEPENDENCIES_DIR} ${ENV_OGRE_DEPENDENCIES_DIR})
 if (OGRE_PREFIX_SOURCE AND OGRE_PREFIX_BUILD)
   foreach(dir ${OGRE_PREFIX_SOURCE})
-    set(OGRE_INC_SEARCH_PATH ${dir}/OgreMain/include ${dir}/Dependencies/include ${dir}/iOSDependencies/include ${OGRE_INC_SEARCH_PATH})
-    set(OGRE_LIB_SEARCH_PATH ${dir}/lib ${dir}/Dependencies/lib ${dir}/iOSDependencies/lib ${OGRE_LIB_SEARCH_PATH})
+    set(OGRE_INC_SEARCH_PATH ${dir}/OgreMain/include ${dir}/Dependencies/include ${dir}/iOSDependencies/include ${dir}/AndroidDependencies/include ${OGRE_INC_SEARCH_PATH})
+    set(OGRE_LIB_SEARCH_PATH ${dir}/lib ${dir}/Dependencies/lib ${dir}/iOSDependencies/lib ${dir}/AndroidDependencies/lib/${ANDROID_ABI} ${OGRE_LIB_SEARCH_PATH})
     set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
   endforeach(dir)
   foreach(dir ${OGRE_PREFIX_BUILD})
@@ -130,10 +129,10 @@
 endif ()

 # redo search if any of the environmental hints changed
-set(OGRE_COMPONENTS Paging Terrain
+set(OGRE_COMPONENTS Paging Terrain Volume Overlay
   Plugin_BSPSceneManager Plugin_CgProgramManager Plugin_OctreeSceneManager
   Plugin_OctreeZone Plugin_PCZSceneManager Plugin_ParticleFX
-  RenderSystem_Direct3D11 RenderSystem_Direct3D9 RenderSystem_GL RenderSystem_GLES RenderSystem_GLES2)
+  RenderSystem_Direct3D11 RenderSystem_Direct3D9 RenderSystem_GL RenderSystem_GL3Plus RenderSystem_GLES RenderSystem_GLES2)
 set(OGRE_RESET_VARS
   OGRE_CONFIG_INCLUDE_DIR OGRE_INCLUDE_DIR
   OGRE_LIBRARY_FWK OGRE_LIBRARY_REL OGRE_LIBRARY_DBG
@@ -147,12 +146,12 @@
 set(OGRE_PREFIX_WATCH ${OGRE_PREFIX_PATH} ${OGRE_PREFIX_SOURCE} ${OGRE_PREFIX_BUILD})
 clear_if_changed(OGRE_PREFIX_WATCH ${OGRE_RESET_VARS})

-# try to locate Ogre via pkg-config
-use_pkgconfig(OGRE_PKGC "OGRE${OGRE_LIB_SUFFIX}")
-
-if(NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
-  # try to find framework on OSX
-  findpkg_framework(OGRE)
+if(NOT OGRE_STATIC)
+	# try to locate Ogre via pkg-config
+	use_pkgconfig(OGRE_PKGC "OGRE${OGRE_LIB_SUFFIX}")
+
+	# try to find framework on OSX
+	findpkg_framework(OGRE)
 else()
 	set(OGRE_LIBRARY_FWK "")
 endif()
@@ -244,7 +243,7 @@
   find_package(OpenGLES2 QUIET)
   find_package(ZLIB QUIET)
   find_package(ZZip QUIET)
-  if (UNIX AND NOT APPLE)
+  if (UNIX AND NOT APPLE AND NOT ANDROID)
     find_package(X11 QUIET)
     find_library(XAW_LIBRARY NAMES Xaw Xaw7 PATHS ${DEP_LIB_SEARCH_DIR} ${X11_LIB_SEARCH_PATH})
     if (NOT XAW_LIBRARY OR NOT X11_Xt_FOUND)
@@ -253,22 +252,17 @@
   endif ()
   if (APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
     find_package(Cocoa QUIET)
+    find_package(Carbon QUIET)
     find_package(CoreVideo QUIET)
-    if (NOT Cocoa_FOUND OR NOT CoreVideo_FOUND)
+    if (NOT Cocoa_FOUND OR NOT Carbon_FOUND OR NOT CoreVideo_FOUND)
       set(OGRE_DEPS_FOUND FALSE)
     endif ()
   endif ()
-  if (APPLE AND OGRE_BUILD_PLATFORM_APPLE_IOS)
-    find_package(iOSSDK QUIET)
-    if (NOT iOSSDK_FOUND)
-      set(OGRE_DEPS_FOUND FALSE)
-    endif ()
-  endif ()

   set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${ZZip_LIBRARIES} ${ZLIB_LIBRARIES} ${FreeImage_LIBRARIES} ${FREETYPE_LIBRARIES} )

-  if (APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
-    set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${Cocoa_LIBRARIES})
+  if (APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS AND NOT ANDROID)
+    set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${X11_LIBRARIES} ${X11_Xt_LIBRARIES} ${XAW_LIBRARY} ${X11_Xrandr_LIB} ${Carbon_LIBRARIES} ${Cocoa_LIBRARIES})
   endif()

   if (NOT ZLIB_FOUND OR NOT ZZip_FOUND)
@@ -280,7 +274,7 @@
   if (NOT FREETYPE_FOUND)
     set(OGRE_DEPS_FOUND FALSE)
   endif ()
-  if (UNIX AND NOT APPLE)
+  if (UNIX AND NOT APPLE AND NOT ANDROID)
 	if (NOT X11_FOUND)
       set(OGRE_DEPS_FOUND FALSE)
 	endif ()
@@ -385,14 +379,14 @@
 ogre_find_component(Property OgreProperty.h)
 # look for RTShaderSystem component
 ogre_find_component(RTShaderSystem OgreRTShaderSystem.h)
+# look for Volume component
+ogre_find_component(Volume OgreVolume.h)
 # look for Overlay component
-ogre_find_component(Overlay OgreOverlay.h)
-
+ogre_find_component(Overlay OgreOverlaySystem.h)

 #########################################################
 # Find Ogre plugins
-#########################################################
-
+#########################################################
 macro(ogre_find_plugin PLUGIN HEADER)
   # On Unix, the plugins might have no prefix
   if (CMAKE_FIND_LIBRARY_PREFIXES)
@@ -414,11 +408,11 @@
   # find link libraries for plugins
   set(OGRE_${PLUGIN}_LIBRARY_NAMES "${PLUGIN}${OGRE_LIB_SUFFIX}")
   get_debug_names(OGRE_${PLUGIN}_LIBRARY_NAMES)
-  set(OGRE_${PLUGIN}_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
+  #set(OGRE_${PLUGIN}_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
   find_library(OGRE_${PLUGIN}_LIBRARY_REL NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES}
-    HINTS ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt release release/opt relwithdebinfo relwithdebinfo/opt minsizerel minsizerel/opt)
+    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt release release/opt relwithdebinfo relwithdebinfo/opt minsizerel minsizerel/opt)
   find_library(OGRE_${PLUGIN}_LIBRARY_DBG NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES_DBG}
-    HINTS ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt debug debug/opt)
+    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt debug debug/opt)
   make_library_set(OGRE_${PLUGIN}_LIBRARY)

   if (OGRE_${PLUGIN}_LIBRARY OR OGRE_${PLUGIN}_INCLUDE_DIR)
@@ -451,9 +445,9 @@
           PATH_SUFFIXES "" bin bin/debug debug)
       elseif (UNIX)
         get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_REL} PATH)
-        set(OGRE_PLUGIN_DIR_REL ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (release)")
-        get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_DBG} PATH)
-        set(OGRE_PLUGIN_DIR_DBG ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (debug)")
+        set(OGRE_PLUGIN_DIR_REL ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (release)" FORCE)
+	    get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_DBG} PATH)
+        set(OGRE_PLUGIN_DIR_DBG ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (debug)" FORCE)
       endif ()
     endif ()

@@ -480,11 +474,12 @@
 ogre_find_plugin(Plugin_OctreeSceneManager OgreOctreeSceneManager.h PlugIns/OctreeSceneManager/include)
 ogre_find_plugin(Plugin_ParticleFX OgreParticleFXPrerequisites.h PlugIns/ParticleFX/include)
 ogre_find_plugin(RenderSystem_GL OgreGLRenderSystem.h RenderSystems/GL/include)
+ogre_find_plugin(RenderSystem_GL3Plus OgreGL3PlusRenderSystem.h RenderSystems/GL3Plus/include)
 ogre_find_plugin(RenderSystem_GLES OgreGLESRenderSystem.h RenderSystems/GLES/include)
 ogre_find_plugin(RenderSystem_GLES2 OgreGLES2RenderSystem.h RenderSystems/GLES2/include)
 ogre_find_plugin(RenderSystem_Direct3D9 OgreD3D9RenderSystem.h RenderSystems/Direct3D9/include)
 ogre_find_plugin(RenderSystem_Direct3D11 OgreD3D11RenderSystem.h RenderSystems/Direct3D11/include)
-
+
 if (OGRE_STATIC)
   # check if dependencies for plugins are met
   if (NOT DirectX_FOUND)
@@ -496,6 +491,9 @@
   if (NOT OPENGL_FOUND)
     set(OGRE_RenderSystem_GL_FOUND FALSE)
   endif ()
+  if (NOT OPENGL_FOUND)
+    set(OGRE_RenderSystem_GL3Plus_FOUND FALSE)
+  endif ()
   if (NOT OPENGLES_FOUND)
     set(OGRE_RenderSystem_GLES_FOUND FALSE)
   endif ()
@@ -514,6 +512,9 @@
     ${DirectX_D3D11_LIBRARIES}
   )
   set(OGRE_RenderSystem_GL_LIBRARIES ${OGRE_RenderSystem_GL_LIBRARIES}
+    ${OPENGL_LIBRARIES}
+  )
+  set(OGRE_RenderSystem_GL3Plus_LIBRARIES ${OGRE_RenderSystem_GL3Plus_LIBRARIES}
     ${OPENGL_LIBRARIES}
   )
   set(OGRE_RenderSystem_GLES_LIBRARIES ${OGRE_RenderSystem_GLES_LIBRARIES}


COMP: Restore thread flags for Sun and MinGW platforms

These flags were added by commit 8453ab58 (only use -D_PTHREADS on suns,
2003-03-12), commit c012db98 (fix failing test by adding -mt flag to
build, 2004-11-12), and commit f030c25a (Add -mthreads flag: Mingw,
2005-08-19) but removed during modularization.

--- CMake/ITKPlatformSpecificChecks.cmake
+++ CMake/ITKPlatformSpecificChecks.cmake
@@ -89,6 +89,27 @@
  endif(VNL_CONFIG_ENABLE_SSE2 OR VNL_CONFIG_ENABLE_SSE2_ROUNDING)
 endif(CMAKE_COMPILER_IS_GNUCXX)

+#-----------------------------------------------------------------------------
+
+# for the gnu compiler a -D_PTHREADS is needed on sun
+# for the native compiler a -mt flag is needed on the sun
+if(CMAKE_SYSTEM MATCHES "SunOS.*")
+  if(CMAKE_COMPILER_IS_GNUCXX)
+    set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} -D_PTHREADS")
+    set(ITK_REQUIRED_LINK_FLAGS "${ITK_REQUIRED_LINK_FLAGS} -lrt")
+  else()
+    set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} -mt")
+    set(ITK_REQUIRED_C_FLAGS "${ITK_REQUIRED_C_FLAGS} -mt")
+  endif()
+endif()
+
+# mingw thread support
+if(MINGW)
+  set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} -mthreads")
+  set(ITK_REQUIRED_C_FLAGS "${ITK_REQUIRED_C_FLAGS} -mthreads")
+  set(ITK_REQUIRED_LINK_FLAGS "${ITK_REQUIRED_LINK_FLAGS} -mthreads")
+endif()
+
 # Add flags for the SUN compiler to provide all the methods for std::allocator.
 #
 itkCHECK_CXX_ACCEPTS_FLAGS("-features=no%anachronisms" SUN_COMPILER)


improve error output

improve error output

--- cmake/configure/configure_1_cuda.cmake
+++ cmake/configure/configure_1_cuda.cmake
@@ -41,6 +41,8 @@

   IF(CUDA_FOUND)

+    SET(${var} TRUE)
+
     IF("${CUDA_NVCC_FLAGS}" MATCHES "-arch")

       # Compute Capability specified explicitly.
@@ -51,31 +53,50 @@
       ELSEIF("${CUDA_NVCC_FLAGS}" MATCHES "-arch=sm_([0-9]*)")
         SET(CUDA_COMPUTE_CAPABILITY "${CMAKE_MATCH_1}")
       ELSE()
-        MESSAGE( FATAL_ERROR "Missformed Compute Capability specified")
+        STRING(REGEX MATCH "(-arch[ ]*[^ ]*)" match "${CUDA_NVCC_FLAGS}")
+        MESSAGE(STATUS "Ill-formed Compute Capability specified.")
+        SET(CUDA_ADDITIONAL_ERROR_STRING
+          ${CUDA_ADDITIONAL_ERROR_STRING}
+          "An ill-formed Compute Capability was passed in CUDA_NVCC_FLAGS: ${match}\n"
+          "deal.II requires at least Compute Capability 3.5\n"
+          "which is used as default is nothing is specified."
+          )
+        SET(${var} FALSE)
       ENDIF()

+
       IF("${CUDA_COMPUTE_CAPABILITY}" LESS "35")
-        MESSAGE( FATAL_ERROR "Too low CUDA Compute Capability specified -- deal.II requires at least 3.5 ")
+        MESSAGE(STATUS "Too low CUDA Compute Capability specified -- deal.II requires at least 3.5 ")
+        SET(CUDA_ADDITIONAL_ERROR_STRING
+          ${CUDA_ADDITIONAL_ERROR_STRING}
+          "Too low CUDA Compute Capability specified: ${CUDA_COMPUTE_CAPABILITY}\n"
+          "deal.II requires at least Compute Capability 3.5\n"
+          "which is used as default is nothing is specified."
+          )
+        SET(${var} FALSE)
       ENDIF()
     ENDIF()

-    IF( NOT DEFINED CUDA_COMPUTE_CAPABILITY)
-      # Set to use compute capability 3.5 by default
-      SET(CUDA_COMPUTE_CAPABILITY "35")
-      SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -arch=sm_35)
+    # Configuration was successful
+    IF(${var})
+
+      IF( NOT DEFINED CUDA_COMPUTE_CAPABILITY)
+        # Set to use compute capability 3.5 by default
+        SET(CUDA_COMPUTE_CAPABILITY "35")
+        SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -arch=sm_35)
+      ENDIF()
+
+      # Export further definitions
+      STRING(SUBSTRING "${CUDA_COMPUTE_CAPABILITY}" 0 1 CUDA_COMPUTE_CAPABILITY_MAJOR)
+      STRING(SUBSTRING "${CUDA_COMPUTE_CAPABILITY}" 1 1 CUDA_COMPUTE_CAPABILITY_MINOR)
+      SET(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE FALSE)
+
+
+      SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -std=c++11)
+
+      # FIXME: CUDA compiler NVCC doesn't support C++14.
+
     ENDIF()
-
-    # Export further definitions
-    STRING(SUBSTRING "${CUDA_COMPUTE_CAPABILITY}" 0 1 CUDA_COMPUTE_CAPABILITY_MAJOR)
-    STRING(SUBSTRING "${CUDA_COMPUTE_CAPABILITY}" 1 1 CUDA_COMPUTE_CAPABILITY_MINOR)
-
-    SET(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE FALSE)
-
-    SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -std=c++11)
-
-    # FIXME: CUDA compiler NVCC doesn't support C++14.
-
-    SET(${var} TRUE)
   ENDIF()

 ENDMACRO()


cmake: Add -gdwarf-4 at link time for gcc

Add a linker option for gcc to force dwarf symbols to be version 4.

Fixes #50106

Signed-off-by: Jeremy Bettis <4df7b5147fee087dca33c181f288ee7dbf56e022@google.com>

--- cmake/linker/ld/gcc/linker_flags.cmake
+++ cmake/linker/ld/gcc/linker_flags.cmake
@@ -8,3 +8,7 @@
 endif()

 check_set_linker_property(TARGET linker APPEND PROPERTY gprof -pg)
+
+# GCC 11 by default emits DWARF version 5 which cannot be parsed by
+# pyelftools. Can be removed once pyelftools supports v5.
+add_link_options(-gdwarf-4)


[Build] Added full support for SEvMgr, TraDemGen, TravelCCM, AirSched, AvlCal, SimFQT, SimLFS and SimCRS.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -590,6 +590,134 @@

 endmacro (get_stdair)

+# ~~~~~~~~~~ SEvMgr ~~~~~~~~~
+macro (get_sevmgr)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires SEvMgr-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires SEvMgr without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (SEvMgr ${_required_version} REQUIRED
+	HINTS ${WITH_SEVMGR_PREFIX})
+  if (SEvMgr_FOUND)
+    #
+    message (STATUS "Found SEvMgr version: ${SEVMGR_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${SEVMGR_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${SEVMGR_LIBRARIES})
+
+  else (SEvMgr_FOUND)
+    set (ERROR_MSG "The SEvMgr 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_SEVMGR_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<SEvMgr install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (SEvMgr_FOUND)
+
+endmacro (get_sevmgr)
+
+# ~~~~~~~~~~ TraDemGen ~~~~~~~~~
+macro (get_trademgen)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires TraDemGen-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires TraDemGen without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (TraDemGen ${_required_version} REQUIRED
+	HINTS ${WITH_TRADEMGEN_PREFIX})
+  if (TraDemGen_FOUND)
+    #
+    message (STATUS "Found TraDemGen version: ${TRADEMGEN_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${TRADEMGEN_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${TRADEMGEN_LIBRARIES})
+
+  else (TraDemGen_FOUND)
+    set (ERROR_MSG "The TraDemGen 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_TRADEMGEN_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<TraDemGen install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (TraDemGen_FOUND)
+
+endmacro (get_trademgen)
+
+# ~~~~~~~~~~ TravelCCM ~~~~~~~~~
+macro (get_travelccm)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires TravelCCM-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires TravelCCM without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (TravelCCM ${_required_version} REQUIRED
+	HINTS ${WITH_TRAVELCCM_PREFIX})
+  if (TravelCCM_FOUND)
+    #
+    message (STATUS "Found TravelCCM version: ${TRAVELCCM_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${TRAVELCCM_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${TRAVELCCM_LIBRARIES})
+
+  else (TravelCCM_FOUND)
+    set (ERROR_MSG "The TravelCCM 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_TRAVELCCM_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<TravelCCM install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (TravelCCM_FOUND)
+
+endmacro (get_travelccm)
+
+# ~~~~~~~~~~ AirSched ~~~~~~~~~
+macro (get_airsched)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires AirSched-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires AirSched without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (AirSched ${_required_version} REQUIRED
+	HINTS ${WITH_AIRSCHED_PREFIX})
+  if (AirSched_FOUND)
+    #
+    message (STATUS "Found AirSched version: ${AIRSCHED_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${AIRSCHED_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AIRSCHED_LIBRARIES})
+
+  else (AirSched_FOUND)
+    set (ERROR_MSG "The AirSched library cannot be found. If it is installed")
+    set (ERROR_MSG "${ERROR_MSG} in a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_AIRSCHED_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<AirSched install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (AirSched_FOUND)
+
+endmacro (get_airsched)
+
 # ~~~~~~~~~~ AirRAC ~~~~~~~~~
 macro (get_airrac)
   unset (_required_version)
@@ -654,21 +782,21 @@

 endmacro (get_rmol)

-# ~~~~~~~~~~ Airinv ~~~~~~~~~
+# ~~~~~~~~~~ AirInv ~~~~~~~~~
 macro (get_airinv)
   unset (_required_version)
   if (${ARGC} GREATER 0)
     set (_required_version ${ARGV0})
-    message (STATUS "Requires Airinv-${_required_version}")
+    message (STATUS "Requires AirInv-${_required_version}")
   else (${ARGC} GREATER 0)
-    message (STATUS "Requires Airinv without specifying any version")
+    message (STATUS "Requires AirInv without specifying any version")
   endif (${ARGC} GREATER 0)

-  find_package (Airinv ${_required_version} REQUIRED
+  find_package (AirInv ${_required_version} REQUIRED
 	HINTS ${WITH_AIRINV_PREFIX})
-  if (Airinv_FOUND)
+  if (AirInv_FOUND)
     #
-    message (STATUS "Found Airinv version: ${AIRINV_VERSION}")
+    message (STATUS "Found AirInv version: ${AIRINV_VERSION}")

     # Update the list of include directories for the project
     include_directories (${AIRINV_INCLUDE_DIRS})
@@ -676,15 +804,143 @@
     # Update the list of dependencies for the project
     set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AIRINV_LIBRARIES})

-  else (Airinv_FOUND)
-    set (ERROR_MSG "The Airinv library cannot be found. If it is installed in")
+  else (AirInv_FOUND)
+    set (ERROR_MSG "The AirInv 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_AIRINV_PREFIX=")
-    set (ERROR_MSG "${ERROR_MSG}<Airinv install path> variable.")
+    set (ERROR_MSG "${ERROR_MSG}<AirInv install path> variable.")
     message (FATAL_ERROR "${ERROR_MSG}")
-  endif (Airinv_FOUND)
+  endif (AirInv_FOUND)

 endmacro (get_airinv)
+
+# ~~~~~~~~~~ AvlCal ~~~~~~~~~
+macro (get_avlcal)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires AvlCal-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires AvlCal without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (AvlCal ${_required_version} REQUIRED
+	HINTS ${WITH_AVLCAL_PREFIX})
+  if (AvlCal_FOUND)
+    #
+    message (STATUS "Found AvlCal version: ${AVLCAL_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${AVLCAL_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AVLCAL_LIBRARIES})
+
+  else (AvlCal_FOUND)
+    set (ERROR_MSG "The AvlCal 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_AVLCAL_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<AvlCal install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (AvlCal_FOUND)
+
+endmacro (get_avlcal)
+
+# ~~~~~~~~~~ SimFQT ~~~~~~~~~
+macro (get_simfqt)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires SimFQT-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires SimFQT without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (SimFQT ${_required_version} REQUIRED
+	HINTS ${WITH_SIMFQT_PREFIX})
+  if (SimFQT_FOUND)
+    #
+    message (STATUS "Found SimFQT version: ${SIMFQT_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${SIMFQT_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${SIMFQT_LIBRARIES})
+
+  else (SimFQT_FOUND)
+    set (ERROR_MSG "The SimFQT 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_SIMFQT_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<SimFQT install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (SimFQT_FOUND)
+
+endmacro (get_simfqt)
+
+# ~~~~~~~~~~ SimLFS ~~~~~~~~~
+macro (get_simlfs)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires SimLFS-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires SimLFS without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (SimLFS ${_required_version} REQUIRED
+	HINTS ${WITH_SIMLFS_PREFIX})
+  if (SimLFS_FOUND)
+    #
+    message (STATUS "Found SimLFS version: ${SIMLFS_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${SIMLFS_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${SIMLFS_LIBRARIES})
+
+  else (SimLFS_FOUND)
+    set (ERROR_MSG "The SimLFS 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_SIMLFS_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<SimLFS install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (SimLFS_FOUND)
+
+endmacro (get_simlfs)
+
+# ~~~~~~~~~~ SimCRS ~~~~~~~~~
+macro (get_simcrs)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires SimCRS-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires SimCRS without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (SimCRS ${_required_version} REQUIRED
+	HINTS ${WITH_SIMCRS_PREFIX})
+  if (SimCRS_FOUND)
+    #
+    message (STATUS "Found SimCRS version: ${SIMCRS_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${SIMCRS_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${SIMCRS_LIBRARIES})
+
+  else (SimCRS_FOUND)
+    set (ERROR_MSG "The SimCRS 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_SIMCRS_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<SimCRS install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (SimCRS_FOUND)
+
+endmacro (get_simcrs)

 ##############################################
@@ -1667,6 +1923,62 @@
   endif (StdAir_FOUND)
 endmacro (display_stdair)

+# SEvMgr
+macro (display_sevmgr)
+  if (SEvMgr_FOUND)
+    message (STATUS)
+    message (STATUS "* SEvMgr:")
+    message (STATUS "  - SEVMGR_VERSION ............. : ${SEVMGR_VERSION}")
+    message (STATUS "  - SEVMGR_BINARY_DIRS ......... : ${SEVMGR_BINARY_DIRS}")
+    message (STATUS "  - SEVMGR_EXECUTABLES ......... : ${SEVMGR_EXECUTABLES}")
+    message (STATUS "  - SEVMGR_LIBRARY_DIRS ........ : ${SEVMGR_LIBRARY_DIRS}")
+    message (STATUS "  - SEVMGR_LIBRARIES ........... : ${SEVMGR_LIBRARIES}")
+    message (STATUS "  - SEVMGR_INCLUDE_DIRS ........ : ${SEVMGR_INCLUDE_DIRS}")
+  endif (SEvMgr_FOUND)
+endmacro (display_sevmgr)
+
+# TraDemGen
+macro (display_trademgen)
+  if (TraDemGen_FOUND)
+    message (STATUS)
+    message (STATUS "* TraDemGen:")
+    message (STATUS "  - TRADEMGEN_VERSION .......... : ${TRADEMGEN_VERSION}")
+    message (STATUS "  - TRADEMGEN_BINARY_DIRS ...... : ${TRADEMGEN_BINARY_DIRS}")
+    message (STATUS "  - TRADEMGEN_EXECUTABLES ...... : ${TRADEMGEN_EXECUTABLES}")
+    message (STATUS "  - TRADEMGEN_LIBRARY_DIRS ..... : ${TRADEMGEN_LIBRARY_DIRS}")
+    message (STATUS "  - TRADEMGEN_LIBRARIES ........ : ${TRADEMGEN_LIBRARIES}")
+    message (STATUS "  - TRADEMGEN_INCLUDE_DIRS ..... : ${TRADEMGEN_INCLUDE_DIRS}")
+  endif (TraDemGen_FOUND)
+endmacro (display_trademgen)
+
+# TravelCCM
+macro (display_travelccm)
+  if (TravelCCM_FOUND)
+    message (STATUS)
+    message (STATUS "* TravelCCM:")
+    message (STATUS "  - TRAVELCCM_VERSION .......... : ${TRAVELCCM_VERSION}")
+    message (STATUS "  - TRAVELCCM_BINARY_DIRS ...... : ${TRAVELCCM_BINARY_DIRS}")
+    message (STATUS "  - TRAVELCCM_EXECUTABLES ...... : ${TRAVELCCM_EXECUTABLES}")
+    message (STATUS "  - TRAVELCCM_LIBRARY_DIRS ..... : ${TRAVELCCM_LIBRARY_DIRS}")
+    message (STATUS "  - TRAVELCCM_LIBRARIES ........ : ${TRAVELCCM_LIBRARIES}")
+    message (STATUS "  - TRAVELCCM_INCLUDE_DIRS ..... : ${TRAVELCCM_INCLUDE_DIRS}")
+  endif (TravelCCM_FOUND)
+endmacro (display_travelccm)
+
+# AirSched
+macro (display_airsched)
+  if (AirSched_FOUND)
+    message (STATUS)
+    message (STATUS "* AirSched:")
+    message (STATUS "  - AIRSCHED_VERSION ........... : ${AIRSCHED_VERSION}")
+    message (STATUS "  - AIRSCHED_BINARY_DIRS ....... : ${AIRSCHED_BINARY_DIRS}")
+    message (STATUS "  - AIRSCHED_EXECUTABLES ....... : ${AIRSCHED_EXECUTABLES}")
+    message (STATUS "  - AIRSCHED_LIBRARY_DIRS ...... : ${AIRSCHED_LIBRARY_DIRS}")
+    message (STATUS "  - AIRSCHED_LIBRARIES ......... : ${AIRSCHED_LIBRARIES}")
+    message (STATUS "  - AIRSCHED_INCLUDE_DIRS ...... : ${AIRSCHED_INCLUDE_DIRS}")
+  endif (AirSched_FOUND)
+endmacro (display_airsched)
+
 # AirRAC
 macro (display_airrac)
   if (AirRAC_FOUND)
@@ -1695,19 +2007,75 @@
   endif (RMOL_FOUND)
 endmacro (display_rmol)

-# Airinv
+# AirInv
 macro (display_airinv)
-  if (Airinv_FOUND)
+  if (AirInv_FOUND)
     message (STATUS)
-    message (STATUS "* Airinv:")
+    message (STATUS "* AirInv:")
     message (STATUS "  - AIRINV_VERSION ............. : ${AIRINV_VERSION}")
     message (STATUS "  - AIRINV_BINARY_DIRS ......... : ${AIRINV_BINARY_DIRS}")
     message (STATUS "  - AIRINV_EXECUTABLES ......... : ${AIRINV_EXECUTABLES}")
     message (STATUS "  - AIRINV_LIBRARY_DIRS ........ : ${AIRINV_LIBRARY_DIRS}")
     message (STATUS "  - AIRINV_LIBRARIES ........... : ${AIRINV_LIBRARIES}")
     message (STATUS "  - AIRINV_INCLUDE_DIRS ........ : ${AIRINV_INCLUDE_DIRS}")
-  endif (Airinv_FOUND)
+  endif (AirInv_FOUND)
 endmacro (display_airinv)
+
+# AvlCal
+macro (display_avlcal)
+  if (AvlCal_FOUND)
+    message (STATUS)
+    message (STATUS "* AvlCal:")
+    message (STATUS "  - AVLCAL_VERSION ............. : ${AVLCAL_VERSION}")
+    message (STATUS "  - AVLCAL_BINARY_DIRS ......... : ${AVLCAL_BINARY_DIRS}")
+    message (STATUS "  - AVLCAL_EXECUTABLES ......... : ${AVLCAL_EXECUTABLES}")
+    message (STATUS "  - AVLCAL_LIBRARY_DIRS ........ : ${AVLCAL_LIBRARY_DIRS}")
+    message (STATUS "  - AVLCAL_LIBRARIES ........... : ${AVLCAL_LIBRARIES}")
+    message (STATUS "  - AVLCAL_INCLUDE_DIRS ........ : ${AVLCAL_INCLUDE_DIRS}")
+  endif (AvlCal_FOUND)
+endmacro (display_avlcal)
+
+# SimFQT
+macro (display_simfqt)
+  if (SimFQT_FOUND)
+    message (STATUS)
+    message (STATUS "* SimFQT:")
+    message (STATUS "  - SIMFQT_VERSION ............. : ${SIMFQT_VERSION}")
+    message (STATUS "  - SIMFQT_BINARY_DIRS ......... : ${SIMFQT_BINARY_DIRS}")
+    message (STATUS "  - SIMFQT_EXECUTABLES ......... : ${SIMFQT_EXECUTABLES}")
+    message (STATUS "  - SIMFQT_LIBRARY_DIRS ........ : ${SIMFQT_LIBRARY_DIRS}")
+    message (STATUS "  - SIMFQT_LIBRARIES ........... : ${SIMFQT_LIBRARIES}")
+    message (STATUS "  - SIMFQT_INCLUDE_DIRS ........ : ${SIMFQT_INCLUDE_DIRS}")
+  endif (SimFQT_FOUND)
+endmacro (display_simfqt)
+
+# SimLFS
+macro (display_simlfs)
+  if (SimLFS_FOUND)
+    message (STATUS)
+    message (STATUS "* SimLFS:")
+    message (STATUS "  - SIMLFS_VERSION ............. : ${SIMLFS_VERSION}")
+    message (STATUS "  - SIMLFS_BINARY_DIRS ......... : ${SIMLFS_BINARY_DIRS}")
+    message (STATUS "  - SIMLFS_EXECUTABLES ......... : ${SIMLFS_EXECUTABLES}")
+    message (STATUS "  - SIMLFS_LIBRARY_DIRS ........ : ${SIMLFS_LIBRARY_DIRS}")
+    message (STATUS "  - SIMLFS_LIBRARIES ........... : ${SIMLFS_LIBRARIES}")
+    message (STATUS "  - SIMLFS_INCLUDE_DIRS ........ : ${SIMLFS_INCLUDE_DIRS}")
+  endif (SimLFS_FOUND)
+endmacro (display_simlfs)
+
+# SimCRS
+macro (display_simcrs)
+  if (SimCRS_FOUND)
+    message (STATUS)
+    message (STATUS "* SimCRS:")
+    message (STATUS "  - SIMCRS_VERSION ............. : ${SIMCRS_VERSION}")
+    message (STATUS "  - SIMCRS_BINARY_DIRS ......... : ${SIMCRS_BINARY_DIRS}")
+    message (STATUS "  - SIMCRS_EXECUTABLES ......... : ${SIMCRS_EXECUTABLES}")
+    message (STATUS "  - SIMCRS_LIBRARY_DIRS ........ : ${SIMCRS_LIBRARY_DIRS}")
+    message (STATUS "  - SIMCRS_LIBRARIES ........... : ${SIMCRS_LIBRARIES}")
+    message (STATUS "  - SIMCRS_INCLUDE_DIRS ........ : ${SIMCRS_INCLUDE_DIRS}")
+  endif (SimCRS_FOUND)
+endmacro (display_simcrs)

 ##
 macro (display_status_all_modules)
@@ -1793,9 +2161,17 @@
   display_mysql ()
   display_soci ()
   display_stdair ()
+  display_sevmgr ()
+  display_trademgen ()
+  display_travelccm ()
+  display_airsched ()
   display_airrac ()
   display_rmol ()
   display_airinv ()
+  display_avlcal ()
+  display_simfqt ()
+  display_simlfs ()
+  display_simcrs ()
   #
   message (STATUS)
   message (STATUS "Change a value with: cmake -D<Variable>=<Value>" )


xpro::rapidjson INTERFACE library

xpro::rapidjson INTERFACE library

* with INTERFACE_INCLUDE_DIRECTORIES property set
* issue https://github.com/smanders/externpro/issues/257

--- projects/use/usexp-rapidjson-config.cmake
+++ projects/use/usexp-rapidjson-config.cmake
@@ -10,6 +10,14 @@
 set(verDir /${prj}_@VER@)
 unset(${PRJ}_INCLUDE_DIR CACHE)
 find_path(${PRJ}_INCLUDE_DIR rapidjson/rapidjson.h PATHS ${XP_ROOTDIR}/include${verDir} NO_DEFAULT_PATH)
+if(NOT TARGET xpro::rapidjson)
+  add_library(xpro::rapidjson INTERFACE IMPORTED)
+  if(${PRJ}_INCLUDE_DIR)
+    set_target_properties(xpro::rapidjson PROPERTIES
+      INTERFACE_INCLUDE_DIRECTORIES "${${PRJ}_INCLUDE_DIR}"
+      )
+  endif()
+endif()
 set(reqVars ${PRJ}_VER ${PRJ}_INCLUDE_DIR)
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(${prj} REQUIRED_VARS ${reqVars})


these dirs must exist

these dirs must exist

--- toplevel.cmake
+++ toplevel.cmake
@@ -7,6 +7,9 @@

 set(CATKIN YES)
 list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/cmake)
+
+file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

 if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/catkin)
   message(STATUS "+++ catkin")


fbcode_builder: cmake: propagate thrift include dependencies correctly

Summary:
Update `add_thrift_cpp2_library()` to pass in the correct `-I` flags when
invoking the thrift compiler so that it can find all of the other thrift files
that this library depends on.

D16062657 was a previous attempt to do this, but suffered from a few problems:
- It required all dependencies to be defined before
  `add_thrift_cpp2_library()` was called.  This requires users to carefully
  order their CMake files and subdirectory include ordering.
- It only handled one level of dependencies, and did not propagate include
  paths for deeper dependencies.
- It set the include path for dependencies to the source directory path where
  the dependency was originally built, rather than the directory where the
  thrift file for that dependency would be installed.

This change does require CMake 3.8+.  Previous versions of CMake do not
support using generator expressions to generate multiple arguments for a
custom command.

Reviewed By: strager

Differential Revision: D17005381

fbshipit-source-id: 31190beba94b4d1010445375a5e2791450230f7d

--- build/fbcode_builder/CMake/ThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/ThriftCppLibrary.cmake
@@ -17,13 +17,24 @@
 #   The sub-directory where generated headers will be installed.
 #   Defaults to "include" if not specified.  The caller must still call
 #   install() to install the thrift library if desired.
+# - THRIFT_INCLUDE_DIR <path>
+#   The sub-directory where generated headers will be installed.
+#   Defaults to "${INCLUDE_DIR}/thrift-files" if not specified.
+#   The caller must still call install() to install the thrift library if
+#   desired.
 function(add_thrift_cpp2_library LIB_NAME THRIFT_FILE)
   # Parse the arguments
   set(one_value_args INCLUDE_DIR)
-  set(multi_value_args SERVICES DEPENDS OPTIONS)
+  set(multi_value_args SERVICES DEPENDS OPTIONS THRIFT_INCLUDE_DIR)
   fb_cmake_parse_args(
     ARG "" "${one_value_args}" "${multi_value_args}" "${ARGN}"
   )
+  if(NOT DEFINED ARG_INCLUDE_DIR)
+    set(ARG_INCLUDE_DIR "include")
+  endif()
+  if(NOT DEFINED ARG_THRIFT_INCLUDE_DIR)
+    set(ARG_THRIFT_INCLUDE_DIR "${ARG_INCLUDE_DIR}/thrift-files")
+  endif()

   get_filename_component(base ${THRIFT_FILE} NAME_WE)
   get_filename_component(
@@ -39,9 +50,6 @@
     "${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE}"
   )
   get_filename_component(include_prefix ${include_prefix} DIRECTORY)
-  if(NOT DEFINED ARG_INCLUDE_DIR)
-    set(ARG_INCLUDE_DIR "include")
-  endif()

   if (NOT "${include_prefix}" STREQUAL "")
     list(APPEND ARG_OPTIONS "include_prefix=${include_prefix}")
@@ -78,22 +86,21 @@
     )
   endforeach()

-  list(APPEND thrift_include_options -I "${CMAKE_SOURCE_DIR}")
-  foreach(depends IN LISTS ARG_DEPENDS)
-    get_property(thrift_include_directory
-      TARGET ${depends}
-      PROPERTY THRIFT_INCLUDE_DIRECTORY)
-
-    if (thrift_include_directory STREQUAL "")
-      message(STATUS "No thrift dependency found for ${depends}")
-    else()
-      list(
-        APPEND thrift_include_options
-        -I "${thrift_include_directory}"
-      )
-    endif()
-  endforeach()
-
+  # This generator expression gets the list of include directories required
+  # for all of our dependencies.
+  # It requires using COMMAND_EXPAND_LISTS in the add_custom_command() call
+  # below.  COMMAND_EXPAND_LISTS is only available in CMake 3.8+
+  # If we really had to support older versions of CMake we would probably need
+  # to use a wrapper script around the thrift compiler that could take the
+  # include list as a single argument and split it up before invoking the
+  # thrift compiler.
+  if (NOT POLICY CMP0067)
+    message(FATAL_ERROR "add_thrift_cpp2_library() requires CMake 3.8+")
+  endif()
+  set(
+    thrift_include_options
+    "-I;$<JOIN:$<TARGET_PROPERTY:${LIB_NAME}.thrift_includes,INTERFACE_INCLUDE_DIRECTORIES>,;-I;>"
+  )
   file(
     GLOB_RECURSE THRIFT_TEMPLATE_FILES
     FOLLOW_SYMLINKS "${FBTHRIFT_TEMPLATES_DIR}/cpp2/*.mustache"
@@ -104,6 +111,7 @@
     OUTPUT
       ${generated_headers}
       ${generated_sources}
+    COMMAND_EXPAND_LISTS
     COMMAND
       "${CMAKE_COMMAND}" -E make_directory "${output_dir}"
     COMMAND
@@ -111,7 +119,7 @@
       --strict
       --templates "${FBTHRIFT_TEMPLATES_DIR}"
       --gen "mstch_cpp2:${GEN_ARG_STR}"
-      ${thrift_include_options}
+      "${thrift_include_options}"
       -o "${output_dir}"
       "${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE}"
     WORKING_DIRECTORY
@@ -159,11 +167,27 @@
     PROPERTY PUBLIC_HEADER ${generated_headers}
   )

+  # Define a dummy interface library to help propagate the thrift include
+  # directories between dependencies.
+  add_library("${LIB_NAME}.thrift_includes" INTERFACE)
+  target_include_directories(
+    "${LIB_NAME}.thrift_includes"
+    INTERFACE
+      "$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>"
+      "$<INSTALL_INTERFACE:${ARG_THRIFT_INCLUDE_DIR}>"
+  )
+  foreach(dep IN LISTS ARG_DEPENDS)
+    target_link_libraries(
+      "${LIB_NAME}.thrift_includes"
+      INTERFACE "${dep}.thrift_includes"
+    )
+  endforeach()
+
   set_target_properties(
     "${LIB_NAME}"
     PROPERTIES
-      EXPORT_PROPERTIES "THRIFT_INCLUDE_DIRECTORY"
-      THRIFT_INCLUDE_DIRECTORY "${CMAKE_SOURCE_DIR}"
+      EXPORT_PROPERTIES "THRIFT_INSTALL_DIR"
+      THRIFT_INSTALL_DIR "${ARG_THRIFT_INCLUDE_DIR}/${include_prefix}"
       HEADER_INSTALL_DIR "${ARG_INCLUDE_DIR}/${include_prefix}/gen-cpp2"
   )
 endfunction()


[3388126] Fix Boost license file location in CMake

--HG--
branch : v1-7

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -194,7 +194,7 @@
 		PATTERN "xpressive" EXCLUDE
 	  )
 	  # License
-	  install(FILES "${Boost_INCLUDE_DIR}/LICENSE_1_0.txt" DESTINATION "boost_${Boost_LIB_VERSION}")
+	  install(FILES "${Boost_INCLUDE_DIR}/../LICENSE_1_0.txt" DESTINATION "boost_${Boost_LIB_VERSION}")
 	  # libraries
 	  if (Boost_THREAD_FOUND)
 	    install(FILES ${Boost_THREAD_LIBRARY_DEBUG} DESTINATION "boost_${Boost_LIB_VERSION}/lib" CONFIGURATIONS Debug)


Setting CMP0054 policy to NEW. This allows to use the string "SHARED" without interpreting it as a variable.

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -11,6 +11,10 @@
 # - The functions/macros defined in this file may depend on Google
 #   Test and Google Mock's option() definitions, and thus must be
 #   called *after* the options have been defined.
+
+if (POLICY CMP0054)
+  cmake_policy(SET CMP0054 NEW)
+endif (POLICY CMP0054)

 # Tweaks CMake's default compiler/linker settings to suit Google Test's needs.
 #


Might just be lib on the docker image...

We should probably just get the GNU install dirs package to tell us, but
I want to see if things package on the dashboard...

Signed-off-by: Marcus D. Hanwell <cf7042e2e8eee958b5bcde1ae2cbefef82efc184@kitware.com>

--- projects/unix/tomviz.bundle.cmake
+++ projects/unix/tomviz.bundle.cmake
@@ -2,7 +2,7 @@
 include(CPack)

 # install all ParaView's shared libraries.
-install(DIRECTORY "${install_location}/lib64"
+install(DIRECTORY "${install_location}/lib"
   DESTINATION "lib"
   USE_SOURCE_PERMISSIONS
   COMPONENT superbuild)


Install the Python libraries

Install the Python libraries

OK, I see what is happening now, getting lib/lib is not ideal, we need
to get the Python libraries installed in the correct location. It looks
like the correct ParaView libraries are brought in with dependency
scanning in this case at least.

Signed-off-by: Marcus D. Hanwell <cf7042e2e8eee958b5bcde1ae2cbefef82efc184@kitware.com>

--- projects/unix/tomviz.bundle.cmake
+++ projects/unix/tomviz.bundle.cmake
@@ -1,8 +1,8 @@
 include(tomviz.bundle.common)
 include(CPack)

-# Install all ParaView's shared libraries.
-install(DIRECTORY "${install_location}/lib"
+# Install Python libratries and includes.
+install(DIRECTORY "${install_location}/lib/python3.6"
   DESTINATION "lib"
   USE_SOURCE_PERMISSIONS
   COMPONENT superbuild)


Documentation for CommonPackage

Documentation for CommonPackage

--- CommonPackage.cmake
+++ CommonPackage.cmake
@@ -1,3 +1,9 @@
+# Copyright (c) 2014 Stefan.Eilemann@epfl.ch
+
+# Provides common_package(Name args) which improves find_package
+# First invokes find_package with all the given arguments, and then falls back
+# to using pkg_config if available. The pkg_config path does only implement
+# the REQUIRED and VERSION find_package arguments (e.g. no COMPONENTS)

 find_package(PkgConfig)
 set(ENV{PKG_CONFIG_PATH}


build: Link dl if necessary (still brittle).

--- cmake/Modules/FindLua.cmake
+++ cmake/Modules/FindLua.cmake
@@ -125,67 +125,69 @@
 set_lua_version_vars()

 find_path(LUA_INCLUDE_DIR lua.h
-  HINTS
-    ENV LUA_DIR
-  PATH_SUFFIXES ${_lua_include_subdirs} include/lua include
-  PATHS
-  ~/Library/Frameworks
-  /Library/Frameworks
-  /sw # Fink
-  /opt/local # DarwinPorts
-  /opt/csw # Blastwave
-  /opt
+    HINTS
+        ENV LUA_DIR
+    PATH_SUFFIXES ${_lua_include_subdirs} include/lua include
+    PATHS
+    ~/Library/Frameworks
+    /Library/Frameworks
+    /sw # Fink
+    /opt/local # DarwinPorts
+    /opt/csw # Blastwave
+    /opt
 )
 unset(_lua_include_subdirs)

 find_library(_LUA_LIBRARY_RELEASE
-  NAMES ${_lua_library_names} lua
-  HINTS
-    ENV LUA_DIR
-  PATH_SUFFIXES lib
-  PATHS
-  ~/Library/Frameworks
-  /Library/Frameworks
-  /sw
-  /opt/local
-  /opt/csw
-  /opt
+    NAMES ${_lua_library_names} lua
+    HINTS
+        ENV LUA_DIR
+    PATH_SUFFIXES lib
+    PATHS
+    ~/Library/Frameworks
+    /Library/Frameworks
+    /sw
+    /opt/local
+    /opt/csw
+    /opt
 )

 find_library(_LUA_LIBRARY_DEBUG
-  NAMES ${_lua_library_names_debug} lua-d
-  HINTS
-    ENV LUA_DIR
-  PATH_SUFFIXES lib
-  PATHS
-  ~/Library/Frameworks
-  /Library/Frameworks
-  /sw
-  /opt/local
-  /opt/csw
-  /opt
+    NAMES ${_lua_library_names_debug} lua-d
+    HINTS
+        ENV LUA_DIR
+    PATH_SUFFIXES lib
+    PATHS
+    ~/Library/Frameworks
+    /Library/Frameworks
+    /sw
+    /opt/local
+    /opt/csw
+    /opt
 )

 unset(_lua_library_names)
 unset(_lua_library_names_debug)

 IF(_LUA_LIBRARY_RELEASE AND _LUA_LIBRARY_DEBUG)
-  SET(LUA_LIBRARY optimized ${_LUA_LIBRARY_RELEASE}
-                  debug     ${_LUA_LIBRARY_DEBUG})
+    SET(LUA_LIBRARY optimized ${_LUA_LIBRARY_RELEASE}
+                    debug     ${_LUA_LIBRARY_DEBUG})
 ELSEIF(_LUA_LIBRARY_RELEASE)
-  SET(LUA_LIBRARY ${_LUA_LIBRARY_RELEASE})
+    SET(LUA_LIBRARY ${_LUA_LIBRARY_RELEASE})
 ELSE()
-  SET(LUA_LIBRARY ${_LUA_LIBRARY_DEBUG})
+    SET(LUA_LIBRARY ${_LUA_LIBRARY_DEBUG})
 ENDIF()

 if (LUA_LIBRARY)
+    set(LUA_LIBRARIES "${LUA_LIBRARY}")
     # include the math library for Unix
     if (UNIX AND NOT APPLE AND NOT BEOS)
         find_library(LUA_MATH_LIBRARY m)
-        set(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}")
+        list(APPEND LUA_LIBRARIES ${LUA_MATH_LIBRARY})
+        if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
+            list(APPEND LUA_LIBRARIES ${CMAKE_DL_LIBS})
+        endif()
     # For Windows and Mac, don't need to explicitly include the math library
-    else ()
-        set(LUA_LIBRARIES "${LUA_LIBRARY}")
     endif ()
 endif ()