Preserve system flag for includes when generating PCH

If the compiler understands system include paths it exposes the
necessary flag within the CMAKE_INCLUDE_SYSTEM_FLAG_${LANG}
variable.

System include paths for targets could be queried via the target
property INTERFACE_SYSTEM_INCLUDE_DIRECTORIES. Here the system
include paths are listed in addition of being available in
the INTERFACE_INCLUDE_DIRECTORIES property.

Note: Currently there is no way to query the SYSTEM flag for
directory include properties.

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -434,8 +434,9 @@
 	set (${_flagsVar} ${_compileFlags} PARENT_SCOPE)
 endfunction()

-function (cotire_get_target_include_directories _config _language _targetSourceDir _targetBinaryDir _target _includeDirsVar)
+function (cotire_get_target_include_directories _config _language _targetSourceDir _targetBinaryDir _target _includeDirsVar _systemIncludeDirsVar)
 	set (_includeDirs "")
+	set (_systemIncludeDirs "")
 	# default include dirs
 	if (CMAKE_INCLUDE_CURRENT_DIR)
 		list (APPEND _includeDirs "${_targetBinaryDir}")
@@ -455,12 +456,21 @@
 		if (_targetDirs)
 			list (APPEND _dirs ${_targetDirs})
 		endif()
+		get_target_property(_targetDirs ${_target} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES)
+		if (_targetDirs)
+			list (APPEND _systemIncludeDirs ${_targetDirs})
+		endif()
+
 		# interface include directories from linked library targets
 		cotire_get_target_link_libraries_for_usage_requirements(${_target} _linkLibraries)
 		foreach (_library ${_linkLibraries})
 			get_target_property(_targetDirs ${_library} INTERFACE_INCLUDE_DIRECTORIES)
 			if (_targetDirs)
 				list (APPEND _dirs ${_targetDirs})
+			endif()
+			get_target_property(_targetDirs ${_library} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES)
+			if (_targetDirs)
+				list (APPEND _systemIncludeDirs ${_targetDirs})
 			endif()
 		endforeach()
 	endif()
@@ -487,6 +497,7 @@
 		endif()
 	endforeach()
 	list (REMOVE_DUPLICATES _includeDirs)
+	list (REMOVE_DUPLICATES _systemIncludeDirs)
 	if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES)
 		list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES})
 	endif()
@@ -494,6 +505,10 @@
 		message (STATUS "Target ${_target} include dirs ${_includeDirs}")
 	endif()
 	set (${_includeDirsVar} ${_includeDirs} PARENT_SCOPE)
+	if (COTIRE_DEBUG AND _systemIncludeDirs)
+		message (STATUS "Target ${_target} system include dirs ${_systemIncludeDirs}")
+	endif()
+	set (${_systemIncludeDirsVar} ${_systemIncludeDirs} PARENT_SCOPE)
 endfunction()

 macro (cotire_make_C_identifier _identifierVar _str)
@@ -726,13 +741,18 @@
 	endforeach()
 endmacro()

-macro (cotire_add_includes_to_cmd _cmdVar _language)
-	foreach (_include ${ARGN})
+macro (cotire_add_includes_to_cmd _cmdVar _language _includeSystemFlag _includesVar _systemIncludesVar)
+	foreach (_include ${${_includesVar}})
 		if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
 			file (TO_NATIVE_PATH "${_include}" _include)
 			list (APPEND ${_cmdVar} "/I${_include}")
 		else()
-			list (APPEND ${_cmdVar} "-I${_include}")
+			list(FIND ${_systemIncludesVar} ${_include} _index)
+			if(_index GREATER -1 AND NOT "${_includeSystemFlag}" STREQUAL "")
+			        list (APPEND ${_cmdVar} "${_includeSystemFlag} ${_include}")
+			else()
+				list (APPEND ${_cmdVar} "-I${_include}")
+			endif()
 		endif()
 	endforeach()
 endmacro()
@@ -993,8 +1013,8 @@

 function (cotire_scan_includes _includesVar)
 	set(_options "")
-	set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_VERSION LANGUAGE UNPARSED_LINES)
-	set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS)
+	set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_VERSION INCLUDE_SYSTEM_FLAG LANGUAGE UNPARSED_LINES)
+	set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS)
 	cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
 	set (_sourceFiles ${_option_UNPARSED_ARGUMENTS})
 	if (NOT _option_LANGUAGE)
@@ -1007,7 +1027,7 @@
 	cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}")
 	cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS})
 	cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS})
-	cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_INCLUDE_DIRECTORIES})
+	cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" "${_option_INCLUDE_SYSTEM_FLAG}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES)
 	cotire_add_frameworks_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_INCLUDE_DIRECTORIES})
 	cotire_add_makedep_flags("${_option_LANGUAGE}" "${_option_COMPILER_ID}" "${_option_COMPILER_VERSION}" _cmd)
 	# only consider existing source files for scanning
@@ -1185,9 +1205,9 @@

 function (cotire_generate_prefix_header _prefixFile)
 	set(_options "")
-	set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION)
+	set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION INCLUDE_SYSTEM_FLAG)
 	set(_multiValueArgs DEPENDS COMPILE_DEFINITIONS COMPILE_FLAGS
-		INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS)
+		INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS)
 	cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
 	if (_option_DEPENDS)
 		cotire_check_file_up_to_date(_prefixFileIsUpToDate "${_prefixFile}" ${_option_DEPENDS})
@@ -1219,6 +1239,8 @@
 		COMPILE_DEFINITIONS ${_option_COMPILE_DEFINITIONS}
 		COMPILE_FLAGS ${_option_COMPILE_FLAGS}
 		INCLUDE_DIRECTORIES ${_option_INCLUDE_DIRECTORIES}
+		INCLUDE_SYSTEM_FLAG ${_option_INCLUDE_SYSTEM_FLAG}
+		SYSTEM_INCLUDE_DIRECTORIES ${_option_SYSTEM_INCLUDE_DIRECTORIES}
 		IGNORE_PATH ${_option_IGNORE_PATH}
 		INCLUDE_PATH ${_option_INCLUDE_PATH}
 		IGNORE_EXTENSIONS ${_option_IGNORE_EXTENSIONS}
@@ -1555,8 +1577,8 @@

 function (cotire_precompile_prefix_header _prefixFile _pchFile _hostFile)
 	set(_options "")
-	set(_oneValueArgs COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION LANGUAGE)
-	set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES)
+	set(_oneValueArgs COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION INCLUDE_SYSTEM_FLAG LANGUAGE)
+	set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES SYS)
 	cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
 	if (NOT _option_LANGUAGE)
 		set (_option_LANGUAGE "CXX")
@@ -1567,7 +1589,7 @@
 	cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}")
 	cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS})
 	cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS})
-	cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_INCLUDE_DIRECTORIES})
+	cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" "${_option_INCLUDE_SYSTEM_FLAG}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES)
 	cotire_add_frameworks_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_INCLUDE_DIRECTORIES})
 	cotire_add_pch_compilation_flags(
 		"${_option_LANGUAGE}" "${_option_COMPILER_ID}" "${_option_COMPILER_VERSION}"
@@ -1890,11 +1912,12 @@
 	get_target_property(COTIRE_TARGET_MAXIMUM_NUMBER_OF_INCLUDES ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES)
 	cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_PRE_UNDEFS COTIRE_TARGET_SOURCES_PRE_UNDEFS ${COTIRE_TARGET_SOURCES})
 	cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_POST_UNDEFS COTIRE_TARGET_SOURCES_POST_UNDEFS ${COTIRE_TARGET_SOURCES})
+	set (COTIRE_INCLUDE_SYSTEM_FLAG ${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}})
 	set (COTIRE_TARGET_CONFIGURATION_TYPES "${_configurations}")
 	foreach (_config ${_configurations})
 		string (TOUPPER "${_config}" _upperConfig)
 		cotire_get_target_include_directories(
-			"${_config}" "${_language}" "${_targetSourceDir}" "${_targetBinaryDir}" "${_target}" COTIRE_TARGET_INCLUDE_DIRECTORIES_${_upperConfig})
+			"${_config}" "${_language}" "${_targetSourceDir}" "${_targetBinaryDir}" "${_target}" COTIRE_TARGET_INCLUDE_DIRECTORIES_${_upperConfig} COTIRE_TARGET_SYSTEM_INCLUDE_DIRECTORIES_${_upperConfig})
 		cotire_get_target_compile_definitions(
 			"${_config}" "${_language}" "${_targetSourceDir}" "${_target}" COTIRE_TARGET_COMPILE_DEFINITIONS_${_upperConfig})
 		cotire_get_target_compiler_flags(
@@ -2959,6 +2982,7 @@
 	endif()
 	string (TOUPPER "${COTIRE_BUILD_TYPE}" _upperConfig)
 	set (_includeDirs ${COTIRE_TARGET_INCLUDE_DIRECTORIES_${_upperConfig}})
+	set (_systemIncludeDirs ${COTIRE_TARGET_SYSTEM_INCLUDE_DIRECTORIES_${_upperConfig}})
 	set (_compileDefinitions ${COTIRE_TARGET_COMPILE_DEFINITIONS_${_upperConfig}})
 	set (_compileFlags ${COTIRE_TARGET_COMPILE_FLAGS_${_upperConfig}})
 	# check if target has been cotired for actual build type COTIRE_BUILD_TYPE
@@ -3011,7 +3035,9 @@
 			IGNORE_PATH "${COTIRE_TARGET_IGNORE_PATH};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH}"
 			INCLUDE_PATH ${COTIRE_TARGET_INCLUDE_PATH}
 			IGNORE_EXTENSIONS "${CMAKE_${COTIRE_TARGET_LANGUAGE}_SOURCE_FILE_EXTENSIONS};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS}"
+			INCLUDE_SYSTEM_FLAG "${COTIRE_INCLUDE_SYSTEM_FLAG}"
 			INCLUDE_DIRECTORIES ${_includeDirs}
+			SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs}
 			COMPILE_DEFINITIONS ${_compileDefinitions}
 			COMPILE_FLAGS ${_compileFlags})

@@ -3031,7 +3057,9 @@
 			COMPILER_ID "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}"
 			COMPILER_VERSION "${COTIRE_${COTIRE_TARGET_LANGUAGE}_COMPILER_VERSION}"
 			LANGUAGE "${COTIRE_TARGET_LANGUAGE}"
+			INCLUDE_SYSTEM_FLAG "${COTIRE_INCLUDE_SYSTEM_FLAG}"
 			INCLUDE_DIRECTORIES ${_includeDirs}
+			SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs}
 			COMPILE_DEFINITIONS ${_compileDefinitions}
 			COMPILE_FLAGS ${_compileFlags})


fix ctags detection on freebsd

fix ctags detection on freebsd

--- cmake/FindCtags.cmake
+++ cmake/FindCtags.cmake
@@ -9,7 +9,7 @@
 #   endif()

 find_program( CTAGS_EXECUTABLE
-    NAMES ctags
+    NAMES ctags exctags
     DOC "ctags executable"
 )


Mark variables PYTHON_NUMPY_INCLUDE_DIR NUMPY_NPYMATH_LIBRARY as advanced.

--- cmake/FindNumPy.cmake
+++ cmake/FindNumPy.cmake
@@ -61,3 +61,5 @@
   set(NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_INCLUDE_DIR})
   set(NUMPY_LIBRARIES ${NUMPY_NPYMATH_LIBRARY})
 endif()
+
+mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIR NUMPY_NPYMATH_LIBRARY)


If building with LLVM_ENABLE_DOXYGEN and using CMake then
abort while configuring if doxygen could not be found. This
is desirable because if the build is going to fail then it should
fail as early as possible.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -486,7 +486,7 @@

 if (LLVM_ENABLE_DOXYGEN)
   message(STATUS "Doxygen enabled.")
-  find_package(Doxygen)
+  find_package(Doxygen REQUIRED)

   if (DOXYGEN_FOUND)
     # If we find doxygen and we want to enable doxygen by default create a


Add carriage return at the end of the file.

--- rpi/cmaketc/Toolchain-raspberrypi-arm.cmake
+++ rpi/cmaketc/Toolchain-raspberrypi-arm.cmake
@@ -23,4 +23,4 @@

 # for libraries and headers in the target directories
 SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)+SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


FogBugz #10429: Update cmake files across sub-projects

--- common.cmake
+++ common.cmake
@@ -51,8 +51,8 @@

 include_directories( include  )

-file(GLOB PROJECT_INCLUDES "include/*.h" "include/*.hpp" "include/*/*.h" "include/*/*.hpp")
-file(GLOB PROJECT_SRC "src/*.c" "src/*.cpp" "src/*/*.c" "src/*/*.cpp" )
+file(GLOB PROJECT_INCLUDES "include/*.h" "include/*.hpp" "include/*/*.h" "include/*/*.hpp" "include/*/*/*.h" "include/*/*/*.hpp")
+file(GLOB PROJECT_SRC "src/*.c" "src/*.cpp" "src/*/*.c" "src/*/*.cpp" "src/*/*/*.c" "src/*/*/*.cpp")

 add_library (${PROJECT} ${PROJECT_SRC} ${PROJECT_INCLUDES})


remove c++11 requirement

remove c++11 requirement

--- common.cmake
+++ common.cmake
@@ -21,35 +21,6 @@
         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
     endif()
 endif()
-
-# Compiler-specific C++11 activation.
-if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-    set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
-    set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
-    set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
-    set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
-
-    execute_process(
-	COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
-    if (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
-	message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.7 or greater.")
-    endif ()
-elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
-
-    set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
-    set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
-    set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
-    set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
-
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
-elseif(${CMAKE_MAKE_PROGRAM} MATCHES "(msdev|devenv|nmake|MSBuild)")
-    add_definitions("/W2")
-else ()
-    message(FATAL_ERROR "Your C++ compiler does not support C++11.")
-endif ()
-

 if(TODO MATCHES "ON")
    add_definitions("-DTODO=1")


Squashed 'cmake/yacma/' changes from dfd29ed..c46f016

c46f016 A YACMA workaround.

git-subtree-dir: cmake/yacma
git-subtree-split: c46f016226ecd0aaecf3ceca19448293e99358e9

--- YACMACompilerLinkerSettings.cmake
+++ YACMACompilerLinkerSettings.cmake
@@ -100,7 +100,7 @@
     endif()

     # Common configuration for GCC, clang and Intel.
-    if ((YACMA_COMPILER_IS_CLANGXX AND NOT YACMA_COMPILER_IS_MSVC) OR YACMA_COMPILER_IS_INTELXX OR YACMA_COMPILER_IS_GNUCXX)
+    if((YACMA_COMPILER_IS_CLANGXX AND NOT YACMA_COMPILER_IS_MSVC) OR YACMA_COMPILER_IS_INTELXX OR YACMA_COMPILER_IS_GNUCXX)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wall)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnon-virtual-dtor)
@@ -135,6 +135,14 @@
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wduplicated-branches)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wrestrict)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Waligned-new)
+        if(YACMA_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "5.999")
+            # NOTE: GCC >= 6 seems to be wrongly warning about visibility attributes
+            # in some situations:
+            # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80947
+            # Let's just disable the warning for now.
+            message(STATUS "Activating the '-Wno-attributes' workaround for GCC >= 6.")
+            _YACMA_CHECK_ENABLE_CXX_FLAG(-Wno-attributes)
+        endif()
     endif()

     # MSVC setup.


ENH: add warning for openCV versions

ENH: add warning for openCV versions

--- Modules/ThirdParty/OpenCV/otb-module-init.cmake
+++ Modules/ThirdParty/OpenCV/otb-module-init.cmake
@@ -1,2 +1,7 @@
 find_package ( OpenCV REQUIRED )
 mark_as_advanced( OpenCV_DIR )
+
+if("${OpenCV_VERSION}" VERSION_LESS "2.4.0")
+  message(WARNING "The OpenCV version detected (${OpenCV_VERSION}) is older than 2.4.0, "
+    "it may not be fully compatible with OTB")
+endif()


fix the version of remus

fix the version of remus

--- superbuild/versions.cmake
+++ superbuild/versions.cmake
@@ -189,7 +189,7 @@

 add_revision(remus
   GIT_REPOSITORY http://public.kitware.com/Remus.git
-  GIT_TAG master
+  GIT_TAG 6b382bd4df55585a96adfae9dd9d6e7198a25b23
   )

 add_revision(kml


ENH: Enable registration of the IOOpenSlide module through CMake.

Change-Id: Ia2af2902c91d2b0f51d6d43535d4c483c39de1ed

--- CMake/UseITK.cmake
+++ CMake/UseITK.cmake
@@ -221,7 +221,7 @@
 set(LIST_OF_IMAGEIO_FORMATS
     Nifti Nrrd Gipl HDF5 JPEG GDCM BMP LSM PNG TIFF VTK Stimulate BioRad Meta MRC GE4 GE5
     MINC
-    MGH SCIFIO FDF
+    MGH SCIFIO FDF OpenSlide
     PhilipsREC
     )

@@ -237,6 +237,7 @@
 set(Gipl_module_name ITKIOGIPL)

 set(MGH_module_name MGHIO)
+set(OpenSlide_module_name IOOpenSlide)

 set(GE4_module_name ITKIOGE)
 set(GE5_module_name ITKIOGE)


fixed Qt5 support for demos

fixed Qt5 support for demos

--- test/Demos/demoProject.cmake
+++ test/Demos/demoProject.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.7)
+cmake_minimum_required(VERSION 3.0.2)

 ############################################
 # It is important to use the root binary directory,
@@ -22,9 +22,24 @@
 ############################################

 # Qt
-find_package( Qt4 4.8.0 COMPONENTS QtCore QtGui QtOpenGL REQUIRED )
-include( ${QT_USE_FILE} )
-add_definitions( ${QT_DEFINITIONS} )
+find_package( Qt5Core QUIET )
+find_package( Qt5Widgets QUIET )
+find_package( Qt5Gui QUIET )
+find_package( Qt5OpenGL QUIET )
+if(Qt5Core_FOUND AND Qt5Widgets_FOUND AND Qt5Gui_FOUND AND Qt5OpenGL_FOUND)
+    set(Qt5_FOUND TRUE)
+    set(QT_LIBRARIES Qt5::Core Qt5::Widgets Qt5::Gui Qt5::OpenGL)
+    include_directories(
+            ${Qt5Core_INCLUDE_DIRS}
+            ${Qt5Widgets_INCLUDE_DIRS}
+            ${Qt5Gui_INCLUDE_DIRS}
+            ${Qt5OpenGL_INCLUDE_DIRS}
+        )
+else()
+    find_package( Qt4 4.8.0 COMPONENTS QtCore QtGui QtOpenGL REQUIRED )
+    include( ${QT_USE_FILE} )
+    add_definitions( ${QT_DEFINITIONS} )
+endif()

 # Boost
 set(Boost_USE_MULTITHREADED ON)
@@ -81,50 +96,56 @@

 if(Boost_FOUND)

-	unset( RESOURCES_RCC )
-	QT4_WRAP_CPP( QOBJECT_HEADERS_MOC ${QOBJECT_HEADERS} )
-	QT4_WRAP_UI( FORMS_HEADERS ${FORMS} )
-	QT4_ADD_RESOURCES( RESOURCES_RCC ${RESOURCES} )
+    unset( RESOURCES_RCC )
+    if(Qt5_FOUND)
+        QT5_WRAP_CPP( QOBJECT_HEADERS_MOC ${QOBJECT_HEADERS} )
+        QT5_WRAP_UI( FORMS_HEADERS ${FORMS} )
+        QT5_ADD_RESOURCES( RESOURCES_RCC ${RESOURCES} )
+    else(Qt5_FOUND)
+        QT4_WRAP_CPP( QOBJECT_HEADERS_MOC ${QOBJECT_HEADERS} )
+        QT4_WRAP_UI( FORMS_HEADERS ${FORMS} )
+        QT4_ADD_RESOURCES( RESOURCES_RCC ${RESOURCES} )
+    endif(Qt5_FOUND)

-	add_definitions(
-			-DNOMINMAX
-			-DBOOST_IOSTREAMS_NO_LIB
-			-D_SCL_SECURE_NO_WARNINGS
-			-DEXPECTED_MAJOR_VERSION=${MAJOR_VERSION}
-			-DEXPECTED_MINOR_VERSION=${MINOR_VERSION}
-			-DEXPECTED_RELEASE_VERSION=${PATCH_VERSION}
-			-DSOURCE_PATH="${CMAKE_CURRENT_SOURCE_DIR}/../.."
-		)
-	remove_definitions( -DCARNAQT_EXPORT )
-
-	add_executable( ${TARGET_NAME} WIN32
-			${SRC}
-			${HEADERS}
-			${QOBJECT_HEADERS}
-			${QOBJECT_HEADERS_MOC}
-			${FORMS_HEADERS}
-			${RESOURCES_RCC}
-		)
-
-	include( "../../../misc/compiler_specific.cmake" )
-
-	target_link_libraries( ${TARGET_NAME}
-			${OPENGL_LIBRARIES}
-			${GLEW_LIBRARIES}
-			${QT_LIBRARIES}
-			${CARNA_LIBRARIES}
-			${Boost_LIBRARIES}
-			optimized	CarnaQt-${FULL_VERSION}
-			debug		CarnaQt-${FULL_VERSION}${CMAKE_DEBUG_POSTFIX}
-		)
-
-	if(MSVC)
-		set_target_properties(
-				${TARGET_NAME} PROPERTIES
-				WIN32_EXECUTABLE YES
-				LINK_FLAGS "/ENTRY:mainCRTStartup"
-			)
-	endif(MSVC)
+    add_definitions(
+            -DNOMINMAX
+            -DBOOST_IOSTREAMS_NO_LIB
+            -D_SCL_SECURE_NO_WARNINGS
+            -DEXPECTED_MAJOR_VERSION=${MAJOR_VERSION}
+            -DEXPECTED_MINOR_VERSION=${MINOR_VERSION}
+            -DEXPECTED_RELEASE_VERSION=${PATCH_VERSION}
+            -DSOURCE_PATH="${CMAKE_CURRENT_SOURCE_DIR}/../.."
+    	)
+    remove_definitions( -DCARNAQT_EXPORT )
+
+    add_executable( ${TARGET_NAME} WIN32
+            ${SRC}
+            ${HEADERS}
+            ${QOBJECT_HEADERS}
+            ${QOBJECT_HEADERS_MOC}
+            ${FORMS_HEADERS}
+            ${RESOURCES_RCC}
+    	)
+
+    include( "../../../misc/compiler_specific.cmake" )
+
+    target_link_libraries( ${TARGET_NAME}
+            ${OPENGL_LIBRARIES}
+            ${GLEW_LIBRARIES}
+            ${QT_LIBRARIES}
+            ${CARNA_LIBRARIES}
+            ${Boost_LIBRARIES}
+            optimized   CarnaQt-${FULL_VERSION}
+            debug       CarnaQt-${FULL_VERSION}${CMAKE_DEBUG_POSTFIX}
+    	)
+
+    if(MSVC)
+        set_target_properties(
+                ${TARGET_NAME} PROPERTIES
+                WIN32_EXECUTABLE YES
+                LINK_FLAGS "/ENTRY:mainCRTStartup"
+    	    )
+    endif(MSVC)

 else(Boost_FOUND)


Fixed CMake warning after upgrading to CMake 2.8.12.

--- Source/CMake/Toolchains/android.toolchain.cmake
+++ Source/CMake/Toolchains/android.toolchain.cmake
@@ -718,7 +718,7 @@
 # verify that target ABI is supported
 list( FIND ANDROID_SUPPORTED_ABIS "${ANDROID_ABI}" __androidAbiIdx )
 if( __androidAbiIdx EQUAL -1 )
- string( REPLACE ";" "\", \"", PRINTABLE_ANDROID_SUPPORTED_ABIS  "${ANDROID_SUPPORTED_ABIS}" )
+ string( REPLACE ";" "\", \"" PRINTABLE_ANDROID_SUPPORTED_ABIS  "${ANDROID_SUPPORTED_ABIS}" )
  message( FATAL_ERROR "Specified ANDROID_ABI = \"${ANDROID_ABI}\" is not supported by this cmake toolchain or your NDK/toolchain.
    Supported values are: \"${PRINTABLE_ANDROID_SUPPORTED_ABIS}\"
    " )


Fixed test name generation for unix platform

--- tools/cmake/ANHLibrary.cmake
+++ tools/cmake/ANHLibrary.cmake
@@ -197,8 +197,7 @@
         ELSE()
             IF(ENABLE_TEST_REPORT)
                 add_test(
-                    NAME all_${name}_tests_${configuration}
-                    CONFIGURATIONS ${configuration}
+                    NAME all_${name}_tests
                     COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}_test "--gtest_output=xml:${PROJECT_BINARY_DIR}/reports/$<CONFIGURATION>/"
                 )
             ENDIF()


PackageConfig: Fix status output

PackageConfig: Fix status output

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -63,8 +63,6 @@

 set(_config_file_body
 # reset before using them
-  "set(_output_type)\n"
-  "set(_out)\n"
   "set(_req)\n"
   "set(_quiet)\n"
   "set(_fail)\n"
@@ -77,6 +75,18 @@
   "\n"
   "@DEPENDENTS@" # add dependent library finding
   "set(${UPPER_PROJECT_NAME}_FIND_FILES ${${UPPER_PROJECT_NAME}_FIND_FILES})\n"
+# (re)set output type after running dependents (which have different settings)
+  "set(_output_type)\n"
+  "set(_out)\n"
+  "if(${PROJECT_NAME}_FIND_REQUIRED)\n"
+  "  set(_output_type FATAL_ERROR)\n"
+  "  set(_out 1)\n"
+  "else()\n"
+  "  set(_output_type STATUS)\n"
+  "  if(NOT ${PROJECT_NAME}_FIND_QUIETLY)\n"
+  "    set(_out 1)\n"
+  "  endif()\n"
+  "endif()\n"
 )

 set(_config_file_standard_find
@@ -268,14 +278,7 @@
 # 1. set the search mode for the dependent projects [ required | optional ]
 set(DEPENDENTS
   "if(${PROJECT_NAME}_FIND_REQUIRED)\n"
-  "  set(_output_type FATAL_ERROR)\n"
-  "  set(_out 1)\n"
   "  set(_req REQUIRED)\n"
-  "else()\n"
-  "  set(_output_type STATUS)\n"
-  "  if(NOT ${PROJECT_NAME}_FIND_QUIETLY)\n"
-  "    set(_out 1)\n"
-  "  endif()\n"
   "endif()\n"
   "if(${PROJECT_NAME}_FIND_QUIETLY)\n"
   "  set(_quiet QUIET)\n"


Fixes in Python autodetection

Fixes in Python autodetection

--- ChoosePython.cmake
+++ ChoosePython.cmake
@@ -39,9 +39,13 @@
 set_property(CACHE USE_PYTHON_VERSION PROPERTY STRINGS 2 3 auto)

 if(NOT PYTHONINTERP_FOUND AND ${USE_PYTHON_VERSION} STREQUAL auto)
-  find_package(PythonInterp 3 QUIET)
+  # Finding Boost first if needed because if the Python3 interpreter is found
+  # first there's no way back.
   if(CHOOSE_PYTHON_REQUIRE_BOOST)
     find_package(Boost COMPONENTS python3 QUIET)
+  endif()
+  if(Boost_FOUND OR NOT CHOOSE_PYTHON_REQUIRE_BOOST)
+    find_package(PythonInterp 3 QUIET)
   endif()

   if(PYTHONINTERP_FOUND AND (NOT CHOOSE_PYTHON_REQUIRE_BOOST OR Boost_FOUND))
@@ -78,6 +82,8 @@
   set(PythonInterp_FIND_VERSION 2)
 endif()

+find_package(PythonInterp) # Regardless of auto-detection, now we need to
+                           # find the interpreter to query the library suffix
 execute_process(COMMAND
   ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1,0,prefix=''))"
   OUTPUT_VARIABLE PYTHON_LIBRARY_SUFFIX OUTPUT_STRIP_TRAILING_WHITESPACE)


make buildsystem properly delegate jobserver to indirect child make calls

--- test/test/testsuite.cmake
+++ test/test/testsuite.cmake
@@ -68,7 +68,7 @@
         COMMAND
             ${test_target}_testrunner
         COMMAND
-            cmake -E touch ${CMAKE_CURRENT_BINARY_DIR}/stamps/${test_target}_testrunner.stamp
+            +env ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/stamps/${test_target}_testrunner.stamp
         WORKING_DIRECTORY
             "${CMAKE_BINARY_DIR}"
         COMMENT
@@ -88,7 +88,7 @@
     add_custom_command(
         TARGET ${register_target}
         PRE_BUILD
-        COMMAND cmake --build . --target ${test_target}
+        COMMAND +env ${CMAKE_COMMAND} --build . --target ${test_target}
         WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
         COMMENT "${kind_name} ${test_target}" VERBATIM
     )
@@ -97,7 +97,7 @@
     add_custom_command(
         TARGET ${register_build_target}
         PRE_BUILD
-        COMMAND cmake --build . --target ${test_target}_testrunner
+        COMMAND +env ${CMAKE_COMMAND} --build . --target ${test_target}_testrunner
         WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
         COMMENT "Building ${kind_name} ${test_target}" VERBATIM
     )
@@ -107,7 +107,7 @@
         add_custom_command(
             TARGET ${test_target}_testrunner
             PRE_BUILD
-            COMMAND cmake --build . --target ${bin_dep}
+            COMMAND +env ${CMAKE_COMMAND} --build . --target ${bin_dep}
             WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
         )
     endforeach(bin_dep)


Redoo find mysql module

Redoo find mysql module

--- FindMySQL.cmake
+++ FindMySQL.cmake
@@ -1,813 +1,48 @@
-# -*- indent-tabs-mode:nil; -*-
-# vim: set expandtab:
+# - Find mysqlclient
+# Find the native MySQL includes and library
 #
-#   Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
-#
-#   The MySQL Connector/C++ is licensed under the terms of the GPLv2
-#   <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
-#   MySQL Connectors. There are special exceptions to the terms and
-#   conditions of the GPLv2 as it is applied to this software, see the
-#   FLOSS License Exception
-#   <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
-#
-#   This program is free software; you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published
-#   by the Free Software Foundation; version 2 of the License.
-#
-#   This program 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 program; if not, write to the Free Software Foundation, Inc.,
-#   51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+#  MYSQL_INCLUDE_DIRS - where to find mysql.h, etc.
+#  MYSQL_LIBRARIES    - List of libraries when using MySQL.
+#  MYSQL_FOUND        - True if MySQL found.

-##########################################################################
+if (NOT DEFINED MSVC)
+  find_path(MYSQL_INCLUDE_DIR
+    NAMES mysql.h
+    PATH_SUFFIXES mysql
+    )

-##########################################################################
-#
-# Configuration variables, all optional, are
-#
-#   MYSQL_DIR         - Set in environment or as parameter to "cmake",
-#                       this is the top directory of the MySQL Server or
-#                       Connector/C install
-#   MYSQL_INCLUDE_DIR - Set in environment or as parameter to "cmake",
-#                       this is the include directory where to find
-#                       the client library
-#   MYSQL_LIB_DIR     - Set in environment or as parameter to "cmake",
-#                       this is the library directory where to find
-#                       the client library
-#   MYSQLCLIENT_STATIC_LINKING
-#                     - Specify that you want static linking, dynamic
-#                       linking is the default
-#   MYSQLCLIENT_NO_THREADS
-#                     - Specify to link against the single threaded
-#                       library, "libmysqlclient". Note that in 5.5
-#                       and up "libmysqlclient" is multithreaded and
-#                       "libmysqlclient_r" just a soft link to it
-#   MYSQL_CONFIG_EXECUTABLE
-#                     - "mysql_config" executable to use
-#   MYSQL_CXX_LINKAGE - Specify that client library needs C++ linking
-#   MYSQL_EXTRA_LIBRARIES
-#                     - Libraries to add to the linkage
-#   MYSQL_CFLAGS      - C compiler flags
-#   MYSQL_CXXFLAGS    - C++ compiler flags
-#   MYSQL_LINK_FLAGS  - User defined extra linkage flags
-#   FINDMYSQL_DEBUG   - Set if want debug output from this script
-#
-# Note that most variables above, if not set by the user they will be
-# set by this include file.
-#
-# In addition, the below CMake variables are set by this include file
-#
-#   MYSQL_VERSION     - Three position numeric version, like 5.6.41
-#   MYSQL_VERSION_ID  - Numeric padded version, 5.13.4 => 51304
-#   MYSQL_NUM_VERSION - Same as MYSQL_VERSION_ID, for compatibility
-#   MYSQL_LIB         - Path to the client library
-#   MYSQL_LIBRARIES   - Library name, might be "-lmysqlclient" while
-#                       MYSQL_LIB is the path to the library
-#   MYSQL_CLIENT_LIBS - Same as MYSQL_LIBRARIES, for compatibility
-#
-# (1) If MYSQL_INCLUDE_DIR or MYSQL_LIB_DIR are given, these are
-#     used and an error is reported if can't be used
-# (2) If MYSQL_CONFIG_EXECUTABLE is given, it is used to get
-#     headers and libraries
-# (3) If MYSQL_DIR is given and "${MYSQL_DIR}/bin/mysql_config" is
-#     found, then same as (2)
-# (4) If MYSQL_DIR is given and no "${MYSQL_DIR}/bin/mysql_config",
-#     search MYSQL_DIR
-#
-# FIXME if we get a "mysql_config" on Windows, things needs to change
-# FIXME rename the VERSION variables above
-# FIXME let MYSQL_VERSION include "-beta" etc?
-# FIXME can mysql_config --version be C/C verson?
-# FIXME if no mysql_config, find version from include/mysql_version.h?
-#       #define MYSQL_SERVER_VERSION       "5.7.5-m15"
-#       #define MYSQL_VERSION_ID            50705
-#       #define LIBMYSQL_VERSION           "6.1.5"
-#       #define LIBMYSQL_VERSION_ID         60105
-# FIXME can MYSQL_LIB_DIR be a list of paths?
-# FIXME is MYSQLCLIENT_LIBS a better name?
-# FIXME cache variables, makes them command line args?
-# FIXME really do include_directories() and link_directories()? Likely
-# FIXME add check that if not static, not picked up .a or mysqlclient.lib
-# FIXME MYSQL_VERSION_ID need to take into account Cluster versions
-#       and Connector/C versions
-# FIXME handle MYSQL_VERSION_ID, LIBMYSQL_VERSION and LIBMYSQL_VERSION_ID?
-#
-##########################################################################
+  find_library(MYSQL_LIBRARY
+    NAMES mysqlclient mysqlclient_r
+    PATH_SUFFIXES mysql
+    )
+else()
+  find_path(MYSQL_INCLUDE_DIR
+    NAMES mysql.h
+    PATH_SUFFIXES include
+    PATHS "$ENV{SystemDrive}/Program Files/mariadb-connector-c/include/mariadb"
+          "$ENV{SystemDrive}/Program Files (x86)/mariadb-connector-c/include/mariadb"
+    )
+  MESSAGE("INCLUDE_DIR: ${MYSQL_INCLUDE_DIR}")

-
-##########################################################################
-#
-# Check the input data
-#
-##########################################################################
-
-# If using both MYSQL_DIR as a cmake argument and set in environment,
-# and not empty strings, they better be the same. Else stop and complain
-
-set(ENV_OR_OPT_VARS
-  MYSQL_DIR
-  MYSQL_INCLUDE_DIR
-  MYSQL_LIB_DIR
-  MYSQL_CFLAGS
-  MYSQL_CXXFLAGS
-  MYSQL_CONFIG_EXECUTABLE
-  MYSQLCLIENT_STATIC_LINKING
-  MYSQLCLIENT_NO_THREADS
-  MYSQL_CXX_LINKAGE
-  MYSQL_EXTRA_LIBRARIES
-  MYSQL_LINK_FLAGS
-)
-
-# Mark the variable names that have values that are paths
-set(ENV_OR_OPT_PATH_VARS
-  MYSQL_DIR
-  MYSQL_INCLUDE_DIR
-  MYSQL_LIB_DIR
-)
-
-foreach(_xvar ${ENV_OR_OPT_VARS})
-
-  if((DEFINED ${_xvar}) AND
-     (DEFINED ENV{${_xvar}}) AND
-     (NOT "${${_xvar}}" STREQUAL "") AND
-     (NOT "$ENV{${_xvar}}" STREQUAL "") AND
-     (NOT "$ENV{${_xvar}}" STREQUAL "${${_xvar}}"))
-    message(FATAL_ERROR "Please pass -D${_xvar}=... as an argument or "
-                        "set ${_xvar} in the environment, but not both")
-  endif()
-
-  # Now we know both are not set, set the CMake variable if needed
-  if((DEFINED ENV{${_xvar}}) AND (NOT "$ENV{${_xvar}}" STREQUAL ""))
-    set(${_xvar} $ENV{${_xvar}})
-  endif()
-
-  # Notmalize the path if the variable is set and is a path
-  if(${_xvar})
-    list(FIND ENV_OR_OPT_PATH_VARS ${_xvar} _index)
-    if (${_index} GREATER -1)
-      file(TO_CMAKE_PATH "${${_xvar}}" ${_xvar})
-    endif()
-  endif()
-
-endforeach()
-
-
-if(MYSQL_CONFIG_EXECUTABLE)
-  set(_mysql_config_set_by_user 1)
-else()
-  # If MYSQL_DIR is set, set MYSQL_CONFIG_EXECUTABLE
-  if((NOT WIN32) AND
-     (DEFINED MYSQL_DIR) AND
-     (EXISTS "${MYSQL_DIR}/bin/mysql_config"))
-    set(MYSQL_CONFIG_EXECUTABLE "${MYSQL_DIR}/bin/mysql_config")
-    set(_mysql_config_in_mysql_dir 1)
-  endif()
+  find_library(MYSQL_LIBRARY
+    NAMES libmariadb
+    PATH_SUFFIXES lib
+    PATHS "$ENV{SystemDrive}/Program Files/mariadb-connector-c/lib/mariadb"
+          "$ENV{SystemDrive}/Program Files (x86)/mariadb-connector-c/lib/mariadb"
+    )
+  MESSAGE("LIB: ${MYSQL_LIBRARY}")
 endif()

-##########################################################################
-#
-# Data and basic settings
-#
-##########################################################################
-
-# Set sub directory to search in
-# dist = for mysql binary distributions
-# build = for custom built tree
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
-  set(_lib_suffix_dist debug)
-  set(_lib_suffix_build Debug)
-else()
-  set(_lib_suffix_dist opt)
-  set(_lib_suffix_build Release)
-  add_definitions(-DDBUG_OFF)   # FIXME what?!
-endif()
-
-set(_exe_fallback_path
-    /usr/bin
-    /usr/local/bin
-    /opt/mysql/mysql/bin
-    /usr/local/mysql/bin
-)
-
-set(_include_fallback_path
-    /usr/include/mysql
-    /usr/local/include/mysql
-    /opt/mysql/mysql/include
-    /opt/mysql/mysql/include/mysql
-    /usr/local/mysql/include
-    /usr/local/mysql/include/mysql
-    $ENV{ProgramFiles}/MySQL/*/include
-    $ENV{SystemDrive}/MySQL/*/include
-)
-
-set(_lib_fallback_path
-    /usr/lib/mysql
-    /usr/local/lib/mysql
-    /usr/local/mysql/lib
-    /usr/local/mysql/lib/mysql
-    /opt/mysql/mysql/lib
-    /opt/mysql/mysql/lib/mysql
-    $ENV{ProgramFiles}/MySQL/*/lib/${_lib_suffix_dist}
-    $ENV{ProgramFiles}/MySQL/*/lib
-    $ENV{SystemDrive}/MySQL/*/lib/${_lib_suffix_dist}
-    $ENV{SystemDrive}/MySQL/*/lib
-)
-
-set(_lib_subdirs
-    # Paths in build tree, really being too nice
-    libmysql/${_lib_suffix_build}
-    client/${_lib_suffix_build}
-    libmysql_r/.libs
-    libmysql/.libs
-    libmysql
-    # Install sub directories
-    lib/mysql
-    lib/${_lib_suffix_dist}   # Need to be before "lib"
-    lib
-)
-
-set(_static_subdirs
-    mysql
-    ${_lib_suffix_dist}
-)
-
-if(MSVC90)
-  set(_vs_subdir vs9)
-elseif(MSVC10)
-  set(_vs_subdir vs10)
-elseif(MSVC11)
-  set(_vs_subdir vs11)
-elseif(MSVC12)
-  set(_vs_subdir vs12)
-elseif(MSVC13)
-  set(_vs_subdir vs13)
-elseif(MSVC14)
-  set(_vs_subdir vs14)
-elseif(MSVC15)
-  set(_vs_subdir vs15)
-endif()
-
-if(_vs_subdir)
-  if("${_lib_suffix_dist}" STREQUAL "debug")
-    set(_vs_subdir "${_vs_subdir}/debug")
-  endif()
-  list(INSERT _lib_subdirs 0 "lib/${_vs_subdir}")
-endif()
-
-# For Windows, the client library name differs, so easy to
-# make sure find_library() picks the right one. For Unix, it
-# is the file extension that differs. In the static library
-# case we know it is ".a", so we add it to the library name
-# we search for to make sure it is picked in the static case.
-if(WIN32)
-  set(_dynamic_libs   "libmysql")
-  set(_static_libs    "mysqlclient")
-  set(_static_lib_ext ".lib")   # Careful, can be import library for DLL
-elseif(MYSQLCLIENT_NO_THREADS)
-  # In 5.1 and below there is a single threaded library
-  set(_dynamic_libs   "mysqlclient")
-  set(_static_libs    "libmysqlclient.a")
-  set(_static_lib_ext ".a")
-else()
-  # We try the multithreaded "libmysqlclient_r" first and if not
-  # there, pick "libmysqlclient" that in 5.5 and up is multithreaded
-  # anyway (soft link "libmysqlclient_r" is not installed MySQL Server
-  # 5.6 and Debian/Ubuntu and might go in 5.7 for all installs)
-  set(_dynamic_libs   "mysqlclient_r"      "mysqlclient")
-  set(_static_libs    "libmysqlclient_r.a" "libmysqlclient.a")
-  set(_static_lib_ext ".a")
-endif()
-
-if(MYSQLCLIENT_STATIC_LINKING)
-  set(_link_type   "static")
-  set(_search_libs ${_static_libs})
-else()
-  set(_link_type   "dynamic")
-  set(_search_libs ${_dynamic_libs})
-endif()
-
-# Just to pretty print in error messages
-string(REPLACE ";" " " _pp_search_libs           "${_search_libs}")
-string(REPLACE ";" " " _pp_lib_subdirs           "${_lib_subdirs}")
-string(REPLACE ";" " " _pp_lib_fallback_path     "${_lib_fallback_path}")
-string(REPLACE ";" " " _pp_include_fallback_path "${_include_fallback_path}")
-
-message(STATUS "You will link ${_link_type}ally to the MySQL client"
-               " library (set with -DMYSQLCLIENT_STATIC_LINKING=<bool>)")
-message(STATUS "Searching for ${_link_type} libraries with the base name(s) \"${_pp_search_libs}\"")
-
-##########################################################################
-#
-# Macros
-#
-##########################################################################
-
-# ----------------------------------------------------------------------
-#
-# Macro that runs "mysql_config ${_opt}" and return the line after
-# trimming away ending space/newline.
-#
-# _mysql_conf(
-#   _var    - output variable name, will contain a ';' separated list
-#   _opt    - the flag to give to mysql_config
-#
-# ----------------------------------------------------------------------
-
-macro(_mysql_conf _var _opt)
-  execute_process(
-    COMMAND ${MYSQL_CONFIG_EXECUTABLE} ${_opt}
-    OUTPUT_VARIABLE ${_var}
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-  )
-endmacro()
-
-# ----------------------------------------------------------------------
-#
-# Macro that runs "mysql_config ${_opt}", selects output args using a
-# regex, and clean it up a bit removing space/tab/newline before
-# setting it to a variable.
-#
-# _mysql_config(
-#   _var    - output variable name, will contain a ';' separated list
-#   _regex  - regular expression matching the prefix of args to select
-#   _opt    - the flag to give to mysql_config
-#
-# ----------------------------------------------------------------------
-
-macro(_mysql_config _var _regex _opt)
-  _mysql_conf(_mysql_config_output ${_opt})
-  string(REGEX MATCHALL "${_regex}([^ ]+)" _mysql_config_output "${_mysql_config_output}")
-  string(REGEX REPLACE "^[ \t]+" "" _mysql_config_output "${_mysql_config_output}")
-  string(REGEX REPLACE "${_regex}" "" _mysql_config_output "${_mysql_config_output}")
-  separate_arguments(_mysql_config_output)
-  set(${_var} ${_mysql_config_output})
-endmacro()
-
-# ----------------------------------------------------------------------
-#
-# Macro that runs "mysql_config ${_opt}" and selects output using a
-# prefix regex. Cleans it up a bit removing space/tab/newline. Then
-# removes the prefix on all in the list, and finally replace what
-# matches another regular expression with a replacement string.
-#
-# _mysql_config_replace(
-#   _var     - output variable name, will contain a ';' separated list
-#   _regex1  - regular expression to match out arguments
-#   _replace - what to replace match _regex1 with
-#   _regex2  - regular expression matching the prefix of args to select
-#   _opt     - the flag to give to mysql_config
-#
-# ----------------------------------------------------------------------
-
-macro(_mysql_config_replace _var _regex1 _replace _regex2 _opt)
-  _mysql_conf(_mysql_config_output ${_opt})
-  string(REGEX MATCHALL "${_regex2}([^ ]+)" _mysql_config_output "${_mysql_config_output}")
-  string(REGEX REPLACE "^[ \t]+" "" _mysql_config_output "${_mysql_config_output}")
-  string(REGEX REPLACE "${_regex2}" "" _mysql_config_output "${_mysql_config_output}")
-  string(REGEX REPLACE "${_regex1}" "${_replace}" _mysql_config_output "${_mysql_config_output}")
-  separate_arguments(_mysql_config_output)
-  set(${_var} ${_mysql_config_output})
-endmacro()
-
-# ----------------------------------------------------------------------
-#
-# Macro to check that we found a library and that we got the right type
-#
-# ----------------------------------------------------------------------
-
-macro(_check_lib_search_error _lib_dir_var _lib_var _exta_err_string)
-
-  set(_lib     "${${_lib_var}}")
-  set(_lib_dir "${${_lib_dir_var}}")
-
-  if(FINDMYSQL_DEBUG)
-    message("_lib         \"${_lib}\"")
-    message("_lib_dir     \"${_lib_dir}\"")
-    message("_lib_var     \"${_lib_var}\"")
-    message("_lib_dir_var \"${_lib_dir_var}\"")
-  endif()
-
-  set(_err_string "Could not find ${_link_type} "
-                  "\"${_pp_search_libs}\" in ${_lib_dir_var} "
-                  "\"${_lib_dir}\" ${_exta_err_string}")
-
-  if(NOT ${_lib_var})
-    message(FATAL_ERROR ${_err_string})
-  endif()
-
-  # find_library() try find a shared library first, then a static
-  # one. For Windows the library has a different name, but for
-  # Unix only the extension differs. So we check here that we
-  # got the library kind we expected.
-  if(NOT WIN32)
-    if(NOT MYSQLCLIENT_STATIC_LINKING)
-      get_filename_component(_ext ${_lib} EXT)
-      if(${_ext} STREQUAL ${_static_lib_ext})
-        message(FATAL_ERROR ${_err_string})
-      endif()
-    endif()
-  endif()
-endmacro()
-
-
-##########################################################################
-#
-# Try find MYSQL_CONFIG_EXECUTABLE if not set, and find version
-#
-##########################################################################
-
-if(NOT WIN32)
-
-  if(NOT MYSQL_CONFIG_EXECUTABLE)
-    find_program(MYSQL_CONFIG_EXECUTABLE
-      NAMES
-        mysql_config
-      DOC
-        "full path of mysql_config"
-      PATHS
-        ${_exe_fallback_path}
-    )
-  endif()
-
-  if(MYSQL_CONFIG_EXECUTABLE)
-    message(STATUS "mysql_config was found ${MYSQL_CONFIG_EXECUTABLE}")
-
-    _mysql_conf(MYSQL_VERSION "--version")
-  endif()
-
-endif()
-
-##########################################################################
-#
-# Find MYSQL_INCLUDE_DIR
-#
-##########################################################################
-
-if(FINDMYSQL_DEBUG AND MYSQL_INCLUDE_DIR)
-  message("DBG: User gave MYSQL_INCLUDE_DIR = \"${MYSQL_INCLUDE_DIR}\"")
-endif()
-
-if(FINDMYSQL_DEBUG AND MYSQL_DIR)
-  message("DBG: User gave MYSQL_DIR = \"${MYSQL_DIR}\"")
-endif()
-
-if(MYSQL_INCLUDE_DIR)
-
-  if(FINDMYSQL_DEBUG)
-    message("DBG: Using MYSQL_INCLUDE_DIR to find \"mysql.h\"")
-  endif()
-
-  if(NOT EXISTS "${MYSQL_INCLUDE_DIR}/mysql.h")
-    message(FATAL_ERROR "MYSQL_INCLUDE_DIR given, but no \"mysql.h\" "
-                        "in \"${MYSQL_INCLUDE_DIR}\"")
-  endif()
-
-elseif(MYSQL_DIR AND
-       (NOT _mysql_config_in_mysql_dir) AND
-       (NOT _mysql_config_set_by_user))
-
-  if(FINDMYSQL_DEBUG)
-    message("DBG: Using MYSQL_DIR without \"mysql_config\" to find \"mysql.h\"")
-  endif()
-
-  set(MYSQL_INCLUDE_DIR "${MYSQL_DIR}/include")
-  if(NOT EXISTS "${MYSQL_INCLUDE_DIR}/mysql.h")
-    message(FATAL_ERROR "MYSQL_DIR given, but no \"mysql.h\" "
-                        "in \"${MYSQL_INCLUDE_DIR}\"")
-  endif()
-
-elseif(MYSQL_CONFIG_EXECUTABLE)
-
-  if(FINDMYSQL_DEBUG)
-    message("DBG: Using \"mysql_config\" to find \"mysql.h\"")
-  endif()
-
-  # This code assumes there is just one "-I...." and that
-  # no space between "-I" and the path
-  _mysql_config(MYSQL_INCLUDE_DIR "(^| )-I" "--include")
-  if(NOT MYSQL_INCLUDE_DIR)
-    message(FATAL_ERROR "Could not find the include dir from running "
-                        "\"${MYSQL_CONFIG_EXECUTABLE}\"")
-  endif()
-
-  if(NOT EXISTS "${MYSQL_INCLUDE_DIR}/mysql.h")
-    message(FATAL_ERROR "Could not find \"mysql.h\" in \"${MYSQL_INCLUDE_DIR}\" "
-                        "found from running \"${MYSQL_CONFIG_EXECUTABLE}\"")
-  endif()
-
-else()
-
-  if(FINDMYSQL_DEBUG)
-    message("DBG: Using find_path() searching "
-            "\"${_pp_include_fallback_path}\" to find \"mysql.h\"")
-  endif()
-
-  # No specific paths, try some common install paths
-  find_path(MYSQL_INCLUDE_DIR mysql.h ${_include_fallback_path})
-
-  if(NOT MYSQL_INCLUDE_DIR)
-    message(FATAL_ERROR "Could not find \"mysql.h\" from searching "
-                        "\"${_pp_include_fallback_path}\"")
-  endif()
-
-endif()
-
-if(FINDMYSQL_DEBUG)
-  message("DBG: MYSQL_INCLUDE_DIR = \"${MYSQL_INCLUDE_DIR}\"")
-endif()
-
-##########################################################################
-#
-# Find MYSQL_LIB_DIR, MYSQL_LIB and MYSQL_LIBRARIES
-#
-##########################################################################
-
-if(FINDMYSQL_DEBUG AND MYSQL_LIB_DIR)
-  message("DBG: User gave MYSQL_LIB_DIR = \"${MYSQL_LIB_DIR}\"")
-endif()
-
-if(MYSQL_LIB_DIR)
-
-  if(FINDMYSQL_DEBUG)
-    message("DBG: Using find_library() searching MYSQL_LIB_DIR")
-  endif()
-
-  find_library(MYSQL_LIB
-    NAMES
-      ${_search_libs}
-    PATHS
-      "${MYSQL_LIB_DIR}"
-    NO_DEFAULT_PATH
-  )
-  _check_lib_search_error(MYSQL_LIB_DIR MYSQL_LIB "")
-  set(MYSQL_LIBRARIES ${MYSQL_LIB})
-
-elseif(MYSQL_DIR AND
-       (NOT _mysql_config_in_mysql_dir) AND
-       (NOT _mysql_config_set_by_user))
-
-  if(FINDMYSQL_DEBUG)
-    message("DBG: Using find_library() searching "
-            "MYSQL_DIR and \"${_pp_lib_subdirs}\"")
-  endif()
-
-  find_library(MYSQL_LIB
-    NAMES
-      ${_search_libs}
-    PATHS
-      "${MYSQL_DIR}"
-    PATH_SUFFIXES
-      ${_lib_subdirs}
-    NO_DEFAULT_PATH
-  )
-  _check_lib_search_error(MYSQL_DIR MYSQL_LIB "in \"${_pp_lib_subdirs}\"")
-  get_filename_component(MYSQL_LIB_DIR "${MYSQL_LIB}" PATH)
-  set(MYSQL_LIBRARIES "${MYSQL_LIB}")
-
-elseif(MYSQL_CONFIG_EXECUTABLE)
-
-  if(FINDMYSQL_DEBUG)
-    message("DBG: Using \"mysql_config\" to find the libraries")
-  endif()
-
-  # This code assumes there is just one "-L...." and that
-  # no space between "-L" and the path
-  _mysql_config(MYSQL_LIB_DIR "(^| )-L" "--libs")
-  if(NOT MYSQL_LIB_DIR)
-    message(FATAL_ERROR "Could not find the library dir from running "
-                        "\"${MYSQL_CONFIG_EXECUTABLE}\"")
-  endif()
-
-  if(NOT EXISTS "${MYSQL_LIB_DIR}")
-    message(FATAL_ERROR "Could not find the directory \"${MYSQL_LIB_DIR}\" "
-                        "found from running \"${MYSQL_CONFIG_EXECUTABLE}\"")
-  endif()
-
-  # We have the assumed MYSQL_LIB_DIR. The output from "mysql_config"
-  # might not be correct for static libraries, so we might need to
-  # adjust MYSQL_LIB_DIR later on.
-
-  if(MYSQLCLIENT_STATIC_LINKING)
-
-    # Find the static library, might be one level down
-    find_library(MYSQL_LIB
-      NAMES
-        ${_search_libs}
-      PATHS
-        ${MYSQL_LIB_DIR}
-      PATH_SUFFIXES
-        ${_static_subdirs}
-      NO_DEFAULT_PATH
-    )
-    _check_lib_search_error(MYSQL_LIB_DIR MYSQL_LIB "in \"${_static_subdirs}\"")
-
-    # Adjust MYSQL_LIB_DIR in case it changes
-    get_filename_component(MYSQL_LIB_DIR "${MYSQL_LIB}" PATH)
-
-    # Replace the current library references with the full path
-    # to the library, i.e. the -L will be ignored
-    _mysql_config_replace(MYSQL_LIBRARIES
-           "(mysqlclient|mysqlclient_r)" "${MYSQL_LIB}" "(^| )-l" "--libs")
-
-  else()
-
-    _mysql_config(MYSQL_LIBRARIES "(^| )-l" "--libs")
-
-    # First library is assumed to be the client library
-    list(GET MYSQL_LIBRARIES 0 _search_libs)
-    find_library(MYSQL_LIB
-      NAMES
-        ${_search_libs}
-      PATHS
-        ${MYSQL_LIB_DIR}
-      NO_DEFAULT_PATH
-    )
-    _check_lib_search_error(MYSQL_LIB_DIR MYSQL_LIB "")
-
-  endif()
-
-else()
-
-  if(FINDMYSQL_DEBUG)
-    message("DBG: Using find_library() searching "
-            "\"${_pp_lib_fallback_path}\" to find the client library")
-  endif()
-
-  # Search standard places
-  find_library(MYSQL_LIB
-    NAMES
-      ${_search_libs}
-    PATHS
-      ${_lib_fallback_path}
-  )
-  if(NOT MYSQL_LIB)
-    message(FATAL_ERROR "Could not find \"${_pp_search_libs}\" from searching "
-                        "\"${_pp_lib_fallback_path}\"")
-  endif()
-
-  get_filename_component(MYSQL_LIB_DIR "${MYSQL_LIB}" PATH)
-
-endif()
-
-##########################################################################
-#
-# Add more libraries to MYSQL_LIBRARIES
-#
-##########################################################################
-
-# FIXME needed?!
-if(MYSQLCLIENT_STATIC_LINKING AND
-   NOT WIN32 AND
-   NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-  list(APPEND MYSQL_LIBRARIES "rt")
-endif()
-
-if(MYSQL_EXTRA_LIBRARIES)
-  separate_arguments(MYSQL_EXTRA_LIBRARIES)
-  list(APPEND MYSQL_LIBRARIES ${MYSQL_EXTRA_LIBRARIES})
-endif()
-
-# For compatibility
-SET(MYSQL_CLIENT_LIBS ${MYSQL_LIBRARIES})
-
-##########################################################################
-#
-# If not found MySQL Serverv version, compile a small client app
-# and let it write a small cmake file with the settings
-#
-##########################################################################
-
-if(MYSQL_INCLUDE_DIR AND NOT MYSQL_VERSION)
-
-  # Write the C source file that will include the MySQL headers
-  set(GETMYSQLVERSION_SOURCEFILE "${CMAKE_CURRENT_BINARY_DIR}/getmysqlversion.c")
-  file(WRITE "${GETMYSQLVERSION_SOURCEFILE}"
-       "#include <mysql.h>\n"
-       "#include <stdio.h>\n"
-       "int main() {\n"
-       "  printf(\"%s\", MYSQL_SERVER_VERSION);\n"
-       "}\n"
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(MYSQL
+  FOUND_VAR MYSQL_FOUND
+  REQUIRED_VARS MYSQL_LIBRARY MYSQL_INCLUDE_DIR
   )

-  # Compile and run the created executable, store output in MYSQL_VERSION
-  try_run(_run_result _compile_result
-    "${CMAKE_BINARY_DIR}"
-    "${GETMYSQLVERSION_SOURCEFILE}"
-    CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${MYSQL_INCLUDE_DIR}"
-    RUN_OUTPUT_VARIABLE MYSQL_VERSION
+mark_as_advanced(
+  MYSQL_LIBRARY
+  MYSQL_INCLUDE_DIR
   )

-  if(FINDMYSQL_DEBUG)
-    if(NOT _compile_result)
-      message("DBG: Could not compile \"getmysqlversion.c\"")
-    endif()
-    if(_run_result)
-      message("DBG: Running \"getmysqlversion\" returned ${_run_result}")
-    endif()
-  endif()
-
-endif()
-
-##########################################################################
-#
-# Clean up MYSQL_VERSION and create MYSQL_VERSION_ID/MYSQL_NUM_VERSION
-#
-##########################################################################
-
-if(NOT MYSQL_VERSION)
-  message(FATAL_ERROR "Could not determine the MySQL Server version")
-endif()
-
-# Clean up so only numeric, in case of "-alpha" or similar
-string(REGEX MATCHALL "([0-9]+.[0-9]+.[0-9]+)" MYSQL_VERSION "${MYSQL_VERSION}")
-# To create a fully numeric version, first normalize so N.NN.NN
-string(REGEX REPLACE "[.]([0-9])[.]" ".0\\1." MYSQL_VERSION_ID "${MYSQL_VERSION}")
-string(REGEX REPLACE "[.]([0-9])$"   ".0\\1"  MYSQL_VERSION_ID "${MYSQL_VERSION_ID}")
-# Finally remove the dot
-string(REGEX REPLACE "[.]" "" MYSQL_VERSION_ID "${MYSQL_VERSION_ID}")
-set(MYSQL_NUM_VERSION ${MYSQL_VERSION_ID})
-
-##########################################################################
-#
-# Try determine if to use C++ linkage, and also find C++ flags
-#
-##########################################################################
-
-if(NOT WIN32)
-
-  if(MYSQL_CONFIG_EXECUTABLE)
-
-    if(NOT MYSQL_CFLAGS)
-      _mysql_conf(MYSQL_CFLAGS "--cflags")
-    endif()
-
-    if(NOT MYSQL_CXXFLAGS)
-      if(MYSQL_CXX_LINKAGE OR MYSQL_VERSION_ID GREATER 50603)
-        _mysql_conf(MYSQL_CXXFLAGS "--cxxflags")
-        set(MYSQL_CXX_LINKAGE 1)
-      else()
-        set(MYSQL_CXXFLAGS "${MYSQL_CFLAGS}")
-      endif()
-    endif()
-
-# FIXME this should not be needed, caller of this module should set
-#       it's own flags and just use the library on it's on terms
-#       (change the infe message if enabling this code)
-#   if(NOT MYSQL_LINK_FLAGS)
-#     # Find -mcpu -march -mt -m32 -m64 and other flags starting with "-m"
-#     string(REGEX MATCHALL "(^| )-m([^\r\n ]+)" MYSQL_LINK_FLAGS "${MYSQL_CXXFLAGS}")
-#     string(REGEX REPLACE "^ " ""  MYSQL_LINK_FLAGS "${MYSQL_LINK_FLAGS}")
-#     string(REGEX REPLACE "; " ";" MYSQL_LINK_FLAGS "${MYSQL_LINK_FLAGS}")
-#   endif()
-
-  endif()
-
-endif()
-
-##########################################################################
-#
-# Inform CMake where to look for headers and libraries
-#
-##########################################################################
-
-# string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKEBT)
-# set(CMAKE_CXX_FLAGS                "${CMAKE_CXX_FLAGS} ${MYSQL_CXXFLAGS}")
-# set(CMAKE_CXX_FLAGS_${CMAKEBT}     "${CMAKE_CXX_FLAGS_${CMAKEBT}} ${MYSQL_CXXFLAGS}")
-
-include_directories("${MYSQL_INCLUDE_DIR}")
-link_directories("${MYSQL_LIB_DIR}")
-
-##########################################################################
-#
-# Report
-#
-##########################################################################
-
-message(STATUS "MySQL client environment/cmake variables set that the user can override")
-
-message(STATUS "  MYSQL_DIR                   : ${MYSQL_DIR}")
-message(STATUS "  MYSQL_INCLUDE_DIR           : ${MYSQL_INCLUDE_DIR}")
-message(STATUS "  MYSQL_LIB_DIR               : ${MYSQL_LIB_DIR}")
-message(STATUS "  MYSQL_CONFIG_EXECUTABLE     : ${MYSQL_CONFIG_EXECUTABLE}")
-message(STATUS "  MYSQL_CXX_LINKAGE           : ${MYSQL_CXX_LINKAGE}")
-message(STATUS "  MYSQL_CFLAGS                : ${MYSQL_CFLAGS}")
-message(STATUS "  MYSQL_CXXFLAGS              : ${MYSQL_CXXFLAGS}")
-message(STATUS "  MYSQLCLIENT_STATIC_LINKING  : ${MYSQLCLIENT_STATIC_LINKING}")
-message(STATUS "  MYSQLCLIENT_NO_THREADS      : ${MYSQLCLIENT_NO_THREADS}")
-
-message(STATUS "MySQL client optional environment/cmake variables set by the user")
-
-message(STATUS "  MYSQL_EXTRA_LIBRARIES       : ${MYSQL_EXTRA_LIBRARIES}")
-message(STATUS "  MYSQL_LINK_FLAGS            : ${MYSQL_LINK_FLAGS}")
-
-message(STATUS "MySQL client settings that the user can't override")
-
-message(STATUS "  MYSQL_VERSION               : ${MYSQL_VERSION}")
-message(STATUS "  MYSQL_VERSION_ID            : ${MYSQL_VERSION_ID}")
-message(STATUS "  MYSQL_LIB                   : ${MYSQL_LIB}")
-message(STATUS "  MYSQL_LIBRARIES             : ${MYSQL_LIBRARIES}")+set(MYSQL_INCLUDE_DIRS ${MYSQL_INCLUDE_DIR})
+set(MYSQL_LIBRARIES ${MYSQL_LIBRARY})


default OSX build is only x86_64

default OSX build is only x86_64

--- Common.cmake
+++ Common.cmake
@@ -79,7 +79,7 @@
     /opt/local/libexec/qt5-mac) # Macports
   set(ENV{PATH} "/opt/local/bin:$ENV{PATH}") # dito
   if(NOT CMAKE_OSX_ARCHITECTURES OR CMAKE_OSX_ARCHITECTURES STREQUAL "")
-    set(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE
+    set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE
       STRING "Build architectures for OS X" FORCE)
   endif()
   set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")


Add IGNORE_LIB_TARGETS to not be added to PROJECT_LIBRARIES list

--- Common.cmake
+++ Common.cmake
@@ -153,7 +153,11 @@

   # ignore IMPORTED add_library from finders (e.g. Qt)
   cmake_parse_arguments(_arg "IMPORTED" "" "" ${ARGN})
-  if(NOT _arg_IMPORTED)
+
+  # ignore user-specified targets, e.g. language bindings
+  list(FIND IGNORE_LIB_TARGETS ${_target} _ignore_target)
+
+  if(NOT _arg_IMPORTED AND _ignore_target EQUAL -1)
     # add defines TARGET_DSO_NAME and TARGET_SHARED for dlopen() usage
     get_target_property(THIS_DEFINITIONS ${_target} COMPILE_DEFINITIONS)
     if(NOT THIS_DEFINITIONS)


Minor cleanup

Minor cleanup

--- FindMonsteer.cmake
+++ FindMonsteer.cmake
@@ -75,6 +75,3 @@
                                                          CODASH Lunchbox)
 find_package_handle_standard_args(Monsteer DEFAULT_MSG
                                   MONSTEER_LIBRARIES MONSTEER_INCLUDE_DIRS)
-if(MONSTEER_FOUND)
-  include("${MONSTEER_LIBRARY_DIRS}/../share/Monsteer/CMake/options.cmake")
-endif()


build: use clang-cl for runtimes when targeting Windows

When targeting Windows and building a runtime (subproject) prefer to use
`clang-cl` rather than the `clang` driver.  This allows us to cross-compile
runtimes for the Windows environment from Linux.

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

--- cmake/modules/LLVMExternalProjectUtils.cmake
+++ cmake/modules/LLVMExternalProjectUtils.cmake
@@ -104,13 +104,28 @@
     endforeach()
   endforeach()

+  foreach(arg ${ARG_CMAKE_ARGS})
+    if(arg MATCHES "^-DCMAKE_SYSTEM_NAME=")
+      string(REGEX REPLACE "^-DCMAKE_SYSTEM_NAME=(.*)$" "\\1" _cmake_system_name "${arg}")
+    endif()
+  endforeach()
+
   if(ARG_USE_TOOLCHAIN AND NOT CMAKE_CROSSCOMPILING)
     if(CLANG_IN_TOOLCHAIN)
-      set(compiler_args -DCMAKE_C_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang
-                        -DCMAKE_CXX_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++)
+      if(_cmake_system_name STREQUAL Windows)
+        set(compiler_args -DCMAKE_C_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang-cl
+                          -DCMAKE_CXX_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang-cl)
+      else()
+        set(compiler_args -DCMAKE_C_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang
+                          -DCMAKE_CXX_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++)
+      endif()
     endif()
     if(lld IN_LIST TOOLCHAIN_TOOLS)
-      list(APPEND compiler_args -DCMAKE_LINKER=${LLVM_RUNTIME_OUTPUT_INTDIR}/ld.lld)
+      if(_cmake_system_name STREQUAL Windows)
+        list(APPEND compiler_args -DCMAKE_LINKER=${LLVM_RUNTIME_OUTPUT_INTDIR}/lld-link)
+      else()
+        list(APPEND compiler_args -DCMAKE_LINKER=${LLVM_RUNTIME_OUTPUT_INTDIR}/ld.lld)
+      endif()
     endif()
     if(llvm-ar IN_LIST TOOLCHAIN_TOOLS)
       list(APPEND compiler_args -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar)


Minor format fix

Minor format fix

--- cmakemodules/script_show_final_summary.cmake
+++ cmakemodules/script_show_final_summary.cmake
@@ -144,7 +144,7 @@
 message(STATUS " National Instruments...")
 SHOW_CONFIG_LINE("...NIDAQmx?                         " CMAKE_MRPT_HAS_NIDAQMX)
 SHOW_CONFIG_LINE("...NIDAQmx Base?                    " CMAKE_MRPT_HAS_NIDAQMXBASE)
-SHOW_CONFIG_LINE_SYSTEM("NITE2 library                  	" CMAKE_MRPT_HAS_NITE2)
+SHOW_CONFIG_LINE_SYSTEM("NITE2 library                       " CMAKE_MRPT_HAS_NITE2)
 SHOW_CONFIG_LINE_SYSTEM("OpenKinect libfreenect              " CMAKE_MRPT_HAS_FREENECT)
 SHOW_CONFIG_LINE_SYSTEM("OpenNI2                             " CMAKE_MRPT_HAS_OPENNI2)
 SHOW_CONFIG_LINE("PGR Digiclops/Triclops (Windows)    " CMAKE_MRPT_HAS_BUMBLEBEE)


trying to fix windows

trying to fix windows

--- rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
@@ -68,7 +68,7 @@
 add_library(${rosidl_generate_interfaces_TARGET}${_target_suffix} SHARED ${_generated_files})
 if(WIN32)
   target_compile_definitions(${rosidl_generate_interfaces_TARGET}${_target_suffix}
-    PRIVATE "ROSIDL_BUILDING_DLL")
+    PRIVATE "ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_BUILDING_DLL")
 endif()
 target_include_directories(${rosidl_generate_interfaces_TARGET}${_target_suffix}
   PUBLIC


Omnibus: take out local_position_estimator from build as was out of flash after ecl update for airspeed selection module

Signed-off-by: Silvan Fuhrer <38928ccc4ba1624d4c70454b92c2d93a502f06b9@auterion.com>

--- boards/omnibus/f4sd/default.cmake
+++ boards/omnibus/f4sd/default.cmake
@@ -57,7 +57,7 @@
 		land_detector
 		landing_target_estimator
 		load_mon
-		local_position_estimator
+		#local_position_estimator
 		logger
 		mavlink
 		mc_att_control


fixes for Mac OSX Macports of guile.

fixes for Mac OSX Macports of guile.

--- lib/FindGuile.cmake
+++ lib/FindGuile.cmake
@@ -12,10 +12,21 @@

 # Look for the header file
-FIND_PATH(GUILE_INCLUDE_DIR libguile.h /usr/include /usr/local/include /usr/include/libguile /usr/local/include/libguile)
+# Macports for OSX puts things in /opt/local
+FIND_PATH(GUILE_INCLUDE_DIR libguile.h
+	/usr/include
+	/usr/local/include
+	/usr/include/libguile
+	/usr/local/include/libguile
+	/opt/local/include/guile
+)

 # Look for the library
-FIND_LIBRARY(GUILE_LIBRARY NAMES guile PATHS /usr/lib /usr/local/lib)
+FIND_LIBRARY(GUILE_LIBRARY NAMES guile PATHS
+	/usr/lib
+	/usr/local/lib
+	/opt/local/lib
+)

 # Copy the results to the output variables.
 IF(GUILE_INCLUDE_DIR AND GUILE_LIBRARY)


update to agree with basholeveldb tarball

--- basholeveldb.cmake
+++ basholeveldb.cmake
@@ -46,13 +46,13 @@
     BUILD_COMMAND     ${BUILDEM_ENV_STRING} $(MAKE)
     BUILD_IN_SOURCE   1
     INSTALL_COMMAND   ${CMAKE_COMMAND} -E copy
-        ${basholeveldb_SRC_DIR}/libleveldb.${LIBFILE}.${basholeveldb_RELEASE} ${BUILDEM_LIB_DIR}/libleveldb.${LIBFILE}
+        ${basholeveldb_SRC_DIR}/libleveldb.${LIBFILE}.1.9 ${BUILDEM_LIB_DIR}/libleveldb.${LIBFILE}
 )
 ExternalProject_add_step(${basholeveldb_NAME} install_lib_link
     DEPENDEES   install
     COMMAND     ${CMAKE_COMMAND} -E create_symlink
         ${BUILDEM_LIB_DIR}/libleveldb.${LIBFILE} ${BUILDEM_LIB_DIR}/libleveldb.${LIBFILE}.1
-    COMMENT     "Created symbolic link for libleveldb.so.1 in ${BUILDEM_LIB_DIR}"
+    COMMENT     "Created symbolic link for libleveldb.${LIBFILE}.1 in ${BUILDEM_LIB_DIR}"
 )
 ExternalProject_add_step(${basholeveldb_NAME} install_includes
     DEPENDEES   build


Applied global replace to warnings macro

--- build/macros.cmake
+++ build/macros.cmake
@@ -327,16 +327,16 @@
 		elseif(NOT CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
 			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall")
 		endif()
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /sdl") #Security Development Lifecycle checks
+		append_all_compiler_flag("/sdl") #Security Development Lifecycle checks
 		append_debug_flag("/RTCc") #Smaller type checks
 		add_definitions(-D_ALLOW_RTCc_IN_STL) #Acknowledge STL does not support this check
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:rvalueCast") #C++11 R-value cast check
+		append_all_compiler_flag("/Zc:rvalueCast") #C++11 R-value cast check

-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4201") #nameless struct/union (GLM)
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4464") #relative include path contains '..' (GLM)
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4514") #unreferenced inline function has been removed
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4710") #function not inlined (the entire std lib)
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4820") #Padding added to type
+		append_all_compiler_flag("/wd4201") #nameless struct/union (GLM)
+		append_all_compiler_flag("/wd4464") #relative include path contains '..' (GLM)
+		append_all_compiler_flag("/wd4514") #unreferenced inline function has been removed
+		append_all_compiler_flag("/wd4710") #function not inlined (the entire std lib)
+		append_all_compiler_flag("/wd4820") #Padding added to type

 		append_release_flag("/wd4711") #Function selected for automatic inline expansion
 	elseif(COMPILER MATCHES "gcc")


update memcheck test

update memcheck test

--- MemCheckTest.cmake
+++ MemCheckTest.cmake
@@ -9,9 +9,9 @@

 	if (NOT MEMCHECK_COMMAND)
 		MESSAGE( "Memcheck command not found!")
-		add_test(${_targetname} ${_testrunner})
+		add_test(${_targetname} ${_testrunner} ${ARGN})
 	else ()
-		add_test(${_targetname} ${MEMCHECK_COMMAND} --leak-check=full --error-exitcode=5 ${ARGV2} --quiet ${_testrunner})
+		add_test(${_targetname} ${MEMCHECK_COMMAND} --leak-check=full --error-exitcode=5 ${ARGV2} --quiet ${_testrunner} ${ARGN})
 	endif()

 endfunction()
@@ -19,9 +19,9 @@
 function(add_opt_memcheck_test _cond _targetname _testrunner)

   if (NOT ${_cond} OR NOT MEMCHECK_COMMAND)
-    add_test(${_targetname} ${_testrunner} ${ARGV3})
+    add_test(${_targetname} ${_testrunner} ${ARGN})
   else ()
-    add_test(${_targetname} ${MEMCHECK_COMMAND} --leak-check=full --error-exitcode=5 ${ARGV3} --quiet ${_testrunner})
+    add_test(${_targetname} ${MEMCHECK_COMMAND} --leak-check=full --error-exitcode=5 ${ARGV3} --quiet ${_testrunner} ${ARGN})
   endif()

 endfunction()


fixing packages list

fixing packages list

--- PackagesList.cmake
+++ PackagesList.cmake
@@ -13,7 +13,9 @@
   Utils     packages/Utils     SS
   CudaUtils packages/CudaUtils SS
   Matprop   packages/Matprop   SS
+  SPn       packages/SPn       SS
   MC        packages/MC        SS
+  Alea      packages/Alea      SS
   )

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


version 0.0.1.2

version 0.0.1.2

--- PluginConfig.cmake
+++ PluginConfig.cmake
@@ -8,7 +8,7 @@
 set(PLUGIN_NAME "FBVLC")
 set(PLUGIN_PREFIX "FBVLC")
 set(COMPANY_NAME "RSATom")
-set(PLUGIN_VERSION "0.0.1.1")
+set(PLUGIN_VERSION "0.0.1.2")

 #if you want embed vlc into FBVLC distribution:
 # 1) place vlc into FBVLC\Win\WiX\vlc-${VLC_VERSION}


Enable -fPIC in compiler flags for shared lib builds

Former-commit-id: f2a74a23bd0128f70466dcd864b3ddbc586b7b14

--- cmake-modules/CompilerFlags.cmake
+++ cmake-modules/CompilerFlags.cmake
@@ -58,4 +58,5 @@

 set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
-set(CMAKE_CXX_EXTENSIONS OFF)+set(CMAKE_CXX_EXTENSIONS OFF)
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)


Updated flags

Updated flags

--- cmake/Modules/BuildSettings.cmake
+++ cmake/Modules/BuildSettings.cmake
@@ -114,7 +114,7 @@
     if(CMAKE_C_COMPILER_IS_INTEL)
         add_c_flag_if_avail("-xHOST")
     else()
-        add_c_flag_if_avail("-march")
+        add_c_flag_if_avail("-march=native")
         add_c_flag_if_avail("-msse2")
         add_c_flag_if_avail("-msse3")
         add_c_flag_if_avail("-msse4")
@@ -125,7 +125,7 @@
     if(CMAKE_CXX_COMPILER_IS_INTEL)
         add_cxx_flag_if_avail("-xHOST")
     else()
-        add_cxx_flag_if_avail("-march")
+        add_cxx_flag_if_avail("-march=native")
         add_cxx_flag_if_avail("-msse2")
         add_cxx_flag_if_avail("-msse3")
         add_cxx_flag_if_avail("-msse4")


From Pere: CMAKE_CXX_COMPILER_ID is an internal variable and is not defined for Windows. Fixes Savannah #94209

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

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -13,7 +13,7 @@

 #----Test if clang setup works----------------------------------------------------------------------
-if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
   exec_program(${CMAKE_C_COMPILER} ARGS "-v" OUTPUT_VARIABLE _clang_version_info)
   string(REGEX REPLACE "^.*[ ]([0-9]+)\\.[0-9].*$" "\\1" CLANG_MAJOR "${_clang_version_info}")
   string(REGEX REPLACE "^.*[ ][0-9]+\\.([0-9]).*$" "\\1" CLANG_MINOR "${_clang_version_info}")


[cmake] Require C++14 or later:

[cmake] Require C++14 or later:

Given the ubiquitous access and existing use of C++ standards > 2011
ROOT will start having C++ constructs only available in C++14, i.e.
requiring a C++14-capable compiler.


[CMake] We only want to copy the headers for macOS.

<rdar://problem/55916729>

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@373970 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBFramework.cmake
+++ cmake/modules/LLDBFramework.cmake
@@ -83,11 +83,13 @@

 # At build time, copy the staged headers into the framework bundle (and do
 # some post-processing in-place).
+if (NOT IOS)
 add_custom_command(TARGET liblldb POST_BUILD
   COMMAND ${CMAKE_COMMAND} -E copy_directory ${lldb_header_staging} $<TARGET_FILE_DIR:liblldb>/Headers
   COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh $<TARGET_FILE_DIR:liblldb>/Headers ${LLDB_VERSION}
   COMMENT "LLDB.framework: copy framework headers"
 )
+endif()

 # Copy vendor-specific headers from clang (without staging).
 if(NOT IOS)


[cmake] Move the excluded modules to a better place.

The old location excluded them only from the modulemap however
rootcling still tried to build a module for them.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -366,6 +366,13 @@
       set(cpp_module ${ARG_MODULE})
       if(runtime_cxxmodules)
         set(cpp_module_file ${library_output_dir}/${cpp_module}.pcm)
+        if (APPLE)
+          # FIXME: Krb5Auth.h triggers "declaration of '__mb_cur_max' has a different language linkage"
+          # problem.
+          if (${cpp_module} MATCHES "(Krb5Auth|GCocoa|GQuartz)")
+            set(cpp_module_file)
+          endif()
+        endif(APPLE)
       endif()
     endif()
   else()
@@ -488,14 +495,6 @@
                     FILTER "LinkDef" ${d}/*)
     list(APPEND found_headers "${dir_headers}")
   endforeach()
-
-  if (APPLE)
-    # FIXME: Krb5Auth.h triggers "declaration of '__mb_cur_max' has a different language linkage"
-    # problem.
-    if (${library} MATCHES "(Krb5Auth|GCocoa|GQuartz)")
-      return()
-    endif()
-  endif(APPLE)

   set(excluded_headers RConfig.h RVersion.h RtypesImp.h
                         RtypesCore.h TClassEdit.h


download boost-1.68.0-p1 from hunter-packages.

--- cmake/projects/Boost/hunter.cmake
+++ cmake/projects/Boost/hunter.cmake
@@ -110,9 +110,9 @@
     VERSION
     "1.68.0-p1"
     URL
-    "https://github.com/nxxm/boost/archive/v1.68.0-p1.tar.gz"
-    SHA1
-    48ba32d027334de6bead48ff20b17695cb54be5d
+    "https://github.com/hunter-packages/boost/archive/v1.68.0-p1.tar.gz"
+    SHA1
+    0bb10b0a0fdc196646c87e0143c0290baa32357d
 )

 # up until 1.63 sourcefourge was used


cmake: compat: cosmetic changes

cmake: compat: cosmetic changes

--- cmake/qibuild/compat/compat.cmake
+++ cmake/qibuild/compat/compat.cmake
@@ -21,7 +21,7 @@
 endfunction()

 function(sdk_add_include _name _subfolder)
-  qi_warning("sdk_add_include is deprectated.
+  qi_warning("sdk_add_include is deprecated.

   Note:
     Assuming you have a foo.h in a bar library,
@@ -393,7 +393,6 @@
   qi_deprecated("unimplemented")
 endfunction()

-# hack:
 function(add_msvc_precompiled_header)
   qi_deprecated("not implemented yet")
 endfunction()


ENH: Update SimpleITKFilters remote module

Update compliance level to 3.
Move repository to InsightSoftwareConsortium to easy community
maintenance.
Update git hash for ITK v5.1rc2 updates.

--- Modules/Remote/SimpleITKFilters.remote.cmake
+++ Modules/Remote/SimpleITKFilters.remote.cmake
@@ -10,8 +10,8 @@
 #--   - [ ] All requirements of Levels 4,3,2,1
 #--
 #-- ## Compliance Level 4 star (Very high-quality code, perhaps small community dependance)
-#--   - [ ] Meets all ITK code style standards
-#--   - [ ] No external requirements beyond those needed by ITK proper
+#--   - [X ] Meets all ITK code style standards
+#--   - [X] No external requirements beyond those needed by ITK proper
 #--   - [ ] Builds and passes tests on all supported platforms within 1 month of each core tagged release
 #--            - [ ] Windows Shared Library Build with Visual Studio
 #--            - [ ] Mac with clang compiller
@@ -22,9 +22,9 @@
 #--   - [ ] All requirements of Levels 3,2,1
 #--
 #-- ## Compliance Level 3 star (Quality beta code)
-#--   - [ ] API | executable interface is considered mostly stable and feature complete
-#--   - [ ] 10% C0-code coverage demonstrated for testing suite
-#--   - [ ] Some tests exist and pass on at least some platform
+#--   - [X] API | executable interface is considered mostly stable and feature complete
+#--   - [X] 10% C0-code coverage demonstrated for testing suite
+#--   - [X] Some tests exist and pass on at least some platform
 #--   - [X] All requirements of Levels 2,1
 #--
 #-- ## Compliance Level 2 star (Alpha code feature API development or niche community/exectution environment dependance )
@@ -48,6 +48,6 @@
   implementations designed for SimpleITK's requirements. Currently it
   contains a discrete hessian, and a composite filter to compute objectness."
   MODULE_COMPLIANCE_LEVEL 2
-  GIT_REPOSITORY ${git_protocol}://github.com/SimpleITK/ITKSimpleITKFilters.git
-  GIT_TAG d0afddea095dd89d7b820b9db313cad2aef2d908
+  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSimpleITKFilters.git
+  GIT_TAG d67058d605a4a57674e5bc756a389cf7040dcc6d
   )


Add python version 3.5

Add python version 3.5

--- cmake/Common.cmake
+++ cmake/Common.cmake
@@ -40,7 +40,7 @@
 ############################
 # Find Python libraries
 ############################
-set(Python_ADDITIONAL_VERSIONS "3.3;3.4")
+set(Python_ADDITIONAL_VERSIONS "3.3;3.4;3.5")
 find_package(PythonLibs REQUIRED)


Some minor cleaning up [ci skip].

Some minor cleaning up [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -6,7 +6,7 @@

     IF(WIN32)
         IF(   NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC"
-           OR NOT ${MSVC_VERSION} EQUAL 1900)
+           OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19")
             MESSAGE(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built using MSVC 2015 on Windows...")
         ENDIF()
     ELSEIF(APPLE)


Add option to use pre-built banner

Add option to use pre-built banner

--- cmake/cpp3ds.cmake
+++ cmake/cpp3ds.cmake
@@ -330,7 +330,10 @@
     if( NOT ${target_we}.smdh)
         __add_smdh(${target_we}.smdh ${APP_TITLE} ${APP_DESCRIPTION} ${APP_AUTHOR} ${APP_ICON})
     endif()
-    __add_ncch_banner(${target_we}.bnr ${IMAGE} ${SOUND})
+    if(NOT BANNER)
+        set(BANNER ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target_we}.bnr)
+        __add_ncch_banner(${target_we}.bnr ${IMAGE} ${SOUND})
+    endif()
     add_custom_command(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target_we}.cia
             COMMAND ${MAKEROM} -f cia
             -target t
@@ -339,7 +342,7 @@
             -elf $<TARGET_FILE:${target}>
             -rsf ${RSF}
             -ver ${APP_VERSION}
-            -banner ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target_we}.bnr
+            -banner ${BANNER}
             -icon ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target_we}.smdh
 			-DAPP_TITLE=${APP_TITLE}
 			-DAPP_PRODUCT_CODE=${APP_PRODUCT_CODE}


Update system.cmake

Update system.cmake

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -46,13 +46,15 @@

 if (DEFINED TARGET)
   if (${TARGET} STREQUAL "COOPERLAKE" AND NOT NO_AVX512)
-    if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
+#    if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
       execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
         if (${GCC_VERSION} VERSION_GREATER 10.1 OR ${GCC_VERSION} VERSION_EQUAL 10.1)
           set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=cooperlake")
         else()
           set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")
         endif()
+#    elseif (${CMAKE_C_COMPILER_ID} STREQUAL "CLANG")
+#      set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
     endif()
   endif()
   if (${TARGET} STREQUAL "SKYLAKEX" AND NOT NO_AVX512)


Converted rest of Makefile.system to system.cmake.

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -338,7 +338,6 @@

 #Disable -fopenmp for LAPACK Fortran codes on Windows.
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
-  message(STATUS "FFLAGS: ${LAPACK_FFLAGS}")
   set(FILTER_FLAGS "-fopenmp;-mp;-openmp;-xopenmp=parralel")
   foreach (FILTER_FLAG ${FILTER_FLAGS})
     string(REPLACE ${FILTER_FLAG} "" LAPACK_FFLAGS ${LAPACK_FFLAGS})
@@ -359,3 +358,166 @@
   set(LAPACK_CFLAGS "${LAPACK_CFLAGS} -DLAPACK_COMPLEX_STRUCTURE")
 endif ()

+if (NOT DEFINED SUFFIX)
+  set(SUFFIX o)
+endif ()
+
+if (NOT DEFINED PSUFFIX)
+  set(PSUFFIX po)
+endif ()
+
+if (NOT DEFINED LIBSUFFIX)
+  set(LIBSUFFIX a)
+endif ()
+
+if (DYNAMIC_ARCH)
+  if (DEFINED SMP)
+    set(LIBNAME "${LIBPREFIX}p${REVISION}.${LIBSUFFIX}")
+    set(LIBNAME_P	"${LIBPREFIX}p${REVISION}_p.${LIBSUFFIX}")
+  else ()
+    set(LIBNAME "${LIBPREFIX}${REVISION}.${LIBSUFFIX}")
+    set(LIBNAME_P	"${LIBPREFIX}${REVISION}_p.${LIBSUFFIX}")
+  endif ()
+else ()
+  if (DEFINED SMP)
+    set(LIBNAME "${LIBPREFIX}_${LIBCORE}p${REVISION}.${LIBSUFFIX}")
+    set(LIBNAME_P	"${LIBPREFIX}_${LIBCORE}p${REVISION}_p.${LIBSUFFIX}")
+  else ()
+    set(LIBNAME	"${LIBPREFIX}_${LIBCORE}${REVISION}.${LIBSUFFIX}")
+    set(LIBNAME_P	"${LIBPREFIX}_${LIBCORE}${REVISION}_p.${LIBSUFFIX}")
+  endif ()
+endif ()
+
+
+set(LIBDLLNAME "${LIBPREFIX}.dll")
+set(LIBSONAME "${LIBNAME}.${LIBSUFFIX}.so")
+set(LIBDYNNAME "${LIBNAME}.${LIBSUFFIX}.dylib")
+set(LIBDEFNAME "${LIBNAME}.${LIBSUFFIX}.def")
+set(LIBEXPNAME "${LIBNAME}.${LIBSUFFIX}.exp")
+set(LIBZIPNAME "${LIBNAME}.${LIBSUFFIX}.zip")
+
+set(LIBS "${CMAKE_SOURCE_DIR}/${LIBNAME}")
+set(LIBS_P "${CMAKE_SOURCE_DIR}/${LIBNAME_P}")
+
+
+set(LIB_COMPONENTS BLAS)
+if (NOT NO_CBLAS)
+  set(LIB_COMPONENTS "${LIB_COMPONENTS} CBLAS")
+endif ()
+
+if (NOT NO_LAPACK)
+  set(LIB_COMPONENTS "${LIB_COMPONENTS} LAPACK")
+  if (NOT NO_LAPACKE)
+    set(LIB_COMPONENTS "${LIB_COMPONENTS} LAPACKE")
+  endif ()
+endif ()
+
+if (ONLY_CBLAS)
+  set(LIB_COMPONENTS CBLAS)
+endif ()
+
+#export OSNAME
+#export ARCH
+#export CORE
+#export LIBCORE
+#export PGCPATH
+#export CONFIG
+#export CC
+#export FC
+#export BU
+#export FU
+#export NEED2UNDERSCORES
+#export USE_THREAD
+#export NUM_THREADS
+#export NUM_CORES
+#export SMP
+#export MAKEFILE_RULE
+#export NEED_PIC
+#export BINARY
+#export BINARY32
+#export BINARY64
+#export F_COMPILER
+#export C_COMPILER
+#export USE_OPENMP
+#export CROSS
+#export CROSS_SUFFIX
+#export NOFORTRAN
+#export NO_FBLAS
+#export EXTRALIB
+#export CEXTRALIB
+#export FEXTRALIB
+#export HAVE_SSE
+#export HAVE_SSE2
+#export HAVE_SSE3
+#export HAVE_SSSE3
+#export HAVE_SSE4_1
+#export HAVE_SSE4_2
+#export HAVE_SSE4A
+#export HAVE_SSE5
+#export HAVE_AVX
+#export HAVE_VFP
+#export HAVE_VFPV3
+#export HAVE_VFPV4
+#export HAVE_NEON
+#export KERNELDIR
+#export FUNCTION_PROFILE
+#export TARGET_CORE
+#
+#export SGEMM_UNROLL_M
+#export SGEMM_UNROLL_N
+#export DGEMM_UNROLL_M
+#export DGEMM_UNROLL_N
+#export QGEMM_UNROLL_M
+#export QGEMM_UNROLL_N
+#export CGEMM_UNROLL_M
+#export CGEMM_UNROLL_N
+#export ZGEMM_UNROLL_M
+#export ZGEMM_UNROLL_N
+#export XGEMM_UNROLL_M
+#export XGEMM_UNROLL_N
+#export CGEMM3M_UNROLL_M
+#export CGEMM3M_UNROLL_N
+#export ZGEMM3M_UNROLL_M
+#export ZGEMM3M_UNROLL_N
+#export XGEMM3M_UNROLL_M
+#export XGEMM3M_UNROLL_N
+
+
+#if (USE_CUDA)
+#  export CUDADIR
+#  export CUCC
+#  export CUFLAGS
+#  export CULIB
+#endif
+
+#.SUFFIXES: .$(PSUFFIX) .$(SUFFIX) .f
+#
+#.f.$(SUFFIX):
+#	$(FC) $(FFLAGS) -c $<  -o $(@F)
+#
+#.f.$(PSUFFIX):
+#	$(FC) $(FPFLAGS) -pg -c $<  -o $(@F)
+
+# these are not cross-platform
+#ifdef BINARY64
+#PATHSCALEPATH	= /opt/pathscale/lib/3.1
+#PGIPATH		= /opt/pgi/linux86-64/7.1-5/lib
+#else
+#PATHSCALEPATH	= /opt/pathscale/lib/3.1/32
+#PGIPATH		= /opt/pgi/linux86/7.1-5/lib
+#endif
+
+#ACMLPATH	= /opt/acml/4.3.0
+#ifneq ($(OSNAME), Darwin)
+#MKLPATH         = /opt/intel/mkl/10.2.2.025/lib
+#else
+#MKLPATH         = /Library/Frameworks/Intel_MKL.framework/Versions/10.0.1.014/lib
+#endif
+#ATLASPATH	= /opt/atlas/3.9.17/opteron
+#FLAMEPATH	= $(HOME)/flame/lib
+#ifneq ($(OSNAME), SunOS)
+#SUNPATH		= /opt/sunstudio12.1
+#else
+#SUNPATH		= /opt/SUNWspro
+#endif
+


zephyr: Add more compiler warnings as errors

Added unused-function and array-bounds, this should help prevent gitlab
failures.

BRANCH=None
BUG=None
TEST=zmake testall

Change-Id: Iebeaa8fc64990c844e43daf8b979c7f243a93bcc
Signed-off-by: Jeremy Bettis <4df7b5147fee087dca33c181f288ee7dbf56e022@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3340212
Reviewed-by: Yuval Peress <50dc11c009bd4d7e9d9d15a383c1743ce5ee82ef@google.com>
Commit-Queue: Jeremy Bettis <4df7b5147fee087dca33c181f288ee7dbf56e022@chromium.org>
Tested-by: Jeremy Bettis <4df7b5147fee087dca33c181f288ee7dbf56e022@chromium.org>

--- zephyr/cmake/compiler/clang/compiler_flags.cmake
+++ zephyr/cmake/compiler/clang/compiler_flags.cmake
@@ -9,4 +9,5 @@

 check_set_compiler_property(APPEND PROPERTY warning_extended -Wunused-variable
 	-Werror=unused-variable -Werror=missing-braces
-	-Werror=sometimes-uninitialized)
+	-Werror=sometimes-uninitialized -Werror=unused-function
+	-Werror=array-bounds)


Updated to handle CUDA 2.0

Updated to handle CUDA 2.0

git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@970 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/CMake/cuda/FindCuda.cmake
+++ src/CMake/cuda/FindCuda.cmake
@@ -164,9 +164,12 @@
       CUDA_NVCC_INCLUDE_ARGS
       )
   ENDIF(NOT FOUND_CUDA_NVCC_INCLUDE)
-
+
 # ENDIF(NOT FOUND_CUDA_NVCC_INCLUDE)

+# set the CUDA version by reading cuda.h
+file(READ ${CUDA_INCLUDE}/cuda.h CUDA_H_)
+string(REGEX REPLACE ".*define CUDA_VERSION ([0123456789]+).*" "\\1" CUDA_VERSION "${CUDA_H_}")

 # CUDA_TARGET_LINK
 IF (NOT CUDA_TARGET_LINK)
@@ -297,8 +300,13 @@
     # strip CMAKE_SOURCE_DIR from the head of ${file}
 	STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}/" "" stripped_file ${file})

-    # Add a custom target to generate a cpp file.
-    SET(generated_file  "${CMAKE_BINARY_DIR}/src/cuda/${stripped_file}_${cuda_target}_generated.c")
+    # Add a custom target to generate a cpp file (CUDA 2.0 needs .cc files and CUDA 1.1 needs .c files)
+	if (${CUDA_VERSION} GREATER 1999)
+	    SET(generated_file  "${CMAKE_BINARY_DIR}/src/cuda/${stripped_file}_${cuda_target}_generated.cc")
+	else(${CUDA_VERSION} GREATER 1999)
+	    SET(generated_file  "${CMAKE_BINARY_DIR}/src/cuda/${stripped_file}_${cuda_target}_generated.c")
+	endif(${CUDA_VERSION} GREATER 1999)
+
     SET(generated_target "${stripped_file}_target")

     FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/src/cuda)


Actually make a2x optional

Actually make a2x optional

We might not even write man pages tbh

--- CMake/Manpage.cmake
+++ CMake/Manpage.cmake
@@ -1,31 +1,33 @@
-find_package(A2X REQUIRED)
+find_package(A2X)

-add_custom_target(man ALL)
+if (A2X_FOUND)
+    add_custom_target(man ALL)

-function(add_manpage name section)
-	add_custom_command(
-		OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
-		COMMAND ${A2X_COMMAND}
-				--no-xmllint
-				--doctype manpage
-				--format manpage
-				-D ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
-				${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt
-		DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt
-		COMMENT Generating manpage for ${name}.${section}
-	)
+    function(add_manpage name section)
+        add_custom_command(
+            OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
+            COMMAND ${A2X_COMMAND}
+                    --no-xmllint
+                    --doctype manpage
+                    --format manpage
+                    -D ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+                    ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt
+            DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt
+            COMMENT Generating manpage for ${name}.${section}
+        )

-	add_custom_target(man-${name}.${section}
-		DEPENDS
-			${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
-	)
-	add_dependencies(man
-		man-${name}.${section}
-	)
+        add_custom_target(man-${name}.${section}
+            DEPENDS
+                ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
+        )
+        add_dependencies(man
+            man-${name}.${section}
+        )

-	install(
-		FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
-		DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/man/man${section}
-		COMPONENT documentation
-	)
-endfunction()
+        install(
+            FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
+            DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/man/man${section}
+            COMPONENT documentation
+        )
+    endfunction()
+endif()


COMP: skip gdal tests second time if all passed with success

--- Modules/ThirdParty/GDAL/otb-module-init.cmake
+++ Modules/ThirdParty/GDAL/otb-module-init.cmake
@@ -8,7 +8,7 @@
 endif()

 #Check if GDAL is compatible with OTB using a bunch of cmake try_run and try_compile. (Default value is ON.)
-set(GDAL_CONFIG_CHECKING ON CACHE BOOL "Tests to check gdal config." FORCE)
+set(GDAL_CONFIG_CHECKING ON CACHE BOOL "Tests to check gdal config.")
 mark_as_advanced(GDAL_CONFIG_CHECKING)

 if(NOT GDAL_CONFIG_CHECKING)
@@ -23,6 +23,13 @@
   FILE(MAKE_DIRECTORY ${TEMP})
 endif()

+set(GDAL_CONFIG_CHECKING OFF CACHE BOOL "Tests to check gdal config." FORCE)
+
+macro(error_message m)
+  message("Setting GDAL_CONFIG_CHECKING to ON. (all GDAL tests will run again)")
+  set(GDAL_CONFIG_CHECKING ON CACHE BOOL "Tests to check gdal config." FORCE)
+  message(FATAL_ERROR "${m}")
+endmacro(error_message)

 #------------------- Helper Macro ---------------------
 macro(gdal_try_run msg_type var source_file)
@@ -37,7 +44,7 @@
 )

 if(NOT COMPILE_${var})
-  message(FATAL_ERROR "Compiling Test ${var} - Failed \n
+  error_message("Compiling Test ${var} - Failed \n
 COMPILE_OUTPUT_${var}: '${COMPILE_OUTPUT_${var}}'")
 endif()
 if(RUN_${var})
@@ -47,7 +54,7 @@
   if("${msg_type}" STREQUAL "STATUS")
     message(${msg_type} "Performing Test ${var} - Failed")
   else()
-    message(${msg_type} "Performing Test ${var} - Failed \n
+    error_message("Performing Test ${var} - Failed \n
             Exit status: '${RUN_${var}}' \n
             RUN_OUTPUT_${var}: '${RUN_OUTPUT_${var}}'")
   endif()
@@ -75,7 +82,7 @@
   endif()
   set(GDAL_VERSION_STRING "${_GDAL_VERSION_STRING}" CACHE INTERNAL "" FORCE)
 else()
-  message(FATAL_ERROR "${TEMP}/gdalVersion.txt does not exist. Cannot continue.")
+  error_message( "${TEMP}/gdalVersion.txt does not exist. Cannot continue.")
 endif()

 #check OGR
@@ -86,7 +93,7 @@
 OUTPUT_VARIABLE COMPILE_OUTPUT_GDAL_HAS_OGR
 )
 if(NOT COMPILE_GDAL_HAS_OGR)
- message(FATAL_ERROR "Performing Test COMPILE_GDAL_HAS_OGR - Failed\n COMPILE_OUTPUT:${COMPILE_OUTPUT_GDAL_HAS_OGR}\n")
+ error_message("Performing Test COMPILE_GDAL_HAS_OGR - Failed\n COMPILE_OUTPUT:${COMPILE_OUTPUT_GDAL_HAS_OGR}\n")
   else()
  message(STATUS "Performing Test COMPILE_GDAL_HAS_OGR - Success")
 endif()


Apply fix from Fabrice Ménard, to improve detection of libgcrypt.

If you previously got "libgcrypt seems to be too old", even with
a really recent libgcrypt, this one is for you.

svn path=/trunk/kdesupport/qca/; revision=752573

--- cmake/modules/FindLibGcrypt.cmake
+++ cmake/modules/FindLibGcrypt.cmake
@@ -27,6 +27,10 @@

   EXEC_PROGRAM(${LIBGCRYPTCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE LIBGCRYPT_CFLAGS)

+  IF(${LIBGCRYPT_CFLAGS} MATCHES "\n")
+    SET(LIBGCRYPT_CFLAGS " ")
+  ENDIF(${LIBGCRYPT_CFLAGS} MATCHES "\n")
+
   IF(LIBGCRYPT_LIBRARIES AND LIBGCRYPT_CFLAGS)
     SET(LIBGCRYPT_FOUND TRUE)
   ENDIF(LIBGCRYPT_LIBRARIES AND LIBGCRYPT_CFLAGS)


Update hunter.cmake

Update hunter.cmake

--- cmake/projects/vmime/hunter.cmake
+++ cmake/projects/vmime/hunter.cmake
@@ -6,7 +6,7 @@

 hunter_add_version(
 	PACKAGE_NAME vmime
-	VERSION "0.9.2.1"
+	VERSION "0.9.2.2"
 	URL "https://github.com/designerror/vmime/archive/v0.9.2.2.tar.gz"
 	SHA1 a7cc34e9f3db3f9f705c87ae7697b9cae67fe1af
 )


Remove obsolete boost_external.cmake script to avoid further confusion

--- cmakemodules/boost_external.cmake
+++ cmakemodules/boost_external.cmake
@@ -1,11 +0,0 @@
-ExternalProject_Add(
-    boost_external
-    GIT_REPOSITORY https://github.com/boostorg/boost.git
-    GIT_TAG boost-1.59.0
-    UPDATE_COMMAND ""
-    BUILD_IN_SOURCE 1
-    CONFIGURE_COMMAND ./bootstrap.sh
-    BUILD_COMMAND ./b2 -s NO_BZIP2=1 --prefix=<INSTALL_DIR> --without-python install
-    #BUILD_COMMAND ./b2 --show-libraries
-    INSTALL_COMMAND ""
-)


Execute the CppCheck with multiple jobs (#72).

--- cmake/CppCheck.cmake
+++ cmake/CppCheck.cmake
@@ -16,6 +16,7 @@
                                             --suppress=missingInclude
                                             --suppress=unmatchedSuppression
                                             --suppressions-list=${CMAKE_MODULE_PATH}/CppCheck.suppressions
+                                            -j 4
                                             "${PROJECT_SOURCE_DIR}/src"
                                             "${PROJECT_SOURCE_DIR}/include"
                         COMMENT "Running CppCheck ..."


Some fixes

Some fixes

--- cmake/External.cmake
+++ cmake/External.cmake
@@ -58,6 +58,9 @@
   set(GEN_ARGS)
   set(CONF_ARGS)

+  if(CMAKE_GENERATOR_PLATFORM)
+    set(GEN_ARGS "${GEN_ARGS} -A${CMAKE_GENERATOR_PLATFORM}")
+  endif()
   if(CMAKE_TOOLCHAIN_FILE)
     set(GEN_ARGS "${GEN_ARGS} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
   endif()
@@ -87,7 +90,7 @@
       file(MAKE_DIRECTORY "${${lcName}_BINARY_DIR}/${BUILD_CONFIG}")

       execute_process(
-        COMMAND ${CMAKE_COMMAND} "-G${CMAKE_GENERATOR}" "-Ax64" ${GEN_ARGS} ${CONF_ARGS}
+        COMMAND ${CMAKE_COMMAND} "-G${CMAKE_GENERATOR}" ${GEN_ARGS} ${CONF_ARGS}
           -DCMAKE_INSTALL_PREFIX:PATH=${${lcName}_INSTALL_DIR}/${BUILD_CONFIG}
           -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
           -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
@@ -98,7 +101,7 @@
     endforeach()
   else()
     execute_process(
-      COMMAND ${CMAKE_COMMAND} "-G${CMAKE_GENERATOR}" "-Ax64" ${GEN_ARGS} ${CONF_ARGS}
+      COMMAND ${CMAKE_COMMAND} "-G${CMAKE_GENERATOR}" ${GEN_ARGS} ${CONF_ARGS}
         -DCMAKE_INSTALL_PREFIX:PATH=${${lcName}_INSTALL_DIR}
         -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
         -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}


fixed cryptopp build

fixed cryptopp build

--- cmake/cryptopp.cmake
+++ cmake/cryptopp.cmake
@@ -1,3 +1,20 @@
-add_subdirectory(cryptopp ${PROJECT_BINARY_DIR}/lib.obj)
 set(CRYPTOPP_INCLUDE_DIR ${PROJECT_SOURCE_DIR})
 set(CRYPTOPP_LIBRARY cryptopp-static)
+
+include(ExternalProject)
+
+MESSAGE("------------------------------------------------")
+MESSAGE("${CMAKE_CURRENT_BINARY_DIR}/lib.obj")
+message("make -C ${CMAKE_CURRENT_SOURCE_DIR}/cryptopp")
+
+ExternalProject_Add(
+  cryptopp
+  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cryptopp
+  CONFIGURE_COMMAND ""
+  INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/libcryptopp.a ${CMAKE_CURRENT_BINARY_DIR}/lib.obj
+  BUILD_COMMAND make -C ${CMAKE_CURRENT_SOURCE_DIR}/cryptopp
+#  BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/lib.obj
+  BUILD_IN_SOURCE 1
+  LOG_CONFIGURE 1
+  LOG_BUILD 1
+)


fix glew md5sum

fix glew md5sum

--- cmake/get-glew.cmake
+++ cmake/get-glew.cmake
@@ -16,7 +16,7 @@
       PREFIX              ${DEPENDENCY_EXTRACT_DIR}
       DOWNLOAD_DIR        ${DEPENDENCY_DOWNLOAD_DIR}
       URL                 https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0-win32.zip
-      URL_MD5             32a72e6b43367db8dbea6010cd095355
+      URL_MD5             1feddfe8696c192fa46a0df8eac7d4bf
       CONFIGURE_COMMAND   ""
       BUILD_COMMAND       ""
       INSTALL_COMMAND


cmake fix

cmake fix

--- cmake/gsConfig.cmake
+++ cmake/gsConfig.cmake
@@ -153,9 +153,9 @@
 elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
   # Note: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431
   # affects -Wno-ignored-attributes in Eigen
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -Wunused-variable -Wno-ignored-attributes")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -Wunused-variable")
   if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftrack-macro-expansion=0")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftrack-macro-expansion=0 -Wno-ignored-attributes")
   endif()
   if ("x${CMAKE_CXX_STANDARD}" STREQUAL "x98"
       AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.2)


FindMKL.cmake: add support for clang with generic omp

--- CMakeModules/FindMKL.cmake
+++ CMakeModules/FindMKL.cmake
@@ -323,7 +323,11 @@
 elseif(MKL_THREAD_LAYER STREQUAL "GNU OpenMP")
   find_package(OpenMP REQUIRED)
   find_mkl_library(NAME ThreadLayer LIBRARY_NAME mkl_gnu_thread SEARCH_STATIC)
-  set(MKL_ThreadingLibrary_LINK_LIBRARY ${OpenMP_gomp_LIBRARY})
+  if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+    set(MKL_ThreadingLibrary_LINK_LIBRARY ${OpenMP_omp_LIBRARY})
+  else()
+    set(MKL_ThreadingLibrary_LINK_LIBRARY ${OpenMP_gomp_LIBRARY})
+  endif()
   if(MKL_ThreadingLibrary_LINK_LIBRARY)
     mark_as_advanced(MKL_${mkl_args_NAME}_LINK_LIBRARY)
   endif()


Changed the version to 1.0

Changed the version to 1.0

--- CMakeModules/Version.cmake
+++ CMakeModules/Version.cmake
@@ -1,7 +1,7 @@
 #
 # Make a version file that includes the Forge version and git revision
 #
-SET(FG_VERSION "3.0")
+SET(FG_VERSION "1.0")
 SET(FG_VERSION_MINOR ".beta")
 EXECUTE_PROCESS(
     COMMAND git log -1 --format=%h


COMP: Update MinimalPathExtraction to remove warnings

Update to version that removes deprecated throw decorator for functions.
The throw decorator was deprecated in C++11.

--- Modules/Remote/MinimalPathExtraction.remote.cmake
+++ Modules/Remote/MinimalPathExtraction.remote.cmake
@@ -3,5 +3,5 @@
  "http://www.insight-journal.org/browse/publication/213
 "
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMinimalPathExtraction.git
-  GIT_TAG c00dbb883a44db59004210840d6c3f9deebaf92c
+  GIT_TAG 322e9338d76b7dcfb98861c6c22e5645806821d7
   )


Rectify the comment in the FindDirect3D CMake module. The purpose of the module is to find the Direct3D installation (not the DirectX itself). [ci skip]

--- CMake/Modules/FindDirect3D.cmake
+++ CMake/Modules/FindDirect3D.cmake
@@ -20,7 +20,7 @@
 # THE SOFTWARE.
 #

-# For MSVC compiler, find Microsoft DirectX installation (need June 2010 SDK or later, or a Windows SDK)
+# For MSVC compiler, find Microsoft Direct3D installation in Windows SDK or in June 2010 DirectX SDK or later
 # For MinGW compiler, assume MinGW not only comes with the necessary headers & libraries but also has the headers & libraries directories in its default search path
 # (use 'echo |$MINGW_PREFIX-gcc -v -E -' and '$MINGW_PREFIX-gcc -print-search-dirs', respectively, to double check)
 #


CI: fix cmake syntax

CI: fix cmake syntax

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