Improve CPPUNIT detection to avoid -ldl problem on link.

--- salome_adm/cmake_files/FindCppUnit.cmake
+++ salome_adm/cmake_files/FindCppUnit.cmake
@@ -37,26 +37,51 @@
     MESSAGE(STATUS "Looking for CppUnit ...")
 ENDIF()

-# Headers
+# Headers
+SET(CPPUNIT_ROOT_DIR $ENV{CPPUNIT_ROOT_DIR} CACHE PATH "Path to the CPPUNIT.")
+IF(CPPUNIT_ROOT_DIR)
+  LIST(APPEND CMAKE_INCLUDE_PATH "${CPPUNIT_ROOT_DIR}/include")
+  LIST(APPEND CMAKE_PROGRAM_PATH "${CPPUNIT_ROOT_DIR}/bin")
+ENDIF(CPPUNIT_ROOT_DIR)
+
 SET(CPPUNIT_INCLUDE_TO_FIND cppunit/extensions/HelperMacros.h)
 FIND_PATH(CPPUNIT_INCLUDE_DIRS ${CPPUNIT_INCLUDE_TO_FIND})

 # Libraries
-IF(WINDOWS)
+IF(WIN32)
   IF(CMAKE_BUILD_TYPE STREQUAL Debug)
     FIND_LIBRARY(CPPUNIT_LIBRARIES cppunitd_dll)
   ELSE(CMAKE_BUILD_TYPE STREQUAL Debug)
     FIND_LIBRARY(CPPUNIT_LIBRARIES cppunit_dll)
   ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
-ELSE(WINDOWS)
-  FIND_LIBRARY(CPPUNIT_LIBRARIES cppunit)
-ENDIF(WINDOWS)
+ELSE(WIN32)
+  FIND_PROGRAM(CPPUNIT_CONFIG_BIN cppunit-config)
+  IF(NOT CPPUNIT_CONFIG_BIN)
+    MESSAGE(FATAL_ERROR "Error in CPPUNIT detection ! cppunit-config executable not found !")
+  ENDIF(NOT CPPUNIT_CONFIG_BIN)
+  EXECUTE_PROCESS(COMMAND ${CPPUNIT_CONFIG_BIN} --libs OUTPUT_VARIABLE CPPUNIT_LDFLAGS)
+  STRING( REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" CPPUNIT_TMP4 "${CPPUNIT_LDFLAGS}" )
+  IF(CPPUNIT_TMP4)
+    STRING( REGEX REPLACE "^-L" "" CPPUNIT_LIBRARY_DIRS ${CPPUNIT_TMP4})
+    LIST(APPEND CMAKE_LIBRARY_PATH ${CPPUNIT_LIBRARY_DIRS})
+  ENDIF(CPPUNIT_TMP4)
+  STRING( REGEX MATCHALL "-l([^\", \n]+)" CPPUNIT_TMP5 "${CPPUNIT_LDFLAGS}" )
+  FOREACH(LIB ${CPPUNIT_TMP5})
+    STRING(REGEX REPLACE "^-l" "" LIB2 ${LIB})
+    FIND_LIBRARY(CPPUNIT_SUBLIB_${LIB2} ${LIB2})
+    IF(NOT CPPUNIT_SUBLIB_${LIB2})
+      MESSAGE(FATAL_ERROR "Error in CPPUNIT detection ! Fail to locate the needed library ${LIB2} !")
+    ENDIF(NOT CPPUNIT_SUBLIB_${LIB2})
+    LIST(APPEND CPPUNIT_LIBRARIES ${CPPUNIT_SUBLIB_${LIB2}})
+  ENDFOREACH(LIB ${CPPUNIT_TMP5})
+#  MESSAGE("**** ${CPPUNIT_LIBRARIES}")
+ENDIF(WIN32)

 # Global variables
 SET(CPPUNIT_DEFINITIONS)
-IF(WINDOWS)
+IF(WIN32)
   SET(CPPUNIT_DEFINITIONS -DCPPUNIT_DLL)
-ENDIF(WINDOWS)
+ENDIF(WIN32)

 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CppUnit REQUIRED_VARS CPPUNIT_INCLUDE_DIRS CPPUNIT_LIBRARIES)


Fix FW, support for multiple IMX378/477

Fix FW, support for multiple IMX378/477

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "f6926cb5bca9962ba690cea0f371b13baf2f18ec")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "52f663eab412836f604869b9a9b03f1a39dbb627")

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


Updated FW with SPI improvements

Updated FW with SPI improvements

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "30d8539b9a7b6b056cdb9d3deab5036542204dd2")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "b0ea2353a4a75cd9960e765c8c414101e22bfcad")

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


Disable builtin_vc as well if its requirements are unsatisfied

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1224,25 +1224,29 @@
   endif()
 endif()

-#---Check for vc and its compatibility-----------------------------------------------
-if(vc)
+#---Check for Vc compatibility-----------------------------------------------------------
+if(vc OR builtin_vc)
   if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
     if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5)
-      message(STATUS "VC requires GCC version >= 4.5; switching OFF 'vc' option")
+      message(STATUS "Vc requires GCC version >= 4.5; switching OFF 'vc' option")
       set(vc OFF CACHE BOOL "" FORCE)
+      set(builtin_vc OFF CACHE BOOL "" FORCE)
     endif()
   elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     if ( APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4)
-      message(STATUS "VC requires Apple Clang version >= 4.0; switching OFF 'vc' option")
+      message(STATUS "Vc requires Apple Clang version >= 4.0; switching OFF 'vc' option")
       set(vc OFF CACHE BOOL "" FORCE)
+      set(builtin_vc OFF CACHE BOOL "" FORCE)
     elseif (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1)
-      message(STATUS "VC requires Clang version >= 3.1; switching OFF 'vc' option")
+      message(STATUS "Vc requires Clang version >= 3.1; switching OFF 'vc' option")
       set(vc OFF CACHE BOOL "" FORCE)
+      set(builtin_vc OFF CACHE BOOL "" FORCE)
     endif()
   elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
     if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0)  # equivalent to MSVC 2010
-      message(STATUS "VC requires MSVC version >= 2011; switching OFF 'vc' option")
+      message(STATUS "Vc requires MSVC version >= 2011; switching OFF 'vc' option")
       set(vc OFF CACHE BOOL "" FORCE)
+      set(builtin_vc OFF CACHE BOOL "" FORCE)
     endif()
   endif()
 endif()


Propagate external Vc and VecCore include directories to rootcling

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1288,6 +1288,9 @@
       set(vc OFF CACHE BOOL "" FORCE)
     endif()
   endif()
+  if(Vc_FOUND)
+    set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES ${Vc_INCLUDE_DIR})
+  endif()
 endif()

 if(vc AND NOT Vc_FOUND)
@@ -1358,6 +1361,8 @@
   if(NOT VecCore_FOUND)
     message(STATUS "VecCore not found, switching on 'builtin_veccore' option.")
     set(builtin_veccore ON CACHE BOOL "" FORCE)
+  else()
+    set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES ${VecCore_INCLUDE_DIRS})
   endif()
 endif()


cmake: Use namespaced greentea client library

When using an exported or installed version of greentea, it's necessary
to use the greentea namespace.

--- tools/cmake/mbed_greentea.cmake
+++ tools/cmake/mbed_greentea.cmake
@@ -61,7 +61,7 @@
         list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS mbed-os)
     endif()

-    list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS greentea-client mbed-unity mbed-utest)
+    list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS greentea::client mbed-unity mbed-utest)

     target_link_libraries(${MBED_GREENTEA_TEST_NAME}
         PRIVATE


provide threaded essl library only

provide threaded essl library only

It's better to use threaded essl library on IBM AIX, could we have it please ?

Standard IBM AIX has both library types:
~~~
ilias@f01c10n02:~/work/qch/software/dirac/trunk/cmake/downloaded/.ar t /usr/lib/libesslsmp.a
essl.o
ilias@f01c10n02:~/work/qch/software/dirac/trunk/cmake/downloaded/.ar t /usr/lib/libessl.a
essl.o
ilias@f01c10n02:~/work/qch/software/dirac/trunk/cmake/downloaded/.
~~~

--- modules/math_libs.cmake
+++ modules/math_libs.cmake
@@ -88,8 +88,8 @@
    set(ESSL_BLAS_LIBS   esslsmp6464)
    set(ESSL_LAPACK_LIBS esslsmp6464)
 else()
-   set(ESSL_BLAS_LIBS   essl)
-   set(ESSL_LAPACK_LIBS essl)
+   set(ESSL_BLAS_LIBS   esslsmp)
+   set(ESSL_LAPACK_LIBS esslsmp)
 endif()

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


cmake: Update doxygen module.

cmake: Update doxygen module.

--- cmake/Modules/UseDoxygen.cmake
+++ cmake/Modules/UseDoxygen.cmake
@@ -2,9 +2,17 @@
 #
 # Adds a doxygen target that runs doxygen to generate the html
 # and optionally the LaTeX API documentation.
-# The doxygen target is added to the doc target as dependency.
+# The doxygen target is added to the doc target as a dependency.
 # i.e.: the API documentation is built with:
 #  make doc
+#
+# USAGE: GLOBAL INSTALL
+#
+# Install it with:
+#  cmake ./ && sudo make install
+# Add the following to the CMakeLists.txt of your project:
+#  include(UseDoxygen OPTIONAL)
+# Optionally copy Doxyfile.in in the directory of CMakeLists.txt and edit it.
 #
 # USAGE: INCLUDE IN PROJECT
 #
@@ -13,88 +21,124 @@
 # Add the Doxyfile.in and UseDoxygen.cmake files to the projects source directory.
 #
 #
+# CONFIGURATION
+#
+# To configure Doxygen you can edit Doxyfile.in and set some variables in cmake.
 # Variables you may define are:
-#  DOXYFILE_OUTPUT_DIR - Path where the Doxygen output is stored. Defaults to "doc".
-#
-#  DOXYFILE_LATEX_DIR - Directory where the Doxygen LaTeX output is stored. Defaults to "latex".
-#
-#  DOXYFILE_HTML_DIR - Directory where the Doxygen html output is stored. Defaults to "html".
+#  DOXYFILE_SOURCE_DIR - Path where the Doxygen input files are.
+#  	Defaults to the current source directory.
+#  DOXYFILE_EXTRA_SOURCES - Additional source diretories/files for Doxygen to scan.
+#  	The Paths should be in double quotes and separated by space. e.g.:
+#  	 "${CMAKE_CURRENT_BINARY_DIR}/foo.c" "${CMAKE_CURRENT_BINARY_DIR}/bar/"
+#
+#  DOXYFILE_OUTPUT_DIR - Path where the Doxygen output is stored.
+#  	Defaults to "${CMAKE_CURRENT_BINARY_DIR}/doc".
+#
+#  DOXYFILE_LATEX - ON/OFF; Set to "ON" if you want the LaTeX documentation
+#  	to be built.
+#  DOXYFILE_LATEX_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where
+#  	the Doxygen LaTeX output is stored. Defaults to "latex".
+#
+#  DOXYFILE_HTML_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where
+#  	the Doxygen html output is stored. Defaults to "html".
 #

 #
-#  Copyright (c) 2009-2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
-#  Copyright (c) 2010      Andreas Schneider <asn@cryptomilk.org>
+#  Copyright (c) 2009, 2010, 2011 Tobias Rautenkranz <tobias@rautenkranz.ch>
 #
 #  Redistribution and use is allowed according to the terms of the New
 #  BSD license.
 #  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 #

-macro(usedoxygen_set_default name value)
-    if(NOT DEFINED "${name}")
-        set("${name}" "${value}")
-    endif()
+macro(usedoxygen_set_default name value type docstring)
+	if(NOT DEFINED "${name}")
+		set("${name}" "${value}" CACHE "${type}" "${docstring}")
+	endif()
 endmacro()

 find_package(Doxygen)

 if(DOXYGEN_FOUND)
-    find_file(DOXYFILE_IN
-        NAMES
-            doxy.config.in
-        PATHS
-            ${CMAKE_CURRENT_SOURCE_DIR}
-            ${CMAKE_ROOT}/Modules/
-        NO_DEFAULT_PATH)
-    include(FindPackageHandleStandardArgs)
-    find_package_handle_standard_args(DOXYFILE_IN DEFAULT_MSG "DOXYFILE_IN")
+	find_file(DOXYFILE_IN "Doxyfile.in"
+			PATHS "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_ROOT}/Modules/"
+			NO_DEFAULT_PATH
+			DOC "Path to the doxygen configuration template file")
+	set(DOXYFILE "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+	include(FindPackageHandleStandardArgs)
+	find_package_handle_standard_args(DOXYFILE_IN DEFAULT_MSG "DOXYFILE_IN")
 endif()

 if(DOXYGEN_FOUND AND DOXYFILE_IN_FOUND)
-    add_custom_target(doxygen ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxy.config)
+	usedoxygen_set_default(DOXYFILE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc"
+		PATH "Doxygen output directory")
+	usedoxygen_set_default(DOXYFILE_HTML_DIR "html"
+		STRING "Doxygen HTML output directory")
+	usedoxygen_set_default(DOXYFILE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
+		PATH "Input files source directory")
+	usedoxygen_set_default(DOXYFILE_EXTRA_SOURCE_DIRS ""
+		STRING "Additional source files/directories separated by space")
+	set(DOXYFILE_SOURCE_DIRS "\"${DOXYFILE_SOURCE_DIR}\" ${DOXYFILE_EXTRA_SOURCES}")

-    usedoxygen_set_default(DOXYFILE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
-    usedoxygen_set_default(DOXYFILE_HTML_DIR "html")
+	usedoxygen_set_default(DOXYFILE_LATEX YES BOOL "Generate LaTeX API documentation" OFF)
+	usedoxygen_set_default(DOXYFILE_LATEX_DIR "latex" STRING "LaTex output directory")

-    set_property(DIRECTORY APPEND PROPERTY
-            ADDITIONAL_MAKE_CLEAN_FILES "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_HTML_DIR}")
+	mark_as_advanced(DOXYFILE_OUTPUT_DIR DOXYFILE_HTML_DIR DOXYFILE_LATEX_DIR
+		DOXYFILE_SOURCE_DIR DOXYFILE_EXTRA_SOURCE_DIRS DOXYFILE_IN)

-    set(DOXYFILE_LATEX FALSE)
-    set(DOXYFILE_PDFLATEX FALSE)
-    set(DOXYFILE_DOT FALSE)

-    #find_package(LATEX)
-    #if(LATEX_COMPILER AND MAKEINDEX_COMPILER)
-    #    set(DOXYFILE_LATEX TRUE)
-    #    usedoxygen_set_default(DOXYFILE_LATEX_DIR "latex")
-    #
-    #    set_property(DIRECTORY APPEND PROPERTY
-    #            ADDITIONAL_MAKE_CLEAN_FILES
-    #            "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
-    #
-    #    if(PDFLATEX_COMPILER)
-    #        set(DOXYFILE_PDFLATEX TRUE)
-    #    endif()
-    #    if(DOXYGEN_DOT_EXECUTABLE)
-    #        set(DOXYFILE_DOT TRUE)
-    #    endif()
-    #
-    #    add_custom_command(TARGET doxygen
-    #        POST_BUILD
-    #        COMMAND ${CMAKE_MAKE_PROGRAM}
-    #        WORKING_DIRECTORY "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
-    #endif()
+	set_property(DIRECTORY
+		APPEND PROPERTY
+		ADDITIONAL_MAKE_CLEAN_FILES
+		"${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_HTML_DIR}")

-    configure_file(${DOXYFILE_IN} ${CMAKE_CURRENT_BINARY_DIR}/doxy.config ESCAPE_QUOTES IMMEDIATE @ONLY)
-    if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doxy.trac.in)
-        configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxy.trac.in ${CMAKE_CURRENT_BINARY_DIR}/doxy.trac ESCAPE_QUOTES IMMEDIATE @ONLY)
-        add_custom_target(doxygen-trac ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxy.trac)
-    endif()
+	add_custom_target(doxygen
+		COMMAND "${DOXYGEN_EXECUTABLE}"
+			"${DOXYFILE}"
+		COMMENT "Writing documentation to ${DOXYFILE_OUTPUT_DIR}..."
+		WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")

-    get_target_property(DOC_TARGET doc TYPE)
-    if(NOT DOC_TARGET)
-        add_custom_target(doc)
-    endif()
+	set(DOXYFILE_DOT "NO")
+	if(DOXYGEN_DOT_EXECUTABLE)
+		set(DOXYFILE_DOT "YES")
+	endif()

-    add_dependencies(doc doxygen)
+	## LaTeX
+	set(DOXYFILE_PDFLATEX "NO")
+
+	set_property(DIRECTORY APPEND PROPERTY
+		ADDITIONAL_MAKE_CLEAN_FILES
+		"${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
+
+	if(DOXYFILE_LATEX STREQUAL "ON")
+		set(DOXYFILE_GENERATE_LATEX "YES")
+		find_package(LATEX)
+		find_program(DOXYFILE_MAKE make)
+		mark_as_advanced(DOXYFILE_MAKE)
+		if(LATEX_COMPILER AND MAKEINDEX_COMPILER AND DOXYFILE_MAKE)
+			if(PDFLATEX_COMPILER)
+				set(DOXYFILE_PDFLATEX "YES")
+			endif()
+
+			add_custom_command(TARGET doxygen
+				POST_BUILD
+				COMMAND "${DOXYFILE_MAKE}"
+				COMMENT	"Running LaTeX for Doxygen documentation in ${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}..."
+				WORKING_DIRECTORY "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
+		else()
+			set(DOXYGEN_LATEX "NO")
+		endif()
+	else()
+		set(DOXYFILE_GENERATE_LATEX "NO")
+	endif()
+
+
+	configure_file("${DOXYFILE_IN}" "${DOXYFILE}" @ONLY)
+
+	get_target_property(DOC_TARGET doc TYPE)
+	if(NOT DOC_TARGET)
+		add_custom_target(doc)
+	endif()
+
+	add_dependencies(doc doxygen)
 endif()


Working on new release...

Working on new release...

--- cmake/PropellerToolchain.cmake
+++ cmake/PropellerToolchain.cmake
@@ -15,13 +15,13 @@

 # Inspired By: https://github.com/queezythegreat/arduino-cmake #################

-set(CMAKE_SYSTEM_NAME Propeller)
+set(CMAKE_SYSTEM_NAME "Propeller")

-set(CMAKE_C_COMPILER propeller-elf-gcc)
-set(CMAKE_CXX_COMPILER propeller-elf-g++)
+set(CMAKE_C_COMPILER "propeller-elf-gcc")
+set(CMAKE_CXX_COMPILER "propeller-elf-g++")

-if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/Platform/Propeller.cmake)
-    list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/Platform/Propeller.cmake")
+    list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
 endif()

 if(WIN32)
@@ -30,12 +30,16 @@
     include(Platform/UnixPaths)
     if(APPLE)
         list(APPEND CMAKE_SYSTEM_PREFIX_PATH
-        ~/Applications /Applications /Developer/Applications /sw /opt/local)
+        "~/Applications"
+        "/Applications"
+        "/Developer/Applications"
+        "/sw"
+        "/opt/local")
     endif()
 endif()

 if(PROPELLER_SDK_PATH)
-    list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROPELLER_SDK_PATH}/propeller-gcc)
+    list(APPEND CMAKE_SYSTEM_PREFIX_PATH "${PROPELLER_SDK_PATH}/propeller-gcc")
 else()
     message(FATAL_ERROR "PROPELLER_SDK_PATH not defined!")
 endif()


Add additional CMake check for PulseAudio support.

Problem was that our code needs the method enable() in Phonon's
pulsesupport.h. Now we check for the presence of this method before
enabling PulseAudio support.

--- cmake/modules/FindPhonon.cmake
+++ cmake/modules/FindPhonon.cmake
@@ -44,6 +44,12 @@
       set(PHONON_FOUND TRUE)
       _phonon_find_version()
       find_path(PHONON_PULSESUPPORT NAMES phonon/pulsesupport.h PATHS ${PHONON_INCLUDES})
+
+      # Check if the method enable() is available in pulsesupport.h
+      file(READ ${_phonon_namespace_header_file} _pulsesupport_header)
+      string(REGEX MATCH "void enable" _phonon_pulse_match "${_pulsesupport_header}")
+      set(PHONON_PULSESUPPORT "${CMAKE_MATCH_1}")
+
    else(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
       set(PHONON_FOUND FALSE)
    endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)


Drop code for warning about missing call to generate dictionary

Now that the dictionary target is often created after the library
target, and the order doesn't really matter anymore, this check is
no longer useful.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -775,12 +775,6 @@

   if(TARGET G__${library})
     add_dependencies(${library} G__${library})
-  else()
-    # Uncomment to see if we maybe forgot to add a dependency between linking
-    # a dictionary and generating the G__*.cxx file. We can't have this by
-    # default because right now quite few dictionaries don't have the associated
-    # ROOT_GENERATE_DICTIONARY call that prevents this warning.
-    #message(AUTHOR_WARNING "Couldn't find target: " ${library} "\n Forgot to call ROOT_GENERATE_DICTIONARY?")
   endif()
   if(CMAKE_PROJECT_NAME STREQUAL ROOT)
     add_dependencies(${library} move_headers)


Revert "[modules] Do not offer header files from two different locations."

This reverts commit 9cc395ab1616337d3dc97054a9811b14fdf60f61.

This was not actually fixing the issue and we have better fix for this issue in
the next commit.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -822,28 +822,22 @@
 #---------------------------------------------------------------------------------------------------
 function(ROOT_ADD_INCLUDE_DIRECTORIES library)
   if(PROJECT_NAME STREQUAL "ROOT")
-    # Currently the *non-runtime_cxxmodules* are wired to the $ROOTSYS/include.
-    # When we have blah/inc and $ROOTSYS/include and we resolve a header file
-    # from the former, we hit redefinition errors if a module was already
-    # activated from a header in the latter.
-    if (NOT cxxmodules)
-      if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc)
-        target_include_directories(${library}
-          PRIVATE
-            ${CMAKE_CURRENT_SOURCE_DIR}/inc
-          INTERFACE
-            $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
-        )
-      endif()
-
-      if(root7 AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/v7/inc)
-        target_include_directories(${library}
-          PRIVATE
-            ${CMAKE_CURRENT_SOURCE_DIR}/v7/inc
-          INTERFACE
-            $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/v7/inc>
-        )
-      endif()
+    if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc)
+      target_include_directories(${library}
+        PRIVATE
+          ${CMAKE_CURRENT_SOURCE_DIR}/inc
+        INTERFACE
+          $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
+      )
+    endif()
+
+    if(root7 AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/v7/inc)
+      target_include_directories(${library}
+        PRIVATE
+          ${CMAKE_CURRENT_SOURCE_DIR}/v7/inc
+        INTERFACE
+          $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/v7/inc>
+      )
     endif()

     if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res)


allow parallel build for netgen subproject

--- cmake_modules/SuperBuild.cmake
+++ cmake_modules/SuperBuild.cmake
@@ -132,13 +132,19 @@
   INTEL_MIC
   )

+if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
+  set(NETGEN_BUILD_COMMAND $(MAKE) --silent )
+else()
+  set(NETGEN_BUILD_COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/netgen --config ${CMAKE_BUILD_TYPE})
+endif()
+
 ExternalProject_Add (netgen
   DEPENDS ${NETGEN_DEPENDENCIES}
   SOURCE_DIR ${PROJECT_SOURCE_DIR}
   CMAKE_ARGS -DUSE_SUPERBUILD=OFF ${NETGEN_CMAKE_ARGS} -DCMAKE_PREFIX_PATH=${INSTALL_DIR}
   INSTALL_COMMAND ""
   BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/netgen
-  BUILD_COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/netgen --config ${CMAKE_BUILD_TYPE}
+  BUILD_COMMAND ${NETGEN_BUILD_COMMAND}
   STEP_TARGETS build
 )


Fixed cmake install licenses bug

Fixed cmake install licenses bug

--- cmake/InstallFAST.cmake
+++ cmake/InstallFAST.cmake
@@ -275,18 +275,16 @@
 		COMPONENT fast
 )
 # Install licenses
-if(EXISTS ${PROJECT_BINARY_DIR}/licenses)
 install(DIRECTORY ${PROJECT_BINARY_DIR}/licenses/
+	OPTIONAL
 	DESTINATION fast/licenses
-        COMPONENT fast
-)
-endif()
-if(EXISTS ${PROJECT_BINARY_DIR}/licences)
+	COMPONENT fast
+)
 install(DIRECTORY ${PROJECT_BINARY_DIR}/licences/
+	OPTIONAL
 	DESTINATION fast/licenses
-        COMPONENT fast
-)
-endif()
+	COMPONENT fast
+)
 if(FAST_MODULE_OpenVINO)
 	if(WIN32)
 		install(FILES ${PROJECT_BINARY_DIR}/bin/plugins.xml


CMake: Added util function to suppress warnings on all target in directory


[numerics] fix typos

[numerics] fix typos

--- cmake/tools4tests.cmake
+++ cmake/tools4tests.cmake
@@ -542,7 +542,7 @@
   STRING(CONCAT TEST_NAME ${TEST_NAME_PREFIX} "_" ${TEST_COLLECTION})

   STRING(TOLOWER ${TEST_NAME} TEST_NAME)
-  CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/numerics/src/RELAY/test/${SOURCE_FILE_NAME}
+  CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/numerics/src/Relay/test/${SOURCE_FILE_NAME}
     ${CMAKE_CURRENT_BINARY_DIR}/${_CURRENT_TEST_DIRECTORY}/${TEST_NAME}.c)

   SET(${TEST_NAME}_FSOURCES)


update mosek external

update mosek external


Add various information

Add various information

--- test/base_test.cmake
+++ test/base_test.cmake
@@ -14,6 +14,7 @@
 set (XMOD_DIR __xmod__)
 set (OMNI_TMP_DIR __omni_tmp__)

+# Directory where OMNI xmod files will be placed
 if (NOT EXISTS ${XMOD_DIR})
   file(MAKE_DIRECTORY ${XMOD_DIR})
 endif()
@@ -37,16 +38,19 @@
   )
 endif()

+# Target for the transformation
 add_custom_target(
   transform-${TEST_NAME}
   DEPENDS ${OUTPUT_FILE} ${EXECUTABLE_ORIGINAL} ${EXECUTABLE_TRANSFORMED}
 )

+# Target to clean the generated file (Output of clawfc)
 add_custom_target(
   clean-${TEST_NAME}
   COMMAND rm -f ${OUTPUT_FILE}
 )

+# Add target to the global build/clean target
 add_dependencies(${BUILD_TEST_TARGET} transform-${TEST_NAME})
 add_dependencies(${CLEAN_TEST_TARGET} clean-${TEST_NAME})

@@ -66,6 +70,7 @@
     add_test(NAME compare-output-${TEST_NAME} COMMAND bash -c "diff ${TEST_PARAMETERS}")
   endif()
 endif()
+
 # Add build directory to be removed with clean target
 set_property(
   DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}


update: decrese compiler verbosity

update: decrese compiler verbosity

--- share/hugh/cmake/compiler/clang.cmake
+++ share/hugh/cmake/compiler/clang.cmake
@@ -10,6 +10,7 @@

 set(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -fdiagnostics-show-option")
 set(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -ferror-limit=5")
+set(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -Wno-missing-braces")

 if(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "3.0")
   set(GLOBAL_COMPILER_FLAGS "-std=c++11 ${GLOBAL_COMPILER_FLAGS}")


Make it possible to easily override OXYGEN_DEBUG in any cpp file

--- config.h.cmake
+++ config.h.cmake
@@ -2,7 +2,9 @@
 #define __CONFIG_H__

 #define GTK_THEME_DIR "@GTK_THEME_DIR@/gtk-2.0"
-#define OXYGEN_DEBUG @OXYGEN_DEBUG@
+#ifndef OXYGEN_DEBUG
+#   define OXYGEN_DEBUG @OXYGEN_DEBUG@
+#endif
 #define OXYGEN_ICON_HACK @OXYGEN_ICON_HACK@
 #define OXYGEN_FORCE_KDE_ICONS_AND_FONTS @OXYGEN_FORCE_KDE_ICONS_AND_FONTS@
 #define HAVE_DBUS @HAVE_DBUS@


COMP (#3983): rename the variable for defining mocable files in files.cmake

--- CMake/CoreHelpers.cmake
+++ CMake/CoreHelpers.cmake
@@ -377,14 +377,12 @@
 MACRO(MITK_CREATE_MODULE_TESTS)
 MACRO_PARSE_ARGUMENTS(MODULE_TEST "EXTRA_DRIVER_INIT;EXTRA_DRIVER_INCLUDE" "" ${ARGN})
 IF(BUILD_TESTING AND MODULE_IS_ENABLED)
-  SET(OLD_MOC_H_FILES ${MOC_H_FILES})
-  SET(MOC_H_FILES)
   INCLUDE(files.cmake)
   INCLUDE_DIRECTORIES(.)

-  IF(DEFINED MOC_H_FILES)
-    QT4_WRAP_CPP(MODULE_TEST_GENERATED_MOC_CPP ${MOC_H_FILES})
-  ENDIF(DEFINED MOC_H_FILES)
+  IF(DEFINED MODULE_TEST_MOC_H_FILES)
+    QT4_WRAP_CPP(MODULE_TEST_GENERATED_MOC_CPP ${MODULE_TEST_MOC_H_FILES})
+  ENDIF(DEFINED MODULE_TEST_MOC_H_FILES)

   SET(CMAKE_TESTDRIVER_BEFORE_TESTMAIN "mitk::LogBackend::Register(); ${MODULE_TEST_EXTRA_DRIVER_INIT};")
   SET(CMAKE_TESTDRIVER_AFTER_TESTMAIN "mitk::LogBackend::Unregister();")


STYLE: indentation

STYLE: indentation

--- CMake/CoreHelpers.cmake
+++ CMake/CoreHelpers.cmake
@@ -30,7 +30,7 @@
       STRING(REGEX REPLACE "(.*)\\.(txx|cpp|c|cxx)$" "\\1.h" H_FILE ${_file})
       IF(EXISTS ${H_FILE})
         LIST(APPEND CORRESPONDING__H_FILES "${H_FILE}")
-  	  ENDIF()
+      ENDIF()
     ENDFOREACH()
   ELSE()
     FILE(GLOB_RECURSE GLOBBED__H_FILES *.h)
@@ -208,37 +208,37 @@

     IF(NOT MODULE_QT_MODULE)
       ORGANIZE_SOURCES(SOURCE ${CPP_FILES}
-		       HEADER	${H_FILES}
-					   TXX ${TXX_FILES}
-					   DOC ${DOX_FILES}
-					   )
+           HEADER  ${H_FILES}
+             TXX ${TXX_FILES}
+             DOC ${DOX_FILES}
+             )

       IF(MODULE_FORCE_STATIC)
-	SET(_STATIC ${MITK_WIN32_FORCE_STATIC})
+  SET(_STATIC ${MITK_WIN32_FORCE_STATIC})
       ENDIF(MODULE_FORCE_STATIC)

       IF(NOT MODULE_HEADERS_ONLY)
-	IF(ALL_LIBRARIES)
+  IF(ALL_LIBRARIES)
     # LINK_DIRECTORIES applies only to targets which are added after the call to LINK_DIRECTORIES
     LINK_DIRECTORIES(${ALL_LIBRARY_DIRS})
-	ENDIF(ALL_LIBRARIES)
-	ADD_LIBRARY(${MODULE_PROVIDES} ${_STATIC} ${CPP_FILES} ${H_FILES} ${CPP_FILES_GENERATED} ${GLOBBED__H_FILES} ${CORRESPONDING__H_FILES} ${TXX_FILES} ${DOX_FILES} ${UI_FILES} ${TOOL_CPPS})
-	IF(ALL_LIBRARIES)
-	  TARGET_LINK_LIBRARIES(${MODULE_PROVIDES} ${ALL_LIBRARIES})
-	ENDIF(ALL_LIBRARIES)
+  ENDIF(ALL_LIBRARIES)
+  ADD_LIBRARY(${MODULE_PROVIDES} ${_STATIC} ${CPP_FILES} ${H_FILES} ${CPP_FILES_GENERATED} ${GLOBBED__H_FILES} ${CORRESPONDING__H_FILES} ${TXX_FILES} ${DOX_FILES} ${UI_FILES} ${TOOL_CPPS})
+  IF(ALL_LIBRARIES)
+    TARGET_LINK_LIBRARIES(${MODULE_PROVIDES} ${ALL_LIBRARIES})
+  ENDIF(ALL_LIBRARIES)
       ENDIF()
-
+
     ELSE(NOT MODULE_QT_MODULE)

       INCLUDE(files.cmake)

     IF(UI_FILES)
-	QT4_WRAP_UI(Q${KITNAME}_GENERATED_UI_CPP ${UI_FILES})
+  QT4_WRAP_UI(Q${KITNAME}_GENERATED_UI_CPP ${UI_FILES})
     ENDIF(UI_FILES)

     IF(MOC_H_FILES)
-	QT4_WRAP_CPP(Q${KITNAME}_GENERATED_MOC_CPP ${MOC_H_FILES})
+  QT4_WRAP_CPP(Q${KITNAME}_GENERATED_MOC_CPP ${MOC_H_FILES})
     ENDIF(MOC_H_FILES)

     IF(QRC_FILES)
@@ -248,14 +248,14 @@
     SET(Q${KITNAME}_GENERATED_CPP ${Q${KITNAME}_GENERATED_CPP} ${Q${KITNAME}_GENERATED_UI_CPP} ${Q${KITNAME}_GENERATED_MOC_CPP} ${Q${KITNAME}_GENERATED_QRC_CPP})

     ORGANIZE_SOURCES(SOURCE ${CPP_FILES}
-		     HEADER ${H_FILES}
-				     TXX ${TXX_FILES}
-				     DOC ${DOX_FILES}
-		     UI ${UI_FILES}
-		     QRC ${QRC_FILES}
-				     MOC ${Q${KITNAME}_GENERATED_MOC_CPP}
-				     GEN_QRC ${Q${KITNAME}_GENERATED_QRC_CPP}
-				     GEN_UI ${Q${KITNAME}_GENERATED_UI_CPP})
+         HEADER ${H_FILES}
+             TXX ${TXX_FILES}
+             DOC ${DOX_FILES}
+         UI ${UI_FILES}
+         QRC ${QRC_FILES}
+             MOC ${Q${KITNAME}_GENERATED_MOC_CPP}
+             GEN_QRC ${Q${KITNAME}_GENERATED_QRC_CPP}
+             GEN_UI ${Q${KITNAME}_GENERATED_UI_CPP})

     # MITK_GENERATE_TOOLS_LIBRARY(Qmitk${LIBPOSTFIX} "NO")

@@ -270,7 +270,7 @@
     # install only if shared lib (for now)
     IF(NOT MODULE_FORCE_STATIC OR MINGW)
       IF(NOT MODULE_HEADERS_ONLY)
-	MITK_INSTALL_TARGETS(${MODULE_PROVIDES})
+        MITK_INSTALL_TARGETS(${MODULE_PROVIDES})
       ENDIF()
     ENDIF(NOT MODULE_FORCE_STATIC OR MINGW)
   ENDIF(NOT MODULE_QT_MODULE OR MITK_USE_QT)
@@ -332,14 +332,14 @@
   WHILE(NOT "${DEPENDS}" STREQUAL "${DEPENDS_BEFORE}")
     SET(DEPENDS_BEFORE ${DEPENDS})
     FOREACH(dependency ${DEPENDS})
-	  IF(EXISTS "${MITK_MODULES_CONF_DIR}/${dependency}Config.cmake")
-      INCLUDE(${MITK_MODULES_CONF_DIR}/${dependency}Config.cmake)
-      LIST(APPEND DEPENDS ${${dependency}_DEPENDS})
-      LIST(APPEND PACKAGE_DEPENDS ${${dependency}_PACKAGE_DEPENDS})
-	  ELSE(EXISTS "${MITK_MODULES_CONF_DIR}/${dependency}Config.cmake")
+      IF(EXISTS "${MITK_MODULES_CONF_DIR}/${dependency}Config.cmake")
+        INCLUDE(${MITK_MODULES_CONF_DIR}/${dependency}Config.cmake)
+        LIST(APPEND DEPENDS ${${dependency}_DEPENDS})
+        LIST(APPEND PACKAGE_DEPENDS ${${dependency}_PACKAGE_DEPENDS})
+      ELSE(EXISTS "${MITK_MODULES_CONF_DIR}/${dependency}Config.cmake")
         LIST(APPEND ${RESULT_VAR} ${dependency})
-		LIST(REMOVE_DUPLICATES ${RESULT_VAR})
-	  ENDIF(EXISTS "${MITK_MODULES_CONF_DIR}/${dependency}Config.cmake")
+        LIST(REMOVE_DUPLICATES ${RESULT_VAR})
+      ENDIF(EXISTS "${MITK_MODULES_CONF_DIR}/${dependency}Config.cmake")
     ENDFOREACH(dependency)
     LIST(REMOVE_DUPLICATES DEPENDS)
     LIST(REMOVE_DUPLICATES PACKAGE_DEPENDS)


Add boost to wasm include_directories for code insight to work

--- CMakeModules/wasm.cmake
+++ CMakeModules/wasm.cmake
@@ -71,10 +71,6 @@
     if ("${ARG_SYSTEM_INCLUDE_FOLDERS}" STREQUAL "")
        set (ARG_SYSTEM_INCLUDE_FOLDERS ${DEFAULT_SYSTEM_INCLUDE_FOLDERS})
     endif()
-    foreach(folder ${ARG_SYSTEM_INCLUDE_FOLDERS})
-       list(APPEND WASM_COMMAND -isystem ${folder})
-    endforeach()
-
     foreach(folder ${ARG_SYSTEM_INCLUDE_FOLDERS})
        list(APPEND WASM_COMMAND -isystem ${folder})
     endforeach()
@@ -201,7 +197,11 @@
   set(extra_target_dependency)

   # For CLion code insight
-  include_directories(..)
+  foreach(folder ${ARG_INCLUDE_FOLDERS})
+    include_directories(${folder})
+  endforeach()
+  include_directories(${Boost_INCLUDE_DIR})
+
   if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${target}.hpp)
     set(HEADER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${target}.hpp)
   endif()


s/EIGEN_WORK_DIRECTORY/EIGEN_WORK_DIR in testsuite script

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -19,27 +19,32 @@
 #        <arch> = i386, x86_64, ia64, powerpc, etc.
 #        <compiler-version> = gcc-4.3.2, icc-11.0, MSVC-2008, etc.
 #  - EIGEN_EXPLICIT_VECTORIZATION: novec, SSE2, Altivec
-#      default: SSE2 for x86_64 systems, novec otherwise
+#       default: SSE2 for x86_64 systems, novec otherwise
+#       Its value is automatically appended to EIGEN_BUILD_STRING
 #  - EIGEN_CMAKE_DIR: path to cmake executable
 #  - EIGEN_MODE: dashboard model, can be Experimental, Nightly, or Continuous
 #      default: Nightly
-#  - EIGEN_WORK_DIRECTORY: directory used to download the source files and make the builds
+#  - EIGEN_WORK_DIR: directory used to download the source files and make the builds
 #      default: folder which contains this script
 #  - CTEST_SOURCE_DIRECTORY: path to eigen's src (use a new and empty folder, not the one you are working on)
-#      default: <EIGEN_WORK_DIRECTORY>/src
+#      default: <EIGEN_WORK_DIR>/src
 #  - CTEST_BINARY_DIRECTORY: build directory
-#      default: <EIGEN_WORK_DIRECTORY>/nightly-<EIGEN_CXX>
+#      default: <EIGEN_WORK_DIR>/nightly-<EIGEN_CXX>
 #
 # Here is an example running several compilers on a linux system:
 # #!/bin/bash
-# EIGEN_ARCH=`uname -m`
-# EIGEN_SITE=`hostname`
-# EIGEN_OS_VERSION=opensuse-11.1
-# COMMON=/home/gael/Coding/eigen2/test/testsuite.cmake,EIGEN_WORK_DIRECTORY=/home/gael/Coding/eigen2/cdash,EIGEN_SITE=$EIGEN_SITE,EIGEN_MODE=$1,EIGEN_BUILD_STRING=$EIGEN_OS_VERSION-$EIGEN_ARCH
-# ctest -S $COMMON-gcc-3.4.6,EIGEN_CXX=g++-3.4
-# ctest -S $COMMON-gcc-4.0.1,EIGEN_CXX=g++-4.0.1
-# ctest -S $COMMON-gcc-4.3.2,EIGEN_CXX=g++-4.3
-# ctest -S $COMMON-icc-11.0,EIGEN_CXX=icpc
+# ARCH=`uname -m`
+# SITE=`hostname`
+# VERSION=opensuse-11.1
+# WORK_DIR=/home/gael/Coding/eigen2/cdash
+# # get the last version of the script
+# svn cat svn://anonsvn.kde.org/home/kde/trunk/kdesupport/eigen2/test/testsuite.cmake > $WORK_DIR/testsuite.cmake
+# COMMON="ctest -S $WORK_DIR/testsuite.cmake,EIGEN_WORK_DIR=$WORK_DIR,EIGEN_SITE=$SITE,EIGEN_MODE=$1,EIGEN_BUILD_STRING=$OS_VERSION-$ARCH"
+# $COMMON-gcc-3.4.6,EIGEN_CXX=g++-3.4
+# $COMMON-gcc-4.0.1,EIGEN_CXX=g++-4.0.1
+# $COMMON-gcc-4.3.2,EIGEN_CXX=g++-4.3,EIGEN_EXPLICIT_VECTORIZATION=novec
+# $COMMON-gcc-4.3.2,EIGEN_CXX=g++-4.3,EIGEN_EXPLICIT_VECTORIZATION=SSE2
+# $COMMON-icc-11.0,EIGEN_CXX=icpc
 #
 ####################################################################

@@ -90,17 +95,7 @@
   # let's try to find all information we need to make the build string ourself

   # OS
-#   if(CYGWIN)
-#     SET(EIGEN_OS_VERSION cygwin)
-#   elseif(WIN32)
-#     SET(EIGEN_OS_VERSION windows)
-#   elseif(UNIX)
-#     SET(EIGEN_OS_VERSION unix)
-#   elseif(APPLE)
-#     SET(EIGEN_OS_VERSION osx)
-#   else(CYGWIN)
-    build_name(EIGEN_OS_VERSION)
-#   endif(CYGWIN)
+  build_name(EIGEN_OS_VERSION)

   # arch
   set(EIGEN_ARCH ${CMAKE_SYSTEM_PROCESSOR})
@@ -118,16 +113,16 @@
   set(EIGEN_BUILD_STRING ${EIGEN_BUILD_STRING}-${EIGEN_EXPLICIT_VECTORIZATION})
 endif(DEFINED EIGEN_EXPLICIT_VECTORIZATION)

-if(NOT EIGEN_WORK_DIRECTORY)
-  set(EIGEN_WORK_DIRECTORY ${CTEST_SCRIPT_DIRECTORY})
-endif(NOT EIGEN_WORK_DIRECTORY)
+if(NOT EIGEN_WORK_DIR)
+  set(EIGEN_WORK_DIR ${CTEST_SCRIPT_DIRECTORY})
+endif(NOT EIGEN_WORK_DIR)

 if(NOT CTEST_SOURCE_DIRECTORY)
-  SET (CTEST_SOURCE_DIRECTORY "${EIGEN_WORK_DIRECTORY}/src")
+  SET (CTEST_SOURCE_DIRECTORY "${EIGEN_WORK_DIR}/src")
 endif(NOT CTEST_SOURCE_DIRECTORY)

 if(NOT CTEST_BINARY_DIRECTORY)
-  SET (CTEST_BINARY_DIRECTORY "${EIGEN_WORK_DIRECTORY}/nightly_${EIGEN_CXX}")
+  SET (CTEST_BINARY_DIRECTORY "${EIGEN_WORK_DIR}/nightly_${EIGEN_CXX}")
 endif(NOT CTEST_BINARY_DIRECTORY)

 if(NOT EIGEN_MODE)


improved a bit the testsuite script

improved a bit the testsuite script

--HG--
extra : convert_revision : svn%3A283d02a7-25f6-0310-bc7c-ecb5cbfe19da/trunk/kdesupport/eigen2%40910105

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -158,7 +158,7 @@

 # this is the initial cache to use for the binary tree, be careful to escape
 # any quotes inside of this string if you use it
-if(WIN32)
+if(WIN32 AND NOT CYGWIN)
   #message(SEND_ERROR "win32")
   set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -G \"NMake Makefiles\" -DCMAKE_MAKE_PROGRAM=nmake")
   SET (CTEST_INITIAL_CACHE "
@@ -168,21 +168,12 @@
     BUILDNAME:STRING=${EIGEN_BUILD_STRING}
     SITE:STRING=${EIGEN_SITE}
   ")
-else(WIN32)
+else(WIN32 AND NOT CYGWIN)
   SET (CTEST_INITIAL_CACHE "
     BUILDNAME:STRING=${EIGEN_BUILD_STRING}
     SITE:STRING=${EIGEN_SITE}
   ")
-endif(WIN32)
-
-# MAKECOMMAND:STRING=nmake -i
-# CMAKE_MAKE_PROGRAM:FILEPATH=make
-# CMAKE_GENERATOR:INTERNAL=Makefiles
-SET (CTEST_INITIAL_CACHE "
-  BUILDNAME:STRING=opensuse-11_1-x86_64-${EIGEN_CXX}
-  SITE:STRING=pc-gael
-  CVSCOMMAND:FILEPATH=/usr/bin/svn"
-)
+endif(WIN32 AND NOT CYGWIN)

 # set any extra environment variables to use during the execution of the script here:


Apply formating when clang fixing

Apply formating when clang fixing

--- source/cmake_modules/EnableClangTidy.cmake
+++ source/cmake_modules/EnableClangTidy.cmake
@@ -42,7 +42,7 @@

     add_custom_target(
         tidy_fix
-        COMMAND ${RUN_CLANG_TIDY_BIN} -fix ${RUN_CLANG_TIDY_BIN_ARGS}
+        COMMAND ${RUN_CLANG_TIDY_BIN} -format -fix ${RUN_CLANG_TIDY_BIN_ARGS}
         COMMENT "running clang tidy -fix -- ${CMAKE_SOURCE_DIR}"
         DEPENDS protobuf_files ${COMPILE_COMMANDS_LINK}
         WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}


CMake: Fallback from try_run to try_compile when cross-compiling. (#436)

--- cmake/CXXFeatureCheck.cmake
+++ cmake/CXXFeatureCheck.cmake
@@ -26,11 +26,28 @@
     add_definitions(-DHAVE_${VAR})
     return()
   endif()
+
   message("-- Performing Test ${FEATURE}")
-  try_run(RUN_${FEATURE} COMPILE_${FEATURE}
-          ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${FILE}.cpp
-          CMAKE_FLAGS ${BENCHMARK_CXX_LINKER_FLAGS}
-          LINK_LIBRARIES ${BENCHMARK_CXX_LIBRARIES})
+  if(CMAKE_CROSSCOMPILING)
+    try_compile(COMPILE_${FEATURE}
+            ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${FILE}.cpp
+            CMAKE_FLAGS ${BENCHMARK_CXX_LINKER_FLAGS}
+            LINK_LIBRARIES ${BENCHMARK_CXX_LIBRARIES})
+    if(COMPILE_${FEATURE})
+      message(WARNING
+            "If you see build failures due to cross compilation, try setting HAVE_${VAR} to 0")
+      set(RUN_${FEATURE} 0)
+    else()
+      set(RUN_${FEATURE} 1)
+    endif()
+  else()
+    message("-- Performing Test ${FEATURE}")
+    try_run(RUN_${FEATURE} COMPILE_${FEATURE}
+            ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${FILE}.cpp
+            CMAKE_FLAGS ${BENCHMARK_CXX_LINKER_FLAGS}
+            LINK_LIBRARIES ${BENCHMARK_CXX_LIBRARIES})
+  endif()
+
   if(RUN_${FEATURE} EQUAL 0)
     message("-- Performing Test ${FEATURE} -- success")
     set(HAVE_${VAR} 1 CACHE INTERNAL "Feature test for ${FILE}" PARENT_SCOPE)
@@ -43,4 +60,3 @@
     endif()
   endif()
 endfunction()
-


Update FindMyPackage.cmake

Update FindMyPackage.cmake

--- cmake/FindLB/optional.cmake
+++ cmake/FindLB/optional.cmake
@@ -224,7 +224,11 @@
 endforeach()
 set(${_package}_FOUND 1)
 string(REPLACE ";" ", " _components "${_components}")
-_fmp_report_info("Found version ${_preferred_version} with components ${_components}")
+if(_components STREQUAL "")
+	_fmp_report_info("Found version ${_preferred_version} with no components")
+else()
+	_fmp_report_info("Found version ${_preferred_version} with components (${_components})")
+endif()
 return()

 # Done!


Fix FIndLua when lua is not installed.

Fix FIndLua when lua is not installed.

--- cmake/Modules/FindLua.cmake
+++ cmake/Modules/FindLua.cmake
@@ -48,12 +48,15 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)

-find_program(LUA_EXECUTABLE NAMES lua luajit lua51 lua52 lua53 luajit21 luajit20 DOC "lua executable")
+find_program(LUA_EXECUTABLE NAMES lua luajit lua51 lua5.1 lua52 lua5.2 lua53 lua5.3 luajit21 luajit20 DOC "lua executable")
 if (APPLE AND LUA_EXECUTABLE MATCHES "\\.luaenv/shims")
   execute_process(COMMAND luaenv which lua RESULT_VARIABLE STATUS OUTPUT_VARIABLE LUA_EXECUTABLE ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
 endif()
-get_filename_component(LUAENV_ROOT ${LUA_EXECUTABLE} DIRECTORY)
-get_filename_component(LUAENV_ROOT ${LUAENV_ROOT} DIRECTORY)
+
+if (LUA_EXECUTABLE)
+  get_filename_component(LUAENV_ROOT ${LUA_EXECUTABLE} DIRECTORY)
+  get_filename_component(LUAENV_ROOT ${LUAENV_ROOT} DIRECTORY)
+endif()

 find_path(LUA_INCLUDE_DIR lua.h
   HINTS


Install of export file

Install of export file

--- cmake/MyPackageExport.cmake
+++ cmake/MyPackageExport.cmake
@@ -10,5 +10,7 @@
     EXPORT_FILE_NAME "${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h"
     STATIC_DEFINE ${PROJECT_NAME}_STATIC)
   ADD_CUSTOM_TARGET(${PROJECT_NAME}Export SOURCES "${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h")
+  INSTALL(FILES ${_file} DESTINATION ${_dir})
+  INSTALL (FILES ${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h DESTINATION ${PROJECT_NAME})

 ENDMACRO()


Updated URL to use local copy of file.

Updated URL to use local copy of file.

--- cmake/ThirdPartyPETSc.cmake
+++ cmake/ThirdPartyPETSc.cmake
@@ -32,7 +32,7 @@
             TMP_DIR ${TPBUILD}/petsc-3.5.2-tmp
             INSTALL_DIR ${TPDIST}
             BINARY_DIR ${TPBUILD}/petsc-3.5.2
-            URL http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.5.2.tar.gz
+            URL http://www.nektar.info/thirdparty/petsc-lite-3.5.2.tar.gz
             URL_MD5 "d707336a98d7cb31d843804d020edc94"
             CONFIGURE_COMMAND ./configure
                 --with-cc=${PETSC_C_COMPILER}


This file removed because it is no longer used since the
reorganization/expansion of the single xwinttf device driver xwinttf.c to
the cairo.c device driver for a significant number of cairo-related devices.

svn path=/trunk/; revision=7776

--- cmake/modules/xwinttf.cmake
+++ cmake/modules/xwinttf.cmake
@@ -1,89 +0,0 @@
-# cmake/modules/psttf.cmake
-#
-# Copyright (C) 2007  Hazen Babcock
-#
-# This file is part of PLplot.
-#
-# PLplot is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published
-# by the Free Software Foundation; version 2 of the License.
-#
-# PLplot 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 Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with the file PLplot; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
-
-# Configuration for the psttf device driver (supporting the psttf and
-# psttfc devices).
-#
-# The following variables are set / modified
-#
-# PLD_xwinttf               - ON means the psttf and psttfc devices are enabled.
-# xwinttf_COMPILE_FLAGS	    - Blank-delimited COMPILE_FLAGS required to
-#			      compile psttf device driver.
-# xwinttf_LINK_FLAGS	    - LINK_FLAGS (string) for dynamic psttf device driver.
-# xwinttf_RPATH		    - RPATH directory list for psttf device driver.
-# xwinttf_TARGETS	    - Full Name of libLASi so that cmake can figure out
-#			      RPATH stuff in the build tree.
-# DRIVERS_LINK_FLAGS	    - list of device LINK_FLAGS and TARGETS for case
-#			      when ENABLE_DYNDRIVERS OFF.
-
-# Include file searches use FindPath. To add extra search directories
-# set the environment variable CMAKE_INCLUDE_PATH.
-# Library searches use FindLibrary. To add extra search directories
-# set the environment variable CMAKE_LIBRARY_PATH.
-# See cmake documentation for further details.
-
-# Look for xwinttf headers and libraries with pkg-config
-if(PLD_xwinttf)
-  if(NOT PKG_CONFIG_EXECUTABLE)
-    message(STATUS
-    "WARNING: pkg-config not found. Setting PLD_xwinttf to OFF."
-    )
-    set(PLD_xwinttf OFF CACHE BOOL "Enable xwinttf device" FORCE)
-  endif(NOT PKG_CONFIG_EXECUTABLE)
-endif(PLD_xwinttf)
-
-if(PLD_xwinttf)
-  pkg_check_pkgconfig("pangocairo;pango;cairo" includedir libdir linkflags cflags _XWINTTF)
-  if(linkflags)
-    # Blank-delimited required.
-    string(REGEX REPLACE ";" " " xwinttf_COMPILE_FLAGS "${cflags} -I${X11_INCLUDE_DIR}")
-    set(xwinttf_LINK_FLAGS "${linkflags} -L${X11_LIBRARY_DIR} ${X11_LIBRARIES}")
-    #message("xwinttf_COMPILE_FLAGS = ${xwinttf_COMPILE_FLAGS}")
-
-#    # Convert from blank-delimited to a cmake list
-#    string(REGEX REPLACE " +" ";" psttf_RPATH ${libdir})
-#    # Put libLASI pkg-config information into a form that
-#    # target_link_libraries can interpret properly with respect to RPATH
-#    # for the build tree.
-#    find_library(psttf_TARGETS LASi ${psttf_RPATH})
-#    if(NOT psttf_TARGETS)
-#      message(FATAL_ERROR
-#         "libLASi not in location specified by pkg-config."
-#      )
-#    endif(NOT psttf_TARGETS)
-#    get_filename_component(psttf_RPATH ${psttf_TARGETS} PATH)
-
-    set(DRIVERS_LINK_FLAGS
-    ${DRIVERS_LINK_FLAGS}
-    ${psttf_LINK_FLAGS}
-    ${psttf_TARGETS}
-    )
-  else(linkflags)
-    #message("includedir = ${includedir}")
-    #message("libdir = ${libdir}")
-    #message("linkflags = ${linkflags}")
-    #message("cflags = ${cflags}")
-    message(STATUS
-       "WARNING: pango or cairo not found with pkg-config.\n"
-    "   Setting PLD_xwinttf to OFF.  Please install all of these packages\n"
-    "   and/or set the environment variable PKG_CONFIG_PATH appropriately."
-    )
-    set(PLD_xwinttf OFF CACHE BOOL "Enable xwinttf device" FORCE)
-  endif(linkflags)
-endif(PLD_xwinttf)


remove comment in FindTPLBoostOrg.cmake

remove comment in FindTPLBoostOrg.cmake

--- cmake/TPLs/FindTPLBoostOrg.cmake
+++ cmake/TPLs/FindTPLBoostOrg.cmake
@@ -11,8 +11,6 @@
                    boost/range.hpp
                    boost/program_options.hpp
                    boost/test/unit_test.hpp
-		   #  REQUIRED_LIBS_NAMES boost_program_options
-		   #   boost_unit_test_framework
   )

 # Use CMake FindBoost module to check version is sufficient


Use CATKIN_GLOBAL_ETC_DESTINATION instead of etc (#954)

--- cmake/catkin_add_env_hooks.cmake
+++ cmake/catkin_add_env_hooks.cmake
@@ -109,7 +109,7 @@
         ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${ENV_HOOK})
       if(NOT ${ARG_SKIP_INSTALL})
         install(FILES ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${ENV_HOOK}
-          DESTINATION etc/catkin/profile.d)
+          DESTINATION ${CATKIN_GLOBAL_ETC_DESTINATION}/catkin/profile.d)
       endif()
     elseif(EXISTS ${base}.in OR EXISTS ${base}.installspace.in)
       # evaluate in template and install
@@ -123,13 +123,13 @@
         @ONLY)
       if(NOT ${ARG_SKIP_INSTALL})
         install(FILES ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${ENV_HOOK}
-          DESTINATION etc/catkin/profile.d)
+          DESTINATION ${CATKIN_GLOBAL_ETC_DESTINATION}/catkin/profile.d)
       endif()
     elseif (EXISTS ${base})
       # install plain file
       if(NOT ${ARG_SKIP_INSTALL})
         install(FILES ${base}
-          DESTINATION etc/catkin/profile.d)
+          DESTINATION ${CATKIN_GLOBAL_ETC_DESTINATION}/catkin/profile.d)
       endif()
     endif()
   endforeach()


Enabled C++11 for emscripten

Enabled C++11 for emscripten

--- cmake/emscripten.toolchain.cmake
+++ cmake/emscripten.toolchain.cmake
@@ -1,131 +1,131 @@
-#-------------------------------------------------------------------------------
-#	emscripten.toolchain.cmake
-#	Oryol cmake toolchain file for cross-compiling to emscripten.
-#-------------------------------------------------------------------------------
-
-message("Target Platform: emscripten")
-
-set(ORYOL_PLATFORM EMSCRIPTEN)
-set(ORYOL_PLATFORM_NAME "emsc")
-set(ORYOL_EMSCRIPTEN 1)
-set(ORYOL_POSIX 1)
-set(ORYOL_PLATFORM_DEFINES " -DORYOL_EMSCRIPTEN=1 -DORYOL_POSIX=1")
-
-# total memory is 128MB for main thread, and 16 MB for worker
-# NOTE: USE_MEMORY_INIT_FILE has/had problems that the script is already starting but the MEM file isn't loaded yet(?)
-# at least I'm having weird startup problems...
-set(EMSCRIPTEN_TOTAL_MEMORY 134217728)
-set(EMSCRIPTEN_TOTAL_MEMORY_WORKER 16777216)
-set(EMSCRIPTEN_USE_MEMORY_INIT_FILE 0)
-set(EMSCRIPTEN_USE_LTO 1)
-set(EMSCRIPTEN_USE_CLOSURE 0)
-set(EMSCRIPTEN_ASSERTIONS 0)
-set(EMSCRIPTEN_BUILD_VERBOSE 0)
-set(EMSCRIPTEN_OUTLINING_LIMIT 20000)
-
-message("EMSCRIPTEN_TOTAL_MEMORY: ${EMSCRIPTEN_TOTAL_MEMORY}")
-message("EMSCRIPTEN_TOTAL_MEMORY_WORKER: ${EMSCRIPTEN_TOTAL_MEMORY_WORKER}")
-message("EMSCRIPTEN_USE_MEMORY_INIT_FILE: ${EMSCRIPTEN_USE_MEMORY_INIT_FILE}")
-message("EMSCRIPTEN_USE_LTO: ${EMSCRIPTEN_USE_LTO}")
-message("EMSCRIPTEN_USE_CLOSURE: ${EMSCRIPTEN_USE_CLOSURE}")
-message("EMSCRIPTEN_ASSERTIONS: ${EMSCRIPTEN_ASSERTIONS}")
-message("EMSCRIPTEN_OUTLINING_LIMIT: ${EMSCRIPTEN_OUTLINING_LIMIT}")
-
-set(CMAKE_SYSTEM_NAME Linux)
-set(CMAKE_SYSTEM_VERSION 1)
-set(COMPILING on)
-set(CMAKE_CROSSCOMPILING TRUE)
-
-# Locate where the Emscripten compiler resides in relative to this toolchain file.
-if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "")
-    get_filename_component(GUESS_EMSCRIPTEN_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}/../../emscripten" ABSOLUTE)
-    if (EXISTS "${GUESS_EMSCRIPTEN_ROOT_PATH}/emranlib")
-        set(EMSCRIPTEN_ROOT_PATH "${GUESS_EMSCRIPTEN_ROOT_PATH}")
-    endif()
-endif()
-
-# If not found by above search, locate using the EMSCRIPTEN environment variable.
-if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "")
-    set(EMSCRIPTEN_ROOT_PATH "$ENV{EMSCRIPTEN}")
-endif()
-
-# Abort if not found.
-if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "")
-    message(FATAL_ERROR "Could not locate the Emscripten compiler toolchain directory! Either set the EMSCRIPTEN environment variable, or pass -DEMSCRIPTEN_ROOT_PATH=xxx to CMake to explicitly specify the location of the compiler!")
-endif()
-message("Emscripten SDK: ${EMSCRIPTEN_ROOT_PATH}")
-
-# Normalize, convert Windows backslashes to forward slashes or CMake will crash.
-get_filename_component(EMSCRIPTEN_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}" ABSOLUTE)
-
-# tool suffic (.bat on windows)
-if (CMAKE_HOST_WIN32)
-    set(EMCC_SUFFIX ".bat")
-else()
-    set(EMCC_SUFFIX "")
-endif()
-
-include(CMakeForceCompiler)
-CMAKE_FORCE_C_COMPILER("${CMAKE_C_COMPILER}" Clang)
-CMAKE_FORCE_CXX_COMPILER("${CMAKE_CXX_COMPILER}" Clang)
-
-# define configurations
-set(CMAKE_CONFIGURATION_TYPES Debug Release)
-
-# specify cross-compilers
-set(CMAKE_C_COMPILER "${EMSCRIPTEN_ROOT_PATH}/emcc${EMCC_SUFFIX}" CACHE PATH "gcc" FORCE)
-set(CMAKE_CXX_COMPILER "${EMSCRIPTEN_ROOT_PATH}/em++${EMCC_SUFFIX}" CACHE PATH "g++" FORCE)
-set(CMAKE_AR "${EMSCRIPTEN_ROOT_PATH}/emar${EMCC_SUFFIX}" CACHE PATH "archive" FORCE)
-set(CMAKE_LINKER "${EMSCRIPTEN_ROOT_PATH}/emcc${EMCC_SUFFIX}" CACHE PATH "linker" FORCE)
-set(CMAKE_RANLIB "${EMSCRIPTEN_ROOT_PATH}/emranlib${EMCC_SUFFIX}" CACHE PATH "ranlib" FORCE)
-
-# only search for libraries and includes in the toolchain
-set(CMAKE_FIND_ROOT_PATH ${EMSCRIPTEN_ROOT_PATH})
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
-set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
-
-set(CMAKE_SYSTEM_INCLUDE_PATH "${EMSCRIPTEN_ROOT_PATH}/system/include")
-
-# c++ compiler flags
-set(CMAKE_CXX_FLAGS "${ORYOL_PLATFORM_DEFINES} -fno-exceptions -fstrict-aliasing -Wall -Wno-warn-absolute-paths -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue")
-set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
-set(CMAKE_CXX_FLAGS_DEBUG "-O2 -g -D_DEBUG_ -D_DEBUG")
-
-# c compiler flags
-set(CMAKE_C_FLAGS "${ORYOL_PLATFORM_DEFINES} -fstrict-aliasing -Wall -Wno-warn-absolute-paths -Wextra -Wno-multichar -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue")
-set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
-set(CMAKE_C_FLAGS_DEBUG "-O2 -g -D_DEBUG_ -D_DEBUG")
-
-# linker flags
-set(CMAKE_EXE_LINKER_FLAGS "--memory-init-file ${EMSCRIPTEN_USE_MEMORY_INIT_FILE} --shell-file ${CMAKE_SOURCE_DIR}/data/html/shell.html -s WARN_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${EMSCRIPTEN_TOTAL_MEMORY} -s DISABLE_EXCEPTION_CATCHING=1")
-set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-O2 --llvm-lto ${EMSCRIPTEN_USE_LTO} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
-set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-O2 -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE}")
-
-# dynamic lib linker flags
-set(CMAKE_SHARED_LINKER_FLAGS "-shared --memory-init-file 0 -s WARN_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${EMSCRIPTEN_TOTAL_MEMORY_WORKER} -s BUILD_AS_WORKER=1 -s EXPORTED_FUNCTIONS=[\\\"_dowork\\\"] -s DISABLE_EXCEPTION_CATCHING=1")
-set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-O2 --llvm-lto ${EMSCRIPTEN_USE_LTO} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
-set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-O2 -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} --closure 0")
-
-# update cache variables for cmake gui
-set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Config Type" FORCE)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "Generic C++ Compiler Flags" FORCE)
-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING "C++ Debug Compiler Flags" FORCE)
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "C++ Release Compiler Flags" FORCE)
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "Generic C Compiler Flags" FORCE)
-set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" CACHE STRING "C Debug Compiler Flags" FORCE)
-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}" CACHE STRING "C Release Compiler Flags" FORCE)
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" CACHE STRING "Generic Linker Flags" FORCE)
-set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING "Debug Linker Flags" FORCE)
-set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}" CACHE STRING "Release Linker Flags" FORCE)
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}" CACHE STRING "Generic Shared Linker Flags" FORCE)
-set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING "Debug Shared Linker Flags" FORCE)
-set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}" CACHE STRING "Release Shared Linker Flags" FORCE)
-
-# set the build type to use
-if (NOT CMAKE_BUILD_TYPE)
-    set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Compile Type" FORCE)
-endif()
-set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release)
-
+#-------------------------------------------------------------------------------
+#	emscripten.toolchain.cmake
+#	Oryol cmake toolchain file for cross-compiling to emscripten.
+#-------------------------------------------------------------------------------
+
+message("Target Platform: emscripten")
+
+set(ORYOL_PLATFORM EMSCRIPTEN)
+set(ORYOL_PLATFORM_NAME "emsc")
+set(ORYOL_EMSCRIPTEN 1)
+set(ORYOL_POSIX 1)
+set(ORYOL_PLATFORM_DEFINES " -DORYOL_EMSCRIPTEN=1 -DORYOL_POSIX=1")
+
+# total memory is 128MB for main thread, and 16 MB for worker
+# NOTE: USE_MEMORY_INIT_FILE has/had problems that the script is already starting but the MEM file isn't loaded yet(?)
+# at least I'm having weird startup problems...
+set(EMSCRIPTEN_TOTAL_MEMORY 134217728)
+set(EMSCRIPTEN_TOTAL_MEMORY_WORKER 16777216)
+set(EMSCRIPTEN_USE_MEMORY_INIT_FILE 0)
+set(EMSCRIPTEN_USE_LTO 1)
+set(EMSCRIPTEN_USE_CLOSURE 0)
+set(EMSCRIPTEN_ASSERTIONS 0)
+set(EMSCRIPTEN_BUILD_VERBOSE 0)
+set(EMSCRIPTEN_OUTLINING_LIMIT 20000)
+
+message("EMSCRIPTEN_TOTAL_MEMORY: ${EMSCRIPTEN_TOTAL_MEMORY}")
+message("EMSCRIPTEN_TOTAL_MEMORY_WORKER: ${EMSCRIPTEN_TOTAL_MEMORY_WORKER}")
+message("EMSCRIPTEN_USE_MEMORY_INIT_FILE: ${EMSCRIPTEN_USE_MEMORY_INIT_FILE}")
+message("EMSCRIPTEN_USE_LTO: ${EMSCRIPTEN_USE_LTO}")
+message("EMSCRIPTEN_USE_CLOSURE: ${EMSCRIPTEN_USE_CLOSURE}")
+message("EMSCRIPTEN_ASSERTIONS: ${EMSCRIPTEN_ASSERTIONS}")
+message("EMSCRIPTEN_OUTLINING_LIMIT: ${EMSCRIPTEN_OUTLINING_LIMIT}")
+
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_VERSION 1)
+set(COMPILING on)
+set(CMAKE_CROSSCOMPILING TRUE)
+
+# Locate where the Emscripten compiler resides in relative to this toolchain file.
+if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "")
+    get_filename_component(GUESS_EMSCRIPTEN_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}/../../emscripten" ABSOLUTE)
+    if (EXISTS "${GUESS_EMSCRIPTEN_ROOT_PATH}/emranlib")
+        set(EMSCRIPTEN_ROOT_PATH "${GUESS_EMSCRIPTEN_ROOT_PATH}")
+    endif()
+endif()
+
+# If not found by above search, locate using the EMSCRIPTEN environment variable.
+if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "")
+    set(EMSCRIPTEN_ROOT_PATH "$ENV{EMSCRIPTEN}")
+endif()
+
+# Abort if not found.
+if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "")
+    message(FATAL_ERROR "Could not locate the Emscripten compiler toolchain directory! Either set the EMSCRIPTEN environment variable, or pass -DEMSCRIPTEN_ROOT_PATH=xxx to CMake to explicitly specify the location of the compiler!")
+endif()
+message("Emscripten SDK: ${EMSCRIPTEN_ROOT_PATH}")
+
+# Normalize, convert Windows backslashes to forward slashes or CMake will crash.
+get_filename_component(EMSCRIPTEN_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}" ABSOLUTE)
+
+# tool suffic (.bat on windows)
+if (CMAKE_HOST_WIN32)
+    set(EMCC_SUFFIX ".bat")
+else()
+    set(EMCC_SUFFIX "")
+endif()
+
+include(CMakeForceCompiler)
+CMAKE_FORCE_C_COMPILER("${CMAKE_C_COMPILER}" Clang)
+CMAKE_FORCE_CXX_COMPILER("${CMAKE_CXX_COMPILER}" Clang)
+
+# define configurations
+set(CMAKE_CONFIGURATION_TYPES Debug Release)
+
+# specify cross-compilers
+set(CMAKE_C_COMPILER "${EMSCRIPTEN_ROOT_PATH}/emcc${EMCC_SUFFIX}" CACHE PATH "gcc" FORCE)
+set(CMAKE_CXX_COMPILER "${EMSCRIPTEN_ROOT_PATH}/em++${EMCC_SUFFIX}" CACHE PATH "g++" FORCE)
+set(CMAKE_AR "${EMSCRIPTEN_ROOT_PATH}/emar${EMCC_SUFFIX}" CACHE PATH "archive" FORCE)
+set(CMAKE_LINKER "${EMSCRIPTEN_ROOT_PATH}/emcc${EMCC_SUFFIX}" CACHE PATH "linker" FORCE)
+set(CMAKE_RANLIB "${EMSCRIPTEN_ROOT_PATH}/emranlib${EMCC_SUFFIX}" CACHE PATH "ranlib" FORCE)
+
+# only search for libraries and includes in the toolchain
+set(CMAKE_FIND_ROOT_PATH ${EMSCRIPTEN_ROOT_PATH})
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+
+set(CMAKE_SYSTEM_INCLUDE_PATH "${EMSCRIPTEN_ROOT_PATH}/system/include")
+
+# c++ compiler flags
+set(CMAKE_CXX_FLAGS "${ORYOL_PLATFORM_DEFINES} -std=c++11 -stdlib=libstdc++ -fno-exceptions -fstrict-aliasing -Wall -Wno-warn-absolute-paths -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue")
+set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
+set(CMAKE_CXX_FLAGS_DEBUG "-O2 -g -D_DEBUG_ -D_DEBUG")
+
+# c compiler flags
+set(CMAKE_C_FLAGS "${ORYOL_PLATFORM_DEFINES} -fstrict-aliasing -Wall -Wno-warn-absolute-paths -Wextra -Wno-multichar -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue")
+set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
+set(CMAKE_C_FLAGS_DEBUG "-O2 -g -D_DEBUG_ -D_DEBUG")
+
+# linker flags
+set(CMAKE_EXE_LINKER_FLAGS "--memory-init-file ${EMSCRIPTEN_USE_MEMORY_INIT_FILE} --shell-file ${CMAKE_SOURCE_DIR}/data/html/shell.html -s WARN_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${EMSCRIPTEN_TOTAL_MEMORY} -s DISABLE_EXCEPTION_CATCHING=1")
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-O2 --llvm-lto ${EMSCRIPTEN_USE_LTO} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
+set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-O2 -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE}")
+
+# dynamic lib linker flags
+set(CMAKE_SHARED_LINKER_FLAGS "-shared --memory-init-file 0 -s WARN_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${EMSCRIPTEN_TOTAL_MEMORY_WORKER} -s BUILD_AS_WORKER=1 -s EXPORTED_FUNCTIONS=[\\\"_dowork\\\"] -s DISABLE_EXCEPTION_CATCHING=1")
+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-O2 --llvm-lto ${EMSCRIPTEN_USE_LTO} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
+set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-O2 -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} --closure 0")
+
+# update cache variables for cmake gui
+set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Config Type" FORCE)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "Generic C++ Compiler Flags" FORCE)
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING "C++ Debug Compiler Flags" FORCE)
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "C++ Release Compiler Flags" FORCE)
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "Generic C Compiler Flags" FORCE)
+set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" CACHE STRING "C Debug Compiler Flags" FORCE)
+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}" CACHE STRING "C Release Compiler Flags" FORCE)
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" CACHE STRING "Generic Linker Flags" FORCE)
+set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING "Debug Linker Flags" FORCE)
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}" CACHE STRING "Release Linker Flags" FORCE)
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}" CACHE STRING "Generic Shared Linker Flags" FORCE)
+set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING "Debug Shared Linker Flags" FORCE)
+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}" CACHE STRING "Release Shared Linker Flags" FORCE)
+
+# set the build type to use
+if (NOT CMAKE_BUILD_TYPE)
+    set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Compile Type" FORCE)
+endif()
+set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release)
+


Start building up default driver set.

Start building up default driver set.

svn path=/trunk/; revision=6802

--- cmake/modules/drivers-init.cmake
+++ cmake/modules/drivers-init.cmake
@@ -47,7 +47,7 @@

 option(DEFAULT_NO_DEVICES
 "disable all (ON) or enable individually (OFF) devices by default"
-ON
+OFF
 )

 if(DEFAULT_ALL_DEVICES AND DEFAULT_NO_DEVICES)
@@ -65,36 +65,36 @@
 # consumption, but this is not necessary.

 set(DRIVERS_DEVICE_LIST
-"aqt:aqt:ON"
-"cgm:cgm:ON"
-"dg300:dg300:OFF"
-"png:gd:ON" "jpeg:gd:ON" "gif:gd:ON"
-"gnome:gnome:OFF"
-"hp7470:hpgl:ON" "hp7580:hpgl:ON" "lj_hpgl:hpgl:ON"
-"imp:impress:OFF"
+#"aqt:aqt:ON"
+#"cgm:cgm:ON"
+#"dg300:dg300:OFF"
+#"png:gd:ON" "jpeg:gd:ON" "gif:gd:ON"
+#"gnome:gnome:OFF"
+#"hp7470:hpgl:ON" "hp7580:hpgl:ON" "lj_hpgl:hpgl:ON"
+#"imp:impress:OFF"
 "gcw:gcw:ON"
-"linuxvga:linuxvga:ON"
-"ljii:ljii:OFF"
-"ljiip:ljiip:OFF"
-"mem:mem:ON"
-"ntk:ntk:OFF"
-"null:null:ON"
-"pbm:pbm:ON"
-"plmeta:plmeta:ON"
+#"linuxvga:linuxvga:ON"
+#"ljii:ljii:OFF"
+#"ljiip:ljiip:OFF"
+#"mem:mem:ON"
+#"ntk:ntk:OFF"
+#"null:null:ON"
+#"pbm:pbm:ON"
+#"plmeta:plmeta:ON"
 "ps:ps:ON"
-"psttf:psttf:ON"
-"xterm:tek:OFF" "tek4010:tek:OFF" "tek4107:tek:OFF" "mskermit:tek:OFF"
-"versaterm:tek:OFF" "vlt:tek:OFF" "conex:tek:OFF" "tek4010f:tek:OFF"
-"tek4107f:tek:OFF"
-"tk:tk:ON"
-"tkwin:tkwin:ON"
-"wingcc:wingcc:ON"
-"wxwidgets:wxwidgets:ON"
-"xfig:xfig:ON"
+#"psttf:psttf:ON"
+#"xterm:tek:OFF" "tek4010:tek:OFF" "tek4107:tek:OFF" "mskermit:tek:OFF"
+#"versaterm:tek:OFF" "vlt:tek:OFF" "conex:tek:OFF" "tek4010f:tek:OFF"
+#"tek4107f:tek:OFF"
+#"tk:tk:ON"
+#"tkwin:tkwin:ON"
+#"wingcc:wingcc:ON"
+#"wxwidgets:wxwidgets:ON"
+#"xfig:xfig:ON"
 "xwin:xwin:ON"
 )

-set(PRESET_DEFAULT ON)
+set(PRESET_DEFAULT OFF)

 if(DEFAULT_ALL_DEVICES)
   set(DEFAULT ON)


LLVM: cacheable

LLVM: cacheable

--- cmake/projects/LLVM/hunter.cmake
+++ cmake/projects/LLVM/hunter.cmake
@@ -4,6 +4,7 @@
 # !!! DO NOT PLACE HEADER GUARDS HERE !!!

 include(hunter_add_version)
+include(hunter_cacheable)
 include(hunter_cmake_args)
 include(hunter_configuration_types)
 include(hunter_download)
@@ -84,4 +85,5 @@
   )
 endif()

+hunter_cacheable(LLVM)
 hunter_download(PACKAGE_NAME LLVM)


Fixed #7294: Spelling

Fixed #7294: Spelling

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -28,7 +28,7 @@
 		"${_CLANG_FORMAT_VERSION}")

 	if (NOT CLANG_FORMAT_VERSION)
-		message(WARNING "problem parsing clang-fromat version for ${CLANG_FORMAT}")
+		message(WARNING "problem parsing clang-format version for ${CLANG_FORMAT}")
 		return()
 	endif()


Fix default buildness of clang-format targets

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -31,9 +31,11 @@

 if(NOT TARGET format)
     add_custom_target(format VERBATIM)
+    set_target_properties(format PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD True)
 endif()
 if(NOT TARGET reformat)
     add_custom_target(reformat VERBATIM)
+    set_target_properties(reformat PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD True)
 endif()

 file(GLOB_RECURSE CLANG_FORMAT_PATHS CONFIGURE_DEPENDS "*.clang-format")
@@ -77,6 +79,8 @@
         COMMAND "${CMAKE_COMMAND}" -E remove ${TOUCH_PATHS}
         COMMENT "Clearing format dependencies"
     )
+    set_target_properties(${TARGET}-format PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD True FOLDER format)
+    set_target_properties(${TARGET}-reformat PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD True FOLDER reformat)

     add_dependencies(format ${TARGET}-format)
     add_dependencies(reformat ${TARGET}-reformat)


Apply patch by Fabrice Ménard <menard.fabrice orange fr>, from kde-buildsystem. He says : "As ${PKG_GOBJECT2_INCLUDE_DIRS} might be a list we can't simply append path components to it. For example, on my system pkg-config --cflags gobject-2.0 returns :         '-I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include' "

--- cmake/FindGObject.cmake
+++ cmake/FindGObject.cmake
@@ -25,11 +25,10 @@
    SET(GOBJECT_DEFINITIONS ${PKG_GOBJECT2_CFLAGS})
 ENDIF (NOT WIN32)

-FIND_PATH(GOBJECT_INCLUDE_DIR gobject.h
+FIND_PATH(GOBJECT_INCLUDE_DIR gobject/gobject.h
    PATHS
    ${PKG_GOBJECT2_INCLUDE_DIRS}
-   ${PKG_GOBJECT2_INCLUDE_DIRS}/glib-2.0/gobject/
-   /usr/include/glib-2.0/gobject/
+   /usr/include/glib-2.0/
    #PATH_SUFFIXES gst
    )


Auto-detect jsoncpp_lib that are shared libraries by target type

--- cmake/FindJsonCpp.cmake
+++ cmake/FindJsonCpp.cmake
@@ -108,10 +108,15 @@
 		set(JSONCPP_IMPORTED_LIBRARY jsoncpp_lib CACHE INTERNAL "" FORCE)
 		set(JSONCPP_IMPORTED_LIBRARY_IS_SHARED FALSE CACHE INTERNAL "" FORCE)

+	elseif(__jsoncpp_have_jsoncpplib AND __jsoncpp_lib_type STREQUAL "SHARED_LIBRARY")
+		# We were able to figure out the mystery library is shared!
+		set(JSONCPP_IMPORTED_LIBRARY_SHARED jsoncpp_lib CACHE INTERNAL "" FORCE)
+		set(JSONCPP_IMPORTED_LIBRARY jsoncpp_lib CACHE INTERNAL "" FORCE)
+		set(JSONCPP_IMPORTED_LIBRARY_IS_SHARED TRUE CACHE INTERNAL "" FORCE)
+
 	elseif(__jsoncpp_have_jsoncpplib)
 		# One variant, and we have no idea if this is just an old version or if
 		# this is shared based on the target name alone. Hmm.
-		# TODO figure out if this is shared or static?
 		set(JSONCPP_IMPORTED_LIBRARY jsoncpp_lib CACHE INTERNAL "" FORCE)
 	endif()


[cmake] Show all warnings for MSVC

[cmake] Show all warnings for MSVC

--- cmake/compilation.cmake
+++ cmake/compilation.cmake
@@ -12,13 +12,22 @@
 set(GCC_ERRORS "")
 set(GCC9_ERRORS "-Werror=pessimizing-move")

-# Some release optimization flags for GCC/Clang.
-if (NOT WIN32)
+# Some release optimization flags for GCC/Clang/MSVC.
+if (NOT MSVC)
   set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -pedantic -pedantic-errors ${COMMON_COMPILER_WARNINGS} ${COMMON_COMPILER_ERRORS}")
   set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
   set(CMAKE_CXX_FLAGS_MINSIZEREL "-O3 -DNDEBUG")
   set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+else()
+  # /EHsc = enables unwind semantics when exception handler is used.
+  # Ignore certain warnings:
+  #   C4514: 'function' : unreferenced inline function has been removed
+  #   C4820: bytes' bytes padding added after construct 'member_name'
+  #   C4710: 'function' : function not inlined
+  #   C4711: function 'function' selected for inline expansion
+  #   C4668: 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives'
+  set(CMAKE_CXX_FLAGS "/Wall /EHsc /wd4514 /wd4820 /wd4710 /wd4711 /wd4668")
 endif()

 # Show color in diagnostics messages from Clang.
@@ -26,7 +35,7 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
 endif()

-if (NOT WIN32)
+if (NOT MSVC)
   # Clang/GCC
   set(REL_OPTS "-pipe -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -ffast-math -funroll-loops")


Disable FEATURE_NI_BIND_FALLBACK by default for all platforms

--- clrfeatures.cmake
+++ clrfeatures.cmake
@@ -19,13 +19,6 @@
 if(NOT DEFINED FEATURE_INTERPRETER)
   set(FEATURE_INTERPRETER 0)
 endif(NOT DEFINED FEATURE_INTERPRETER)
-if(NOT WIN32)
-  if(NOT DEFINED FEATURE_NI_BIND_FALLBACK)
-    if(NOT CLR_CMAKE_TARGET_ARCH_AMD64 AND NOT CLR_CMAKE_TARGET_ARCH_ARM64)
-      set(FEATURE_NI_BIND_FALLBACK 1)
-    endif()
-  endif(NOT DEFINED FEATURE_NI_BIND_FALLBACK)
-endif(NOT WIN32)

 if(NOT DEFINED FEATURE_APPDOMAIN_RESOURCE_MONITORING)
   set(FEATURE_APPDOMAIN_RESOURCE_MONITORING 1)


UPDATE simple macros for cmake

UPDATE simple macros for cmake

Former-commit-id: a73d22bc215dbd83763edbd587fb9ff83bea26b9

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -60,3 +60,18 @@
     set(${name} "${value}" CACHE BOOL "" FORCE)
     message("${name} ${value}")
 endmacro()
+
+macro(setSofaPath name value)
+    set(${name} "${value}" CACHE PATH "" FORCE)
+    message("${name} ${value}")
+endmacro()
+
+macro(setSofaString name value)
+    set(${name} "${value}" CACHE STRING "" FORCE)
+    message("${name} ${value}")
+endmacro()
+
+macro(setSofaFilePath name value)
+    set(${name} "${value}" CACHE FILEPATH "" FORCE)
+    message("${name} ${value}")
+endmacro()


Improve the generation of Debian packages

--- cmake/ByflCPack.cmake
+++ cmake/ByflCPack.cmake
@@ -9,8 +9,14 @@
 set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.md")

-# Define generator-specific package metadata.
-set(CPACK_DEBIAN_PACKAGE_DEPENDS "clang-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}")
+# Define Debian-package-specific metadata.
+if (LLVM_PACKAGE_VERSION VERSION_LESS 7.0.0)
+  set(_clang_package "clang-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}")
+else (LLVM_PACKAGE_VERSION VERSION_LESS 7.0.0)
+  set(_clang_package "clang-${LLVM_VERSION_MAJOR}")
+endif (LLVM_PACKAGE_VERSION VERSION_LESS 7.0.0)
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "${_clang_package}, perl")
+set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)

 # Default to building only .tgz files, but let the user override this decision.
 set(CPACK_GENERATOR "TGZ" CACHE STRING "Semicolon-separated list of binary package types to generate")


Swap clang-tidy paths for HIP-Clang (#2284)

HIP-Clang requires to use its own updated clang-tidy from llvm-amdgpu installed to /opt/rocm/llvm. Luckily, HCC does not install llvm-amdgpu, so this should still work for HCC same as before.

--- cmake/ClangTidy.cmake
+++ cmake/ClangTidy.cmake
@@ -39,8 +39,8 @@
     PATH_SUFFIXES
         compiler/bin
     PATHS
+        /opt/rocm/llvm/bin
         /opt/rocm/hcc
-        /opt/rocm/llvm/bin
         /usr/local/opt/llvm/bin
 )


by defaut the cmake func deduce_build_type() does nothing if the build dir doesn't contain debug nor release.

Signed-off-by: Étienne Schmitt <25d5031dc1a1d443222aec9a4e916501ae23c255@inria.fr>

--- cmake/utilities.cmake
+++ cmake/utilities.cmake
@@ -39,11 +39,13 @@
 # if CMAKE_CURRENT_BINARY_DIR end with Debug/debug/DEBUG, set Debug mode else Release mode.
 #
 function(deduce_build_type)
-# IF (NOT (${CMAKE_BUILD_TYPE} MATCHES "Debug|Release"))
-	IF (${CMAKE_CURRENT_BINARY_DIR} MATCHES "(.*)Debug|(.*)debug|(.*)DEBUG")
-		SET(CMAKE_BUILD_TYPE "Debug" PARENT_SCOPE)
-	ELSE()
-		SET(CMAKE_BUILD_TYPE "Release" PARENT_SCOPE)
-	ENDIF()
-# ENDIF()
+set(BIN_DIR "")
+string(TOLOWER ${CMAKE_CURRENT_BINARY_DIR} BIN_DIR)
+if (${BIN_DIR} MATCHES "(.*)debug")
+	set(CMAKE_BUILD_TYPE "Debug" PARENT_SCOPE)
+else()
+	if (${BIN_DIR} MATCHES "(.*)release")
+		set(CMAKE_BUILD_TYPE "Release" PARENT_SCOPE)
+	endif()
+endif()
 endfunction(deduce_build_type)


Renderscript: Remove old build dir before next build

--- tests/Makefile.cmake
+++ tests/Makefile.cmake
@@ -94,7 +94,7 @@
 endif

 renderscript:
-	rm -f *.rs *.fs
+	rm -rf *.rs *.fs build_renderscript
 	@echo 'Executing HIPAcc Compiler for Renderscript:'
 	$(COMPILER) $(TEST_CASE)/main.cpp $(MYFLAGS) $(COMPILER_INCLUDES) -emit-renderscript $(HIPACC_OPTS) -o main.cc
 	mkdir -p build_renderscript
@@ -105,7 +105,7 @@
 	cp build_renderscript/main_renderscript .

 filterscript:
-	rm -f *.rs *.fs
+	rm -rf *.rs *.fs build_filterscript
 	@echo 'Executing HIPAcc Compiler for Filterscript:'
 	$(COMPILER) $(TEST_CASE)/main.cpp $(MYFLAGS) $(COMPILER_INCLUDES) -emit-filterscript $(HIPACC_OPTS) -o main.cc
 	mkdir -p build_filterscript


fix debug symbol for ios

fix debug symbol for ios

--- toolchains/iOS.cmake
+++ toolchains/iOS.cmake
@@ -10,7 +10,7 @@
     -std=gnu++11
     -stdlib=libc++
     -isysroot ${CMAKE_IOS_SDK_ROOT}")
-set(CXX_FLAGS_DEBUG "-g -O0")
+set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")

 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}
     -fobjc-abi-version=2


Simplify and clean up our CMake scripts (#951) [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -590,14 +590,16 @@
         FILE(MAKE_DIRECTORY ${FULL_DEST_EXTERNAL_BINARIES_DIR})
     ENDIF()

-    FOREACH(EXTERNAL_BINARY ${EXTERNAL_BINARIES})
-        IF("${EXTERNAL_BINARIES_DIR}" STREQUAL "")
-            SET(FULL_EXTERNAL_BINARY ${EXTERNAL_BINARY})
-        ELSE()
+    IF(NOT "${EXTERNAL_BINARIES_DIR}" STREQUAL "")
+        FOREACH(EXTERNAL_BINARY ${EXTERNAL_BINARIES})
+            # Make sure that the external binary exists
+
             SET(FULL_EXTERNAL_BINARY "${EXTERNAL_BINARIES_DIR}/${EXTERNAL_BINARY}")
-        ENDIF()
-
-        IF(EXISTS ${FULL_EXTERNAL_BINARY})
+
+            IF(NOT EXISTS ${FULL_EXTERNAL_BINARY})
+                MESSAGE(FATAL_ERROR "${FULL_EXTERNAL_BINARY} does not exist...")
+            ENDIF()
+
             # Copy the external binary to its destination directory, so we can
             # test things without first having to deploy OpenCOR
             # Note: on Windows, we also need to copy the build directory so that
@@ -628,8 +630,8 @@
                     ${FULL_DEST_EXTERNAL_BINARIES_DIR}/${EXTERNAL_BINARY}
                 )
             ENDIF()
-        ENDIF()
-    ENDFOREACH()
+        ENDFOREACH()
+    ENDIF()

     # Location of our plugin

@@ -771,25 +773,19 @@

                 # External binaries

-                FOREACH(EXTERNAL_BINARY ${EXTERNAL_BINARIES})
-                    IF("${EXTERNAL_BINARIES_DIR}" STREQUAL "")
-                        SET(FULL_EXTERNAL_BINARY ${EXTERNAL_BINARY})
-                    ELSE()
-                        SET(FULL_EXTERNAL_BINARY "${EXTERNAL_BINARIES_DIR}/${EXTERNAL_BINARY}")
-                    ENDIF()
-
-                    IF(EXISTS ${FULL_EXTERNAL_BINARY})
+                IF(NOT "${EXTERNAL_BINARIES_DIR}" STREQUAL "")
+                    FOREACH(EXTERNAL_BINARY ${EXTERNAL_BINARIES})
                         IF(WIN32)
                             TARGET_LINK_LIBRARIES(${TEST_NAME}
-                                ${FULL_EXTERNAL_BINARY}
+                                ${EXTERNAL_BINARIES_DIR}/${EXTERNAL_BINARY}
                             )
                         ELSE()
                             TARGET_LINK_LIBRARIES(${TEST_NAME}
                                 ${FULL_DEST_EXTERNAL_BINARIES_DIR}/${EXTERNAL_BINARY}
                             )
                         ENDIF()
-                    ENDIF()
-                ENDFOREACH()
+                    ENDFOREACH()
+                ENDIF()

                 # Copy the test to our tests directory
                 # Note: DEST_TESTS_DIR is defined in our main CMake file...


Some minor cleaning up [ci skip].

Some minor cleaning up [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -521,13 +521,6 @@
         SET(PLUGIN_BUILD_DIR ${PLUGIN_BUILD_DIR}/${CMAKE_CFG_INTDIR})
     ENDIF()

-    # Keep track of the location of our plugins, so that we can properly clean
-    # up our bundle on OS X
-
-    LIST(APPEND PLUGIN_BUILD_DIRS ${PLUGIN_BUILD_DIR})
-
-    SET(PLUGIN_BUILD_DIRS "${PLUGIN_BUILD_DIRS}" PARENT_SCOPE)
-
     # Copy the plugin to our plugins directory
     # Note: this is done so that we can, on Windows and Linux, test the use of
     #       plugins in OpenCOR without first having to package OpenCOR...


Add LAPACK 3.7 files not mentioned in announcement

--- cmake/lapack.cmake
+++ cmake/lapack.cmake
@@ -26,7 +26,7 @@
 )

 set(DZLAUX
-  dbdsdc.f
+  dbdsdc.f dbdsvdx.f
   dbdsqr.f ddisna.f dlabad.f dlacpy.f dladiv.f dlae2.f  dlaebz.f
   dlaed0.f dlaed1.f dlaed2.f dlaed3.f dlaed4.f dlaed5.f dlaed6.f
   dlaed7.f dlaed8.f dlaed9.f dlaeda.f dlaev2.f dlagtf.f
@@ -53,15 +53,15 @@
 )

 set(SLASRC
-  sgbbrd.f sgbcon.f sgbequ.f sgbrfs.f sgbsv.f
+  sbdsvdx.f sgbbrd.f sgbcon.f sgbequ.f sgbrfs.f sgbsv.f
   sgbsvx.f sgbtf2.f sgbtrf.f sgbtrs.f sgebak.f sgebal.f sgebd2.f
   sgebrd.f sgecon.f sgeequ.f sgees.f  sgeesx.f sgeev.f  sgeevx.f
   DEPRECATED/sgegs.f  DEPRECATED/sgegv.f  sgehd2.f sgehrd.f sgelq2.f sgelqf.f
   sgels.f  sgelsd.f sgelss.f DEPRECATED/sgelsx.f sgelsy.f sgeql2.f sgeqlf.f
   sgeqp3.f DEPRECATED/sgeqpf.f sgeqr2.f sgeqr2p.f sgeqrf.f sgeqrfp.f sgerfs.f
-  sgerq2.f sgerqf.f sgesc2.f sgesdd.f  sgesvd.f sgesvx.f
-  sgetc2.f sgetri.f
-  sggbak.f sggbal.f sgges.f  sggesx.f sggev.f  sggevx.f
+  sgerq2.f sgerqf.f sgesc2.f sgesdd.f  sgesvd.f sgesvdx.f sgesvx.f
+  sgetc2.f sgetri.f sgetrf2.f
+  sggbak.f sggbal.f sgghd3.f  sgges.f  sggesx.f sggev.f sggev3.f  sggevx.f
   sggglm.f sgghrd.f sgglse.f sggqrf.f
   sggrqf.f DEPRECATED/sggsvd.f DEPRECATED/sggsvp.f sgtcon.f sgtrfs.f sgtsv.f
   sgtsvx.f sgttrf.f sgttrs.f sgtts2.f shgeqz.f
@@ -123,7 +123,7 @@
   ssygv_2stage.f ssytrd_2stage.f ssytrd_sb2st.F ssytrd_sy2sb.f slarfy.f
 )

-set(DSLASRC spotrs.f)
+set(DSLASRC spotrs.f spotrf2.f)

 set(CLASRC
   cbdsqr.f cgbbrd.f cgbcon.f cgbequ.f cgbrfs.f cgbsv.f  cgbsvx.f
@@ -212,11 +212,11 @@
   DEPRECATED/dgegs.f  DEPRECATED/dgegv.f  dgehd2.f dgehrd.f dgelq2.f dgelqf.f
   dgels.f  dgelsd.f dgelss.f DEPRECATED/dgelsx.f dgelsy.f dgeql2.f dgeqlf.f
   dgeqp3.f DEPRECATED/dgeqpf.f dgeqr2.f dgeqr2p.f dgeqrf.f dgeqrfp.f dgerfs.f
-  dgerq2.f dgerqf.f dgesc2.f dgesdd.f  dgesvd.f dgesvx.f
-  dgetc2.f dgetri.f
-  dggbak.f dggbal.f dgges.f  dggesx.f dggev.f  dggevx.f
-  dggglm.f dgghrd.f dgglse.f dggqrf.f
-  dggrqf.f DEPRECATED/dggsvd.f DEPRECATED/dggsvp.f dgtcon.f dgtrfs.f dgtsv.f
+  dgerq2.f dgerqf.f dgesc2.f dgesdd.f  dgesvd.f dgesvdx.f dgesvx.f
+  dgetc2.f dgetri.f dgetrf2.f
+  dggbak.f dggbal.f dgges.f  dggesx.f dggev.f dggev3.f  dggevx.f
+  dggglm.f dgghd3.f dgghrd.f dgglse.f dggqrf.f
+  dggrqf.f dggsvd3.f dggsvp3.f DEPRECATED/dggsvd.f DEPRECATED/dggsvp.f dgtcon.f dgtrfs.f dgtsv.f
   dgtsvx.f dgttrf.f dgttrs.f dgtts2.f dhgeqz.f
   dhsein.f dhseqr.f dlabrd.f dlacon.f dlacn2.f
   dlaein.f dlaexc.f dlag2.f  dlags2.f dlagtm.f dlagv2.f dlahqr.f
@@ -281,14 +281,14 @@
   zbdsqr.f zgbbrd.f zgbcon.f zgbequ.f zgbrfs.f zgbsv.f  zgbsvx.f
   zgbtf2.f zgbtrf.f zgbtrs.f zgebak.f zgebal.f zgebd2.f zgebrd.f
   zgecon.f zgeequ.f zgees.f  zgeesx.f zgeev.f  zgeevx.f
-  DEPRECATED/zgegs.f  DEPRECATED/zgegv.f  zgehd2.f zgehrd.f zgelq2.f zgelqf.f
+  DEPRECATED/zgegs.f  DEPRECATED/zgegv.f  zgehd2.f zgehrd.f zgejsv.f zgelq2.f zgelqf.f
   zgels.f  zgelsd.f zgelss.f DEPRECATED/zgelsx.f zgelsy.f zgeql2.f zgeqlf.f zgeqp3.f
   DEPRECATED/zgeqpf.f zgeqr2.f zgeqr2p.f zgeqrf.f zgeqrfp.f zgerfs.f zgerq2.f zgerqf.f
-  zgesc2.f zgesdd.f zgesvd.f zgesvx.f zgetc2.f
-  zgetri.f
-  zggbak.f zggbal.f zgges.f  zggesx.f zggev.f  zggevx.f zggglm.f
-  zgghrd.f zgglse.f zggqrf.f zggrqf.f
-  DEPRECATED/zggsvd.f DEPRECATED/zggsvp.f
+  zgesc2.f zgesdd.f zgesvd.f zgesvdx.f zgesvj.f zgesvx.f zgetc2.f
+  zgetri.f zgetrf2.f
+  zggbak.f zggbal.f zgges.f zgges3.f zggesx.f zggev.f zggev3.f zggevx.f zggglm.f
+  zgghd3.f zgghrd.f zgglse.f zggqrf.f zggrqf.f
+  DEPRECATED/zggsvd.f zggsvd3.f DEPRECATED/zggsvp.f zggsvp3.f
   zgtcon.f zgtrfs.f zgtsv.f  zgtsvx.f zgttrf.f zgttrs.f zgtts2.f zhbev.f
   zhbevd.f zhbevx.f zhbgst.f zhbgv.f  zhbgvd.f zhbgvx.f zhbtrd.f
   zhecon.f zheev.f  zheevd.f zheevr.f zheevx.f zhegs2.f zhegst.f
@@ -327,9 +327,9 @@
   zrot.f   zspcon.f zsprfs.f zspsv.f
   zspsvx.f zsptrf.f zsptri.f zsptrs.f zdrscl.f zstedc.f
   zstegr.f zstein.f zsteqr.f
-  zsycon.f
+  zsycon.f zsysv_aa.f
   zsyrfs.f zsysv.f  zsysvx.f zsytf2.f zsytrf.f zsytri.f zsytri2.f zsytri2x.f
-  zsyswapr.f zsytrs.f zsytrs2.f zsyconv.f
+  zsyswapr.f zsytrs.f zsytrs_aa.f zsytrs2.f zsyconv.f
   zsytf2_rook.f zsytrf_rook.f zsytrs_rook.f
   zsytri_rook.f zsycon_rook.f zsysv_rook.f
   ztbcon.f ztbrfs.f ztbtrs.f ztgevc.f ztgex2.f


SVN_SILENT made messages (.desktop file)

--- ds9/ds9.desktop.cmake
+++ ds9/ds9.desktop.cmake
@@ -21,6 +21,10 @@
 Name[nl]=DirectShow9
 Name[pt]=DirectShow9
 Name[pt_BR]=DirectShow9
+Name[sr]=Дајректшоу‑9
+Name[sr@ijekavian]=Дајректшоу‑9
+Name[sr@ijekavianlatin]=DirectShow‑9
+Name[sr@latin]=DirectShow‑9
 Name[sv]=DirectShow 9
 Name[uk]=DirectShow9
 Name[x-test]=xxDirectShow9xx
@@ -38,6 +42,10 @@
 Comment[nl]=DirectShow9-backend van Phonon
 Comment[pt]=Infra-estrutura do DirectShow9 para o Phonon
 Comment[pt_BR]=Infraestrutura do DirectShow9 para o Phonon
+Comment[sr]=Дајректшоу‑9 као позадина Фонона
+Comment[sr@ijekavian]=Дајректшоу‑9 као позадина Фонона
+Comment[sr@ijekavianlatin]=DirectShow‑9 kao pozadina Phonona
+Comment[sr@latin]=DirectShow‑9 kao pozadina Phonona
 Comment[sv]=Phonon Directshow 9-gränssnitt
 Comment[uk]=Модуль DirectShow9 для Phonon
 Comment[x-test]=xxPhonon DirectShow9 backendxx


bleh, tabs

bleh, tabs

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -1002,8 +1002,8 @@
       GIT_TAG "v${VTKM_VER}.0"
       BUILD_BYPRODUCTS
         "<INSTALL_DIR>/${VTKM_CONT_LIB}"
-	    "<INSTALL_DIR>/${VTKM_RENDERER_LIB}"
-	    "<INSTALL_DIR>/${VTKM_WORKLET_LIB}"
+        "<INSTALL_DIR>/${VTKM_RENDERER_LIB}"
+        "<INSTALL_DIR>/${VTKM_WORKLET_LIB}"
       CMAKE_ARGS
         -DBUILD_SHARED_LIBS:BOOL=OFF
         -DBUILD_TESTING:BOOL=OFF


DOC: Added note on ctest_update() possibly triggering "ERROR: script returned exit code 255"

--- CTest.cmake
+++ CTest.cmake
@@ -49,6 +49,7 @@

 ctest_start("Nightly")
 # Added ctest_update() to ensure that the commit SHA will be passed to CDash, and GitHub.
+# TODO Find out if and/or why this triggers "ERROR: script returned exit code 255"
 ctest_update()
 ctest_test()
 ctest_submit( PARTS Test )


Gracefully handle the USE_MCJIT=0 case for old LLVM without MCJIT libs

--- src/cmake/externalpackages.cmake
+++ src/cmake/externalpackages.cmake
@@ -175,12 +175,19 @@
                PATHS ${LLVM_LIB_DIR})
 message (STATUS "LLVM version  = ${LLVM_VERSION}")
 message (STATUS "LLVM dir      = ${LLVM_DIRECTORY}")
-find_library ( LLVM_MCJIT_LIBRARY
-               NAMES LLVMMCJIT
-               PATHS ${LLVM_LIB_DIR})
+
+if (USE_MCJIT)
+    find_library ( LLVM_MCJIT_LIBRARY
+                   NAMES LLVMMCJIT
+                   PATHS ${LLVM_LIB_DIR})
+else ()
+    set (LLVM_MCJIT_LIBRARY "")
+endif ()
+
 if (VERBOSE)
     message (STATUS "LLVM includes = ${LLVM_INCLUDES}")
     message (STATUS "LLVM library  = ${LLVM_LIBRARY}")
+    message (STATUS "LLVM MCJIT library  = ${LLVM_MCJIT_LIBRARY}")
     message (STATUS "LLVM lib dir  = ${LLVM_LIB_DIR}")
 endif ()


Tweaks for using installed GPUSD on Windows

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

--- GPUSD.cmake
+++ GPUSD.cmake
@@ -1,10 +1,14 @@

+if(GPUSD_ROOT)
+  list(APPEND CMAKE_MODULE_PATH "${GPUSD_ROOT}/share/gpu-sd/CMake")
+endif()
 if(NOT EQUALIZER_RELEASE)
-  list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/gpu-sd/CMake)
+  list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/gpu-sd/CMake")
 endif()
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/gpu-sd/CMake)
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/share/gpu-sd/CMake")
 list(APPEND CMAKE_MODULE_PATH /usr/share/gpu-sd/CMake)
 list(APPEND CMAKE_MODULE_PATH /usr/local/share/gpu-sd/CMake)
+
 find_package(GPUSD 1.0.1)

 if(EQUALIZER_RELEASE OR (GPUSD_FOUND AND NOT GPUSD_LOCAL))


Clear RC environment variable

Clear RC environment variable

--- scripts/clear-all.cmake
+++ scripts/clear-all.cmake
@@ -203,6 +203,7 @@
 unset(ENV{PROJECT_TEMP_DIR})
 unset(ENV{PROJECT_TEMP_ROOT})
 unset(ENV{RANLIB})
+unset(ENV{RC})
 unset(ENV{RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS})
 unset(ENV{REMOVE_CVS_FROM_RESOURCES})
 unset(ENV{REMOVE_GIT_FROM_RESOURCES})


Improve file mode

Improve file mode


macOS: Fixed Xcode not being able to find libogg.a.

--- build/cmake/Audio.cmake
+++ build/cmake/Audio.cmake
@@ -45,7 +45,7 @@

   set(OGG_INSTALL_DIR ${CMAKE_BINARY_DIR}/lib/ogg)
   set(OGG_INCLUDE_DIRS ${OGG_INSTALL_DIR}/include ${LOCAL_LIBRARY}/ogg/include)
-  if(MSVC)
+  if(MSVC OR XCODE)
     set(OGG_LIBRARIES ${OGG_INSTALL_DIR}/$<CONFIG>/${CMAKE_STATIC_LIBRARY_PREFIX}ogg${CMAKE_STATIC_LIBRARY_SUFFIX})
   else()
     set(OGG_LIBRARIES ${OGG_INSTALL_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}ogg${CMAKE_STATIC_LIBRARY_SUFFIX})


Using macro so variables go back to parent scope

--- scripts/AddHunter.cmake
+++ scripts/AddHunter.cmake
@@ -36,7 +36,7 @@
   endif()
 endmacro()

-function(find_or_add_hunter_package package)
+macro(find_or_add_hunter_package package)
   cmake_parse_arguments(ah "CONFIG;MODULE" "PACKAGE" "" ${ARGN})
   if(NOT ah_PACKAGE)
     set(ah_PACKAGE ${package})
@@ -69,4 +69,4 @@
     )
     mark_as_advanced(${ah_PACKAGE}_ADDED_VIA_HUNTER)
   endif()
-endfunction()
+endmacro()


Extended conan configurability

Extended conan configurability

--- cmake/Conan.cmake
+++ cmake/Conan.cmake
@@ -1,4 +1,5 @@
 macro(setup_conan)
+  set (CONAN_BUILD_TYPE ${ARGN})
   find_program(conan conan)
   if(NOT EXISTS ${conan})
     message(FATAL_ERROR "Conan is required. Please see README.md")
@@ -11,9 +12,9 @@
     set(os ${CMAKE_HOST_SYSTEM_NAME})
   endif()

-  if(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
+  if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
     set(compiler gcc)
-  elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL AppleClang)
+  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
     set(compiler apple-clang)
   else()
     message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
@@ -25,15 +26,17 @@
   set(conanfile_cmake ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
   set(compiler_libcxx libstdc++11)

-  if("${CMAKE_BUILD_TYPE}" STREQUAL "")
-	set(CONAN_BUILD_TYPE Debug)
-  elseif("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
-	set(CONAN_BUILD_TYPE Release)
-  else()
-	set(CONAN_BUILD_TYPE ${CMAKE_BUILD_TYPE})
+  if(NOT CONAN_BUILD_TYPE)
+    if("${CMAKE_BUILD_TYPE}" STREQUAL "")
+	  set(CONAN_BUILD_TYPE Debug)
+    elseif("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
+	  set(CONAN_BUILD_TYPE Release)
+    else()
+	  set(CONAN_BUILD_TYPE ${CMAKE_BUILD_TYPE})
+    endif()
   endif()

-  if(${CMAKE_CXX_STANDARD} EQUAL 98)
+  if(CMAKE_CXX_STANDARD EQUAL 98)
     execute_process(COMMAND ${conan} install --build=missing
 	    -s build_type=${CONAN_BUILD_TYPE} -s compiler.libcxx=${compiler_libcxx}
 	    ${CMAKE_SOURCE_DIR} RESULT_VARIABLE return_code)


Give MKL_ROOT precedence over system paths.


added Threading to build

added Threading to build


Updated MITK-Data revision tag.

Updated MITK-Data revision tag.

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

 if(BUILD_TESTING)

-  set(revision_tag 1d8634e6)
+  set(revision_tag 108eface)

   ExternalProject_Add(${proj}
     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MITK-Data_${revision_tag}.tar.gz


Added needed definitions for Linux compile

--- CMakeModules/BaseConfig.cmake
+++ CMakeModules/BaseConfig.cmake
@@ -27,7 +27,12 @@
         if(APPLE)
             set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshorten-64-to-32 -D_BSD_SOURCE")
         endif(APPLE)
-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+
+        if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+            set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE")
+        endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
     endif(UNIX)

     if (${CMAKE_BUILD_TYPE} STREQUAL Debug)


Install binaries to the right place

Install binaries to the right place

Former-commit-id: 69a871146ebf0df3f6153c7d85fbcd13e51d2d50

--- src/gop/cmake/LStoreCommon.cmake
+++ src/gop/cmake/LStoreCommon.cmake
@@ -116,6 +116,7 @@
     else()
         target_link_libraries(${f} ${library_lib})
     endif(WANT_STATIC)
+    install(TARGETS ${f} DESTINATION bin)
 endforeach(f)

 # Below is used for building packages


Revert reported platform to 2.0

Revert reported platform to 2.0

This is necessary as we don't yet implement all required
runtime APIs for 3.0 (including 2.1 and 2.2)

--- config.h.in.cmake
+++ config.h.in.cmake
@@ -221,7 +221,7 @@
 /* Disable cl_khr_fp64 because fp64 is not supported */
 #cmakedefine _CL_DISABLE_DOUBLE

-#define POCL_CL_VERSION "3.0"
+#define POCL_CL_VERSION "2.0"

 #define HSA_DEVICE_CL_VERSION_MAJOR 1
 #define HSA_DEVICE_CL_VERSION_MINOR 2


Fix TensorBoard SHA256 in cmake

Fix TensorBoard SHA256 in cmake

PiperOrigin-RevId: 157897958

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -897,7 +897,7 @@

 # Copy resources for TensorBoard.
 file(DOWNLOAD http://mirror.bazel.build/tensorboard/index.html ${DOWNLOAD_LOCATION}/tensorboard/index.html
-  EXPECTED_HASH SHA256=60f185c68ff3f906000df9670bf9f46588056b197da7e7b10074411a0c048dae)
+  EXPECTED_HASH SHA256=25554e708552ad8587152f7a444db3f4ca753f9ed72d9f8105203c1d1806d521)
 add_custom_command(TARGET tf_python_touchup_modules PRE_BUILD
   COMMAND ${CMAKE_COMMAND} -E make_directory
   ${CMAKE_CURRENT_BINARY_DIR}/tf_python/tensorflow/tensorboard/components/)


Fixed cmake tests.

Fixed cmake tests.

PiperOrigin-RevId: 159901417

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -204,6 +204,7 @@
 add_python_module("tensorflow/python/debug/lib")
 add_python_module("tensorflow/python/debug/wrappers")
 add_python_module("tensorflow/python/estimator")
+add_python_module("tensorflow/python/estimator/canned")
 add_python_module("tensorflow/python/estimator/export")
 add_python_module("tensorflow/python/estimator/inputs")
 add_python_module("tensorflow/python/estimator/inputs/queues")


follow-up to previous fix - don't link to librt twice.

--- indra/cmake/APR.cmake
+++ indra/cmake/APR.cmake
@@ -56,7 +56,7 @@

   if (LINUX)
     if (VIEWER)
-      list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} uuid rt)
+      list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} uuid)
     endif (VIEWER)
     list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} rt)
   endif (LINUX)


Fix for #83850: Please consider deprecating CINTAUTOLINK

--- cmake/ALICE_CMake.cmake
+++ cmake/ALICE_CMake.cmake
@@ -553,19 +553,23 @@
 endmacro(ALICE_CopyHeaders)

 macro(ALICE_GenerateLinkDef)
-
-  file (WRITE ${PDAL} "//--------------------------------------------------------------------------------\n")
-  file (APPEND ${PDAL} "// This is an automatically generated Root Dictionary Linkdef file for ${PACKAGE}\n")
-  file (APPEND ${PDAL} "// !!! DO NOT EDIT THIS FILE !!!\n")
-  file (APPEND ${PDAL} "#ifdef __CINT__\n")
-  file (APPEND ${PDAL} "#pragma link off all globals;\n")
-  file (APPEND ${PDAL} "#pragma link off all classes;\n")
-  file (APPEND ${PDAL} "#pragma link off all functions;\n")
+  set(PCLASSES)
   foreach (class ${PCINTCLASSES})
     get_filename_component(classname ${class} NAME)
-    file(APPEND ${PDAL} "#pragma link C++ class ${classname}+;\n")
+    set(PCLASSES ${PCLASSES} "\\n#pragma link C++ class ${classname}+;")
   endforeach(class)
-  file (APPEND ${PDAL} "#endif\n")
+
+  add_custom_command(OUTPUT ${PDAL}
+    COMMAND echo "// Auto generated file - do not edit" > ${PDAL}
+    COMMAND echo "#ifdef __CINT__" >> ${PDAL}
+    COMMAND echo "#pragma link off all globals;" >> ${PDAL}
+    COMMAND echo "#pragma link off all classes;" >> ${PDAL}
+    COMMAND echo "#pragma link off all functions;" >> ${PDAL}
+    COMMAND echo "${PCLASSES}" >> ${PDAL}
+    COMMAND echo "#endif // __CINT__" >> ${PDAL}
+    DEPENDS ${PCINTHDRS}
+    VERBATIM)
+
 endmacro(ALICE_GenerateLinkDef)

 macro(ALICE_BuildPAR)


Require explicit request for libcurl in order to enable it

--- cmake/BuildHtslib.cmake
+++ cmake/BuildHtslib.cmake
@@ -26,6 +26,8 @@
 if (HTSLIB_USE_LIBCURL)
     set(HTSLIB_CONFIGURE_OPTIONS --enable-libcurl)
     set(HTSLIB_XLIBRARIES curl crypto ssl)
+else (HTSLIB_USE_LIBCURL)
+    set(HTSLIB_CONFIGURE_OPTIONS --disable-libcurl)
 endif (HTSLIB_USE_LIBCURL)

 ExternalDependency_Add(
@@ -35,7 +37,7 @@
         URL ${CMAKE_SOURCE_DIR}/vendor/htslib-1.6.tgz
         SOURCE_DIR ${HTSLIB_ROOT}
         BINARY_DIR ${HTSLIB_ROOT}
-        CONFIGURE_COMMAND ./configure --prefix=${HTSLIB_ROOT} ${HTSLIB_CONFIGURE_OPTIONS} --enable-libcurl=check --disable-bz2 --disable-lzma && echo "Building htslib, build log at ${HTSLIB_LOG}"
+        CONFIGURE_COMMAND ./configure --prefix=${HTSLIB_ROOT} ${HTSLIB_CONFIGURE_OPTIONS} --disable-bz2 --disable-lzma && echo "Building htslib, build log at ${HTSLIB_LOG}"
         BUILD_COMMAND make INCLUDES=-I${ZLIB_INCLUDE_DIRS} > ${HTSLIB_LOG} 2>&1
         INSTALL_COMMAND "true"
 )


Use spaces instead tab.

Use spaces instead tab.

--HG--
branch : v0-8

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -463,10 +463,10 @@
         )
     endif()

-	# set boost to use dynamic linking
-	if (NOT CEGUI_BUILD_STATIC_CONFIGURATION)
-		add_definitions( -DBOOST_TEST_DYN_LINK )
-	endif()
+    # set boost to use dynamic linking
+    if (NOT CEGUI_BUILD_STATIC_CONFIGURATION)
+        add_definitions( -DBOOST_TEST_DYN_LINK )
+    endif()

     if (NOT APPLE AND CEGUI_INSTALL_WITH_RPATH)
         set_target_properties(${CEGUI_TARGET_NAME} PROPERTIES


Fix cpack config by pointing to a correct LICENSE file

--- cmake/CPackConfig.cmake
+++ cmake/CPackConfig.cmake
@@ -11,7 +11,7 @@
 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open Source Routing Machine (OSRM) is a high-performance routing engine. It combines sophisticated routing algorithms with the open and free data of the OpenStreetMap.")
 SET(CPACK_PACKAGE_CONTACT "Project OSRM <info@project-osrm.org>")
-SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENCE.TXT")
+SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.TXT")

 SET(CPACK_STRIP_FILES "TRUE")
 file(GLOB_RECURSE ProfileGlob ${CMAKE_SOURCE_DIR}/profiles/*)


clang version check improved

clang version check improved

...so that new versions do not detonate the check

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -21,11 +21,13 @@
       OUTPUT_VARIABLE CLANG_FORMAT_VERSION
       OUTPUT_STRIP_TRAILING_WHITESPACE)
     string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" CLANG_FORMAT_VERSION ${CLANG_FORMAT_VERSION})
+    string(REPLACE "." ";" CLANG_SPLIT_VERSION ${CLANG_FORMAT_VERSION})
+    list(GET CLANG_SPLIT_VERSION 0 CLANG_FORMAT_MAJOR)
+    list(GET CLANG_SPLIT_VERSION 1 CLANG_FORMAT_MINOR)
+    list(GET CLANG_SPLIT_VERSION 2 CLANG_FORMAT_PATCH)
   endif()

-  set(CLANG_FORMAT_VERSION_PATTERN "[6789].[0-9]+.[0-9]+")
-
-  if(CLANG_FORMAT AND CLANG_FORMAT_VERSION MATCHES ${CLANG_FORMAT_VERSION_PATTERN})
+  if(CLANG_FORMAT AND ${CLANG_FORMAT_MAJOR} VERSION_GREATER_EQUAL 6)
     add_custom_target("${TARGET}_clangformat"
       COMMAND ${CLANG_FORMAT}
         "-i"
@@ -37,7 +39,7 @@
       VERBATIM)
     add_dependencies(${TARGET} "${TARGET}_clangformat")
   elseif(CLANG_FORMAT)
-    message(WARNING "clang-format version ${CLANG_FORMAT_VERSION} is unsuitable.\n"
+    message(WARNING "clang-format version ${CLANG_FORMAT_VERSION} (major version ${CLANG_FORMAT_MAJOR}) is too old.\n"
       "Please download and install a version matching ${CLANG_FORMAT_VERSION_PATTERN}"
       " from http://releases.llvm.org/download.html\n"
 	  "Also adjust Visual Studio options and PATH variable as necessary!")


Add error for CLucene 0.9.17."

Add error for CLucene 0.9.17."

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

--- cmake/FindCLucene.cmake
+++ cmake/FindCLucene.cmake
@@ -55,6 +55,9 @@
       IF (CLVERSION STRLESS "0.9.16")
         MESSAGE(FATAL_ERROR "CLucene version is less than 0.9.16")
       ENDIF (CLVERSION STRLESS "0.9.16")
+      IF (CLVERSION STREQUAL "0.9.17")
+        MESSAGE(FATAL_ERROR "CLucene version 0.9.17 is not supported.")
+      ENDIF (CLVERSION STREQUAL "0.9.17")
     ENDIF (CLUCENE_LIBRARY_DIR)
   ELSE(NOT MSVC)
     #msvc doesnt use a config file


Fixed copy&paste in status reports.

Fixed copy&paste in status reports.

--- cmake/ROCSExtDeps.cmake
+++ cmake/ROCSExtDeps.cmake
@@ -171,10 +171,10 @@
 	message(STATUS "-> Boost program_options: ${ROCS_FIND_BOOST_PROGRAM_OPTIONS_STATUS}")
 endif(ROCS_FIND_BOOST_PROGRAM_OPTIONS)
 if(ROCS_FIND_BOOST_SYSTEM)
-	message(STATUS "-> Boost program_options: ${ROCS_FIND_BOOST_SYSTEM_STATUS}")
+	message(STATUS "-> Boost system: ${ROCS_FIND_BOOST_SYSTEM_STATUS}")
 endif(ROCS_FIND_BOOST_SYSTEM)
 if(ROCS_FIND_BOOST_FILESYSTEM)
-	message(STATUS "-> Boost program_options: ${ROCS_FIND_BOOST_FILESYSTEM_STATUS}")
+	message(STATUS "-> Boost filesystem: ${ROCS_FIND_BOOST_FILESYSTEM_STATUS}")
 endif(ROCS_FIND_BOOST_FILESYSTEM)
 if(ROCS_FIND_BOOST_UNIT_TEST_FRAMEWORK)
 	message(STATUS "-> Boost unit_test_framework: ${ROCS_FIND_BOOST_UNIT_TEST_FRAMEWORK_STATUS}")