Fix some issues with app set up on the Mac - oops :)

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -272,27 +272,27 @@
     endif()

     file (REMOVE_RECURSE
-            ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CEGUI_TARGET_NAME}.app/Contents/Frameworks
-            ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CEGUI_TARGET_NAME}.app/Contents/Resources
+            ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}.app/Contents/Frameworks
+            ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}.app/Contents/Resources
     )
     file (MAKE_DIRECTORY
-            ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CEGUI_TARGET_NAME}.app/Contents/Frameworks
-            ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CEGUI_TARGET_NAME}.app/Contents/Resources
+            ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}.app/Contents/Frameworks
+            ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}.app/Contents/Resources
     )

-    if (NOT _STATIC)
-        add_custom_command(TARGET ${CEGUI_TARGET_NAME} POST_BUILD
-            COMMAND ${_ACTIONCMD} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.dylib ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CEGUI_TARGET_NAME}.app/Contents/Frameworks/
-            COMMENT "Creating ${_ACTIONMSG} built cegui libraries in ${CEGUI_TARGET_NAME}.app")
-    endif()
-
-    add_custom_command(TARGET ${CEGUI_TARGET_NAME} POST_BUILD
-        COMMAND ${_ACTIONCMD} ${CMAKE_PREFIX_PATH}/lib/*.dylib ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CEGUI_TARGET_NAME}.app/Contents/Frameworks/
-        COMMENT "Creating ${_ACTIONMSG} dependency libraries in ${CEGUI_TARGET_NAME}.app")
-
-    add_custom_command(TARGET ${CEGUI_TARGET_NAME} POST_BUILD
-        COMMAND ${_ACTIONCMD} ${CMAKE_SOURCE_DIR}/datafiles ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CEGUI_TARGET_NAME}.app/Contents/Resources/
-        COMMENT "Creating ${_ACTIONMSG} sample datafiles ${CEGUI_TARGET_NAME}.app")
+    add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
+        COMMAND ${_ACTIONCMD} ${CMAKE_PREFIX_PATH}/lib/*.dylib ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}.app/Contents/Frameworks/
+        COMMENT "Creating ${_ACTIONMSG} dependency libraries in ${_TARGET_NAME}.app")
+
+    if (NOT ${_STATIC})
+        add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
+            COMMAND ${_ACTIONCMD} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.dylib ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}.app/Contents/Frameworks/
+            COMMENT "Creating ${_ACTIONMSG} built cegui libraries in ${_TARGET_NAME}.app")
+    endif()
+
+    add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
+        COMMAND ${_ACTIONCMD} ${CMAKE_SOURCE_DIR}/datafiles ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}.app/Contents/Resources/
+        COMMENT "Creating ${_ACTIONMSG} sample datafiles ${_TARGET_NAME}.app")
 endmacro()

 #
@@ -390,7 +390,7 @@
             ARCHIVE DESTINATION ${CEGUI_LIB_INSTALL_DIR}
     )

-    if (CEGUI_BUILD_STATIC_CONFIGURATION)
+        if (CEGUI_BUILD_STATIC_CONFIGURATION)
             install(TARGETS ${CEGUI_TARGET_NAME}_Static
                 RUNTIME DESTINATION bin
                 LIBRARY DESTINATION ${CEGUI_LIB_INSTALL_DIR}


static and dynamic build fix

static and dynamic build fix

--HG--
branch : v0-8

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -137,14 +137,31 @@
 #
 macro (cegui_add_dependency _TARGET_NAME _DEP_NAME)
 # Optional additional arguments: "SCOPE" "IS_SYSTEM"
+    get_target_property(_DYNAMIC_EXISTS ${_TARGET_NAME} TYPE)
+    get_target_property(_STATIC_EXISTS ${_TARGET_NAME}_Static TYPE)
     if ("${ARGC}" GREATER 2)
         if (("${ARGC}" GREATER 3) AND "${ARGV3}")
-            target_include_directories(${_TARGET_NAME} SYSTEM "${ARGV2}" ${${_DEP_NAME}_INCLUDE_DIR})
+            if (_DYNAMIC_EXISTS)
+                target_include_directories(${_TARGET_NAME} SYSTEM "${ARGV2}" ${${_DEP_NAME}_INCLUDE_DIR})
+            endif()
+            if (_STATIC_EXISTS)
+                target_include_directories(${_TARGET_NAME}_Static SYSTEM "${ARGV2}" ${${_DEP_NAME}_INCLUDE_DIR})
+            endif()
         else ()
-            target_include_directories(${_TARGET_NAME} "${ARGV2}" ${${_DEP_NAME}_INCLUDE_DIR})
+            if (_DYNAMIC_EXISTS)
+                target_include_directories(${_TARGET_NAME} "${ARGV2}" ${${_DEP_NAME}_INCLUDE_DIR})
+            endif()
+            if (_STATIC_EXISTS)
+                target_include_directories(${_TARGET_NAME}_Static "${ARGV2}" ${${_DEP_NAME}_INCLUDE_DIR})
+            endif()
         endif ()
     else ()
-        target_include_directories(${_TARGET_NAME} PRIVATE ${${_DEP_NAME}_INCLUDE_DIR})
+        if (_DYNAMIC_EXISTS)
+            target_include_directories(${_TARGET_NAME} PRIVATE ${${_DEP_NAME}_INCLUDE_DIR})
+        endif()
+        if (_STATIC_EXISTS)
+            target_include_directories(${_TARGET_NAME}_Static PRIVATE ${${_DEP_NAME}_INCLUDE_DIR})
+        endif()
     endif ()

     ###########################################################################
@@ -172,8 +189,6 @@
     ###########################################################################
     #    ADD DEPENDENCY DEFS TO STATIC VERSION OF TARGET (if it exists)
     ###########################################################################
-    get_target_property(_STATIC_EXISTS ${_TARGET_NAME}_Static TYPE)
-
     if (_STATIC_EXISTS)
         if (${_DEP_NAME}_DEFINITIONS)
             set_property( TARGET ${_TARGET_NAME}_Static APPEND PROPERTY COMPILE_DEFINITIONS ${${_DEP_NAME}_DEFINITIONS} )
@@ -688,4 +703,4 @@
             message(SEND_ERROR "${_DEFAULTVAR} is set to ${_MODNAME} but this module is not going to be built (see ${_BUILDVAR})")
         endif()
     endif()
-endmacro()+endmacro()


Fixing typo in export of option

Fixing typo in export of option

--- cmake/DawnOptions.cmake
+++ cmake/DawnOptions.cmake
@@ -31,7 +31,7 @@

 # Export options for meta projects
 dawn_export_options(DAWN
-  DAWN_ASSERT
+  DAWN_ASSERTS
   DAWN_USE_CCACHE
   DAWN_TESTING
   DAWN_DOCUMENTATION


find sqlite include

find sqlite include

--- cmake/FindSqlite3.cmake
+++ cmake/FindSqlite3.cmake
@@ -16,9 +16,12 @@
     SET(SQLITE3_FIND_QUIETLY TRUE)
 ENDIF(SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY_RELEASE AND SQLITE3_LIBRARY_DEBUG)

-FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h HINTS "${DEPS_ROOT_DIR}/include")
+#FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h HINTS "${DEPS_ROOT_DIR}/include")

 FIND_LIBRARY(SQLITE3_LIBRARY_RELEASE NAMES sqlite3 HINTS "${DEPS_ROOT_DIR}/lib")
+GET_FILENAME_COMPONENT(SQLITE3_INCLUDE_DIR "${SQLITE3_LIBRARY_RELEASE}" DIRECTORY)
+GET_FILENAME_COMPONENT(SQLITE3_INCLUDE_DIR "${SQLITE3_INCLUDE_DIR}" DIRECTORY)
+SET(SQLITE3_INCLUDE_DIR "${SQLITE3_INCLUDE_DIR}/include")

 FIND_LIBRARY(SQLITE3_LIBRARY_DEBUG NAMES sqlite3 sqlite3d
              HINTS "${DEPS_ROOT_DIR}/lib" /usr/lib/debug/usr/lib/)


Produce less warnings for unsupported targets.

--- cmake/Findcodecov.cmake
+++ cmake/Findcodecov.cmake
@@ -117,6 +117,10 @@
 					CACHE STRING "${COMPILER} flags for code coverage.")
 				mark_as_advanced(COVERAGE_${COMPILER}_FLAGS)
 				break()
+			else ()
+				message(WARNING "Code coverage is not available for ${COMPILER}"
+				        " compiler. Targets using this compiler will be "
+				        "compiled without it.")
 			endif ()
 		endforeach ()
 	endif ()
@@ -205,14 +209,20 @@
 	list(LENGTH TARGET_COMPILER NUM_COMPILERS)

 	if (NUM_COMPILERS GREATER 1)
-		message(AUTHOR_WARNING "Coverage disabled for target ${TNAME} because "
-			"it will be compiled by different compilers.")
-		return()
-
-	elseif ((NUM_COMPILERS EQUAL 0) OR
-		(NOT DEFINED "COVERAGE_${TARGET_COMPILER}_FLAGS"))
-		message(AUTHOR_WARNING "Coverage disabled for target ${TNAME} "
-			"because there is no sanitizer available for target sources.")
+		message(WARNING "Can't use code coverage for target ${TNAME}, because "
+		        "it will be compiled by incompatible compilers. Target will be "
+		        "compiled without code coverage.")
+		return()
+
+	elseif (NUM_COMPILERS EQUAL 0)
+		message(WARNING "Can't use code coverage for target ${TNAME}, because "
+		        "it uses an unknown compiler. Target will be compiled without "
+		        "code coverage.")
+		return()
+
+	elseif (NOT DEFINED "COVERAGE_${TARGET_COMPILER}_FLAGS")
+		# A warning has been printed before, so just return if flags for this
+		# compiler aren't available.
 		return()
 	endif()


Fix cmake error in Findpanda3d by no INCLUDE_DIR

--- cmake/Findpanda3d.cmake
+++ cmake/Findpanda3d.cmake
@@ -177,10 +177,12 @@
             if((${CMAKE_SYSTEM_NAME} MATCHES "Windows") OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux"))
                 # check if Eigen is used
                 foreach(configuration ${panda3d_configurations})
-                    file(STRINGS "${panda3d_INCLUDE_DIR_${configuration}}/dtool_config.h"
-                        panda3d_dtool_HAVE_EIGEN_${configuration}
-                        REGEX "#define HAVE_EIGEN 1"
-                    )
+                    if(panda3d_INCLUDE_DIR_${configuration})
+                        file(STRINGS "${panda3d_INCLUDE_DIR_${configuration}}/dtool_config.h"
+                            panda3d_dtool_HAVE_EIGEN_${configuration}
+                            REGEX "#define HAVE_EIGEN 1"
+                        )
+                    endif()
                 endforeach()
                 if(panda3d_dtool_HAVE_EIGEN_DEBUG OR panda3d_dtool_HAVE_EIGEN_RELEASE)
                     include(CMakeFindDependencyMacro)


make sure we install robuild_lite to the right path

--- cmake/ectoInstall.cmake
+++ cmake/ectoInstall.cmake
@@ -37,7 +37,7 @@
     DESTINATION ${ecto_BINARY_DIR}/unix_install/
     )
 file(COPY ${ecto_SOURCE_DIR}/cmake/rosbuild_lite.cmake
-    DESTINATION ${ecto_BINARY_DIR}/unix_install/rosbuild_lite.cmake
+    DESTINATION ${ecto_BINARY_DIR}/unix_install/
     )
 #for client projects using ecto documentation tools
 file(COPY ${PROJECT_SOURCE_DIR}/cmake/doc.cmake


[BUILD] enhance build script for optional vta dep (#6497)

--- cmake/modules/VTA.cmake
+++ cmake/modules/VTA.cmake
@@ -25,11 +25,14 @@
   set(VTA_HW_PATH $ENV{VTA_HW_PATH})
 endif()

-message(STATUS "VTA build with VTA_HW_PATH=" ${VTA_HW_PATH})
-
 if(MSVC)
   message(STATUS "VTA build is skipped in Windows..")
+elseif(NOT EXISTS ${VTA_HW_PATH})
+  if (USE_VTA_TSIM OR USE_VTA_FSIM OR USE_UFPGA)
+    message(FATAL_ERROR "VTA path " ${VTA_HW_PATH} " does not exist")
+  endif()
 elseif(PYTHON)
+  message(STATUS "VTA build with VTA_HW_PATH=" ${VTA_HW_PATH})
   set(VTA_CONFIG ${PYTHON} ${VTA_HW_PATH}/config/vta_config.py)

   if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/vta_config.json)


Also accept knl version of ISPC

Also accept knl version of ISPC

--- common/cmake/ispc.cmake
+++ common/cmake/ispc.cmake
@@ -34,7 +34,7 @@

 IF(NOT ISPC_VERSION)
   EXECUTE_PROCESS(COMMAND ${ISPC_EXECUTABLE} --version OUTPUT_VARIABLE ISPC_OUTPUT)
-  STRING(REGEX MATCH " ([0-9]+[.][0-9]+[.][0-9]+)(dev)? " DUMMY "${ISPC_OUTPUT}")
+  STRING(REGEX MATCH " ([0-9]+[.][0-9]+[.][0-9]+)(dev|knl)? " DUMMY "${ISPC_OUTPUT}")
   SET(ISPC_VERSION ${CMAKE_MATCH_1})

   IF (ISPC_VERSION VERSION_LESS ISPC_VERSION_REQUIRED)


Added option to disable gc-sections flag

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -184,8 +184,8 @@
     # Remove unreferenced functions: function level linking
     add_extra_compiler_option(-ffunction-sections)
     add_extra_compiler_option(-fdata-sections)
-    if(NOT APPLE)
-      set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
+    if(NOT APPLE AND NOT OPENCV_SKIP_GC_SECTIONS)
+      set(OPENCV_EXTRA_EXE_LINKER_FLAGS "${OPENCV_EXTRA_EXE_LINKER_FLAGS} -Wl,--gc-sections")
     endif()
   endif()


Add helpful output showing where detected include directories and libraries in FindOpenCL.cmake

--- cmake/findopencl/FindOpenCL.cmake
+++ cmake/findopencl/FindOpenCL.cmake
@@ -58,3 +58,6 @@

 # Handle QUIET and REQUIRED and check the necessary variables were set
 find_package_handle_standard_args(OpenCL DEFAULT_MSG OPENCL_LIBRARIES OPENCL_INCLUDE_DIRS)
+
+message(STATUS "OPENCL_INCLUDE_DIRS are ${OPENCL_INCLUDE_DIRS}")
+message(STATUS "OPENCL_LIBRARIES are ${OPENCL_LIBRARIES}")


Revert "Updates for generation of correct relative path for core headers"

This reverts commit e56b4a969833a1b9ce8f7bb5a359b19a5e22c4ce.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -272,7 +272,6 @@
                      rootcling_stage1 textinput thread unix winnt zip)
     foreach(core_folder ${core_folders})
       string(REPLACE "${CMAKE_SOURCE_DIR}/core/${core_folder}/inc/" ""  headerfiles "${headerfiles}")
-      string(REPLACE "${CMAKE_BINARY_DIR}/include/" "" headerfiles "${headerfiles}")
     endforeach()
   endif()

@@ -282,7 +281,6 @@
   if(PROJECT_NAME STREQUAL ROOT)
     foreach(hf ${headerfiles})
       string(REPLACE "${PROJECT_SOURCE_DIR}" "" hfrel "${hf}")
-      string(REPLACE "${CMAKE_BINARY_DIR}/include/" "" hfrel "${hf}")
       # Test folders don't follow this pattern and need absolute paths,
       # so we don't run our sanity check on them.
       if(NOT "${hfrel}" MATCHES "/test/")


[cxxmodules] Follow changes in 1ff718415b.

We insert module use clauses to point to our special modules responsible
for supplying the relevant headers.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -469,7 +469,7 @@
     endif()
   endif(APPLE)

-  set(excluded_headers RConfig.h RVersion.h RtypesImp.h TVersionCheck.h
+  set(excluded_headers RConfig.h RVersion.h RtypesImp.h
                         RtypesCore.h TClassEdit.h
                         TIsAProxy.h TVirtualIsAProxy.h
                         DllImport.h ESTLType.h ROOT/RStringView.hxx Varargs.h
@@ -487,10 +487,10 @@
   # Add a `use` directive to Core/Thread to signal that they use some
   # split out submodules and we pass the rootcling integrity check.
   if ("${library}" STREQUAL Core)
-    set (modulemap_entry "${modulemap_entry}\n  use ROOT_Types\n")
-    set (modulemap_entry "${modulemap_entry}\n  use ROOT_Core_Config_C\n")
+    set (modulemap_entry "${modulemap_entry}\n  use ROOT_Foundation_Stage1_NoRTTI\n")
+    set (modulemap_entry "${modulemap_entry}\n  use ROOT_Foundation_C\n")
   elseif ("${library}" STREQUAL Thread)
-    set (modulemap_entry "${modulemap_entry}\n  use ThreadLocalStorage\n")
+    set (modulemap_entry "${modulemap_entry}\n  use ROOT_Foundation_C\n")
   endif()

   # For modules GCocoa and GQuartz we need objc context.


[CMake] From Pere: unset headerFile:

[CMake] From Pere: unset headerFile:

Otherwise, find_file(headerFile) will claim "I did that search already".

(cherry picked from commit 180a22a53c7ee76d5059c086dac4c8972b75a563)

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -249,6 +249,7 @@
       endif()
       list(APPEND headerfiles ${fp})
       list(APPEND _list_of_header_dependencies ${headerFile})
+      unset(headerFile CACHE) # find_file, forget headerFile!
     endif()
   endforeach()


cmake: qibuild/compat: include it only once, fix message

(every other messages start with an upper case)

--- cmake/qibuild/compat/compat.cmake
+++ cmake/qibuild/compat/compat.cmake
@@ -1,9 +1,13 @@
 ## Copyright (C) 2011 Aldebaran Robotics

+if (_QI_COMPAT_CMAKE_)
+  return()
+endif()
+set(_QI_COMPAT_CMAKE_ TRUE)

 # This is to be used when the names of the
 # flags have changed:
-message(STATUS "using t001chain compatibility layer")
+message(STATUS "Using t001chain compatibility layer")

 # Example:
 # After calling:


Fix Cmake revision. (#91)

Fix Cmake revision. (#91)

Closes #90

--- src/cmake/genrev.cmake
+++ src/cmake/genrev.cmake
@@ -29,7 +29,7 @@
   if(GIT_EXECUTABLE)
     # Create a revision-string that we can use
     execute_process(
-      COMMAND "${GIT_EXECUTABLE}" describe --long --match 0.1 --dirty=+ --abbrev=12
+      COMMAND "${GIT_EXECUTABLE}" describe --long --match 0.1 --dirty=+ --abbrev=12 --always
       WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
       OUTPUT_VARIABLE rev_info
       OUTPUT_STRIP_TRAILING_WHITESPACE


FindCLANGTIDY: Handle versioned clang-tidy executable names.

--- FindCLANGTIDY.cmake
+++ FindCLANGTIDY.cmake
@@ -24,10 +24,29 @@
     set (BIN_SUBDIR bin)
     set (CLANG_TIDY_EXECUTABLE_NAME clang-tidy)

-    psq_find_tool_executable (${CLANG_TIDY_EXECUTABLE_NAME}
-                              CLANG_TIDY_EXECUTABLE
-                              PATHS ${CLANG_TIDY_SEARCH_PATHS}
-                              PATH_SUFFIXES "${BIN_SUBDIR}")
+    # Search for the canonical executable, then search for ones with
+    # a version from newest to oldest.
+    set (CLANG_TIDY_EXECUTABLE_NAMES clang-tidy
+                                     clang-tidy-3.9
+                                     clang-tidy-3.8
+                                     clang-tidy-3.7
+                                     clang-tidy-3.6
+                                     clang-tidy-3.5)
+
+    foreach (CLANG_TIDY_EXECUTABLE_NAME ${CLANG_TIDY_EXECUTABLE_NAMES})
+
+        psq_find_tool_executable (${CLANG_TIDY_EXECUTABLE_NAME}
+                                  CLANG_TIDY_EXECUTABLE
+                                  PATHS ${CLANG_TIDY_SEARCH_PATHS}
+                                  PATH_SUFFIXES "${BIN_SUBDIR}")
+
+        if (CLANG_TIDY_EXECUTABLE)
+
+            break ()
+
+        endif ()
+
+    endforeach ()

     psq_report_not_found_if_not_quiet (ClangTidy CLANG_TIDY_EXECUTABLE
                                        "The 'clang-tidy' executable was not"


Use better way of converting/building TBB makefile.sln

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1205,8 +1205,8 @@
       URL ${lcgpackages}/tbb${tbb_version}.tar.gz
       URL_HASH SHA256=780baf0ad520f23b54dd20dc97bf5aae4bc562019e0a70f53bfc4c1afec6e545
       INSTALL_DIR ${CMAKE_BINARY_DIR}
-      CONFIGURE_COMMAND devenv.exe /Upgrade build/${vsdir}/makefile.sln
-      BUILD_COMMAND MSBuild.exe build/${vsdir}/makefile.sln /p:Configuration=$<CONFIG> /p:Platform=Win32
+      CONFIGURE_COMMAND devenv.exe /useenv /upgrade build/${vsdir}/makefile.sln
+      BUILD_COMMAND devenv.exe /useenv /build "$<CONFIG>|Win32" build/${vsdir}/makefile.sln
       INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbb.dll ${CMAKE_BINARY_DIR}/bin/
               COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc.dll ${CMAKE_BINARY_DIR}/bin/
               COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc_proxy.dll ${CMAKE_BINARY_DIR}/bin/


bump CIL tags (#576)

bump CIL tags (#576)

* bump CIL tag
* update CIL-ASTRA to latest tag

--- version_config.cmake
+++ version_config.cmake
@@ -149,9 +149,9 @@

 # CCPi CIL
 set(DEFAULT_CIL_URL https://github.com/TomographicImaging/CIL.git)
-set(DEFAULT_CIL_TAG "v21.1.0")
+set(DEFAULT_CIL_TAG "ca12ef252e68eaa7a3cccd19250e5481f02bcfd2")
 set(DEFAULT_CIL-ASTRA_URL https://github.com/TomographicImaging/CIL-ASTRA.git)
-set(DEFAULT_CIL-ASTRA_TAG "v21.0.0")
+set(DEFAULT_CIL-ASTRA_TAG "v21.2.0")
 set(DEFAULT_CCPi-Regularisation-Toolkit_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git)
 set(DEFAULT_CCPi-Regularisation-Toolkit_TAG "v20.09")


Minor cleanup

Minor cleanup

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -1,4 +1,3 @@
-
 # Copyright (c) 2013 Daniel Nachbaur <daniel.nachbaur@epfl.ch>

 # This file creates package information for find_package by generating
@@ -45,7 +44,6 @@
   "\n"
 # find components if specified
   "  if(${CMAKE_PROJECT_NAME}_FIND_COMPONENTS)\n"
-  "    list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${${UPPER_PROJECT_NAME}_LIBRARY})\n"
   "    foreach(_component \${${CMAKE_PROJECT_NAME}_FIND_COMPONENTS})\n"
   "      find_library(\${_component}_libraryname ${CMAKE_PROJECT_NAME}_\${_component} NO_DEFAULT_PATH\n"
   "        PATHS \${PACKAGE_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"


Do not run stressVdt with icc, do not consider icc14 only, but all of them.

--- test/CTestCustom.cmake
+++ test/CTestCustom.cmake
@@ -9,11 +9,12 @@
       test-tcollex)
 endif()

-if(CTEST_BUILD_NAME MATCHES icc14)  #  sse tests of vc fail for icc compiler
+if(CTEST_BUILD_NAME MATCHES icc)  #  sse tests of vc fail for icc compiler
   set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE}
       vc-math_sse
       vc-math_VC_LOG_ILP2_sse
-      vc-math_VC_LOG_ILP_sse)
+      vc-math_VC_LOG_ILP_sse
+      stressVdt)
 endif()


Linkyfied Changelog when using Windows installer

--- contrib/createDoc.cmake
+++ contrib/createDoc.cmake
@@ -123,8 +123,8 @@
 				COMPONENT docu
 				OPTIONAL)

-		# create start menu entries
-		SET(CPACK_NSIS_CREATE_ICONS_EXTRA ${CPACK_NSIS_CREATE_ICONS_EXTRA} "
+	    # create start menu entries
+	    SET(CPACK_NSIS_CREATE_ICONS_EXTRA ${CPACK_NSIS_CREATE_ICONS_EXTRA} "
 	      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\TIGL-Reference.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\tigl\\\\tiglRef.pdf\\\"
 	    ")
 	    SET(CPACK_NSIS_DELETE_ICONS_EXTRA ${CPACK_NSIS_DELETE_ICONS_EXTRA} "
@@ -138,6 +138,13 @@
 	      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
 	      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\TIGL-Guide.lnk\\\"
 	    ")
+	    SET(CPACK_NSIS_CREATE_ICONS_EXTRA ${CPACK_NSIS_CREATE_ICONS_EXTRA} "
+	      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\TIGL-Changelog.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\tigl\\\\changeLog.pdf\\\"
+	    ")
+	    SET(CPACK_NSIS_DELETE_ICONS_EXTRA ${CPACK_NSIS_DELETE_ICONS_EXTRA} "
+	      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
+	      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\TIGL-Changelog.lnk\\\"
+	    ")

 	else()


Fix typo in finder script

Fix typo in finder script

--- cmake-modules/FindProtobuf.cmake
+++ cmake-modules/FindProtobuf.cmake
@@ -24,7 +24,7 @@
 endif()

 find_library(Protobuf_LIBRARY
-  NAMES protobuf libprotobuf #This is dumb, but nessecary because on mac, the prefix is "lib", but on windows its ""
+  NAMES protobuf libprotobuf #This is dumb, but necessary because on mac, the prefix is "lib", but on windows its ""
   HINTS "${Protobuf_ROOT_DIR}/lib"
         "${Protobuf_ROOT_DIR}/lib/Release"
 )


Updating compile options

Updating compile options

--- cmake/Modules/le3d-options.cmake
+++ cmake/Modules/le3d-options.cmake
@@ -26,14 +26,13 @@
 mark_as_advanced(LE3D_BMP_MIPMAPS)

 # Renderer configuration
-set(LE3D_RENDERER_FRONT			    -1.0f		CACHE STRING "Front clipping plane")
-set(LE3D_RENDERER_BACK			    -32768.0f	CACHE STRING "Back clipping plane")
-set(LE3D_RENDERER_FOV				65.0f		CACHE STRING "Default field of view")
+set(LE3D_RENDERER_NEAR_DEFAULT		1.0f		CACHE STRING "Default near clipping distance")
+set(LE3D_RENDERER_FAR_DEFAULT		32768.0f	CACHE STRING "Default far clipping distance")
+set(LE3D_RENDERER_FOV_DEFAULT		65.0f		CACHE STRING "Default field of view")
 option(LE3D_RENDERER_3DFRUSTRUM		"Use a 3D frustrum to clip triangles" On)
 option(LE3D_RENDERER_2DFRAME		"Use a 2D frame to clip triangles" Off)

 option(LE3D_RENDERER_INTRASTER "Enable fixed point or floating point rasterizing" Off)
-option(LE3D_RENDERER_MIPMAPS "Enable mipmapping on textures" On)

 set(LE3D_TRILIST_MAX				50000		CACHE STRING "Maximum number of triangles in display list")
 set(LE3D_VERLIST_MAX				150000		CACHE STRING "Maximum number of vertexes in transformation buffer")


Change option name

Change option name

--- cmake/modules/CodeCoverage.cmake
+++ cmake/modules/CodeCoverage.cmake
@@ -26,8 +26,8 @@
   option(CodeCov_BUILD_COVERAGE "Build coverage targets" On)
 endif()

-if(NOT DEFINED CodeCov_TOOLSET)
-  set(CodeCov_TOOLSET "lcov" CACHE STRING
+if(NOT DEFINED CodeCov_REPORT_TOOLSET)
+  set(CodeCov_REPORT_TOOLSET "lcov" CACHE STRING
     "The tool to generate code coverage report.")
 endif()

@@ -146,7 +146,7 @@
       "These flags will be used when a target with coverage is linked.")
   mark_as_advanced(CodeCov_${lang}_FLAGS CodeCov_${lang}_LINK_FLAGS)

-  if(CodeCov_TOOLSET STREQUAL "lcov")
+  if(CodeCov_REPORT_TOOLSET STREQUAL "lcov")
     _codecov_lcov_setup()
   else()
     message(FATAL_ERROR "unknown code coverage toolset")


removed hack for old GCC

removed hack for old GCC

--- src/cmake/sanitizers.cmake
+++ src/cmake/sanitizers.cmake
@@ -3,7 +3,3 @@
   add_compile_options(-fsanitize=${SANITIZE})
   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=${SANITIZE}")
 endif()
-
-if("${SANITIZE}" STREQUAL "address")
-  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lasan")
-endif()


package: updated FindCorrade.cmake from Corrade repository.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -71,15 +71,15 @@
 #  add_executable(app source1 source2 ... ${app_resources})
 #
 # Add dynamic plugin.
-#  corrade_add_plugin(plugin_name install_dir metadata_file
-#                     sources...)
+#  corrade_add_plugin(plugin_name debug_install_dir release_install_dir
+#                     metadata_file sources...)
 # The macro adds preprocessor directive CORRADE_DYNAMIC_PLUGIN. Additional
 # libraries can be linked in via target_link_libraries(plugin_name ...). If
-# install_dir is set to CMAKE_CURRENT_BINARY_DIR (e.g. for testing purposes),
-# the files are copied directly, without the need to run `make install`. Note
-# that the files are actually put into configuration-based subdirectory, i.e.
-# ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}. See documentation of
-# CMAKE_CFG_INTDIR variable for more information.
+# debug_install_dir is set to CMAKE_CURRENT_BINARY_DIR (e.g. for testing
+# purposes), the files are copied directly, without the need to perform install
+# step. Note that the files are actually put into configuration-based
+# subdirectory, i.e. ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}. See
+# documentation of CMAKE_CFG_INTDIR variable for more information.
 #
 #
 # Add static plugin.
@@ -89,6 +89,10 @@
 # libraries can be linked in via target_link_libraries(plugin_name ...). If
 # install_dir is set to CMAKE_CURRENT_BINARY_DIR (e.g. for testing purposes),
 # no installation rules are added.
+#
+# Note that plugins built in debug configuration (e.g. with CMAKE_BUILD_TYPE
+# set to Debug) have "-d" suffix to make it possible to have both debug and
+# release plugins installed alongside each other.
 #
 #
 # Additionally these variables are defined for internal usage:


Allow a FOLDER argument which if set will place the project in a solution folder (on supported platforms)

--- tools/cmake/ANHExecutable.cmake
+++ tools/cmake/ANHExecutable.cmake
@@ -56,7 +56,7 @@
 INCLUDE(ANHLibrary)

 FUNCTION(AddANHExecutable name)
-    PARSE_ARGUMENTS(ANHEXE "DEPENDS;SOURCES;TEST_SOURCES;ADDITIONAL_LIBRARY_DIRS;ADDITIONAL_INCLUDE_DIRS;ADDITIONAL_SOURCE_DIRS;DEBUG_LIBRARIES;OPTIMIZED_LIBRARIES" "" ${ARGN})
+    PARSE_ARGUMENTS(ANHEXE "DEPENDS;FOLDER;SOURCES;TEST_SOURCES;ADDITIONAL_LIBRARY_DIRS;ADDITIONAL_INCLUDE_DIRS;ADDITIONAL_SOURCE_DIRS;DEBUG_LIBRARIES;OPTIMIZED_LIBRARIES" "" ${ARGN})

     # get information about the data passed in, helpful for checking if a value
     # has been set or not
@@ -131,14 +131,19 @@
 	IF(_librarydirs_list_length GREATER 0)
         LINK_DIRECTORIES(${ANHEXE_ADDITIONAL_LIBRARY_DIRS})
     ENDIF()
-
+
+    if(NOT "${ANHEXE_FOLDER}" STREQUAL "")
+        set(EXECUTABLE_FOLDER FOLDER "${ANHEXE_FOLDER}")
+    endif()
+
     # Create the executable and link to it's library
     ADD_EXECUTABLE(${name} ${SOURCES})
 	SET_TARGET_PROPERTIES(${name}
 		PROPERTIES
 		ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
+		${EXECUTABLE_FOLDER}
     )
-
+
     IF(_project_deps_list_length GREATER 0)
         TARGET_LINK_LIBRARIES(${name} ${ANHEXE_DEPENDS})
     ENDIF()


Update FW: rotate RGB camera view 180deg on OAK-1 (Gen1)


COMP: Add OpenCV path to dashboard setup.

--- CMake/MITKDashboardSetup.cmake
+++ CMake/MITKDashboardSetup.cmake
@@ -47,6 +47,20 @@
   string(REGEX REPLACE ".*Qt version ([0-9.]+) .*" "\\1" MY_QT_VERSION ${MY_QT_VERSION})
 endif()

+set(OPENCV_DIR)
+if(WIN32 AND MITK_USE_OpenCV)
+  find_package(OpenCV REQUIRED CONFIG PATHS "${CTEST_BINARY_DIRECTORY}/ep")
+  set(_opencv_link_directories
+    "${OpenCV_LIB_DIR_DBG}"
+    "${OpenCV_LIB_DIR_OPT}"
+    "${OpenCV_3RDPARTY_LIB_DIR_DBG}"
+    "${OpenCV_3RDPARTY_LIB_DIR_OPT}")
+  list(REMOVE_DUPLICATES _opencv_link_directories)
+  foreach(_opencv_link_directory ${_opencv_link_directories})
+    list(APPEND OPENCV_DIR "${_opencv_link_directory}/../bin")
+  endforeach()
+endif()
+
 #
 # Project specific properties
 #
@@ -64,7 +78,7 @@
 if(WIN32)
   set(SOFA_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/SOFA-build/bin/${CTEST_BUILD_CONFIGURATION}")
   set(BLUEBERRY_OSGI_DIR "${CTEST_BINARY_DIRECTORY}/MITK-build/bin/BlueBerry/org.blueberry.osgi/bin/${CTEST_BUILD_CONFIGURATION}")
-  set(CTEST_PATH "${CTEST_PATH};${CTEST_BINARY_DIRECTORY}/ep/bin;${QT_BINARY_DIR};${SOFA_BINARY_DIR};${BLUEBERRY_OSGI_DIR}")
+  set(CTEST_PATH "${CTEST_PATH};${CTEST_BINARY_DIRECTORY}/ep/bin;${QT_BINARY_DIR};${SOFA_BINARY_DIR};${BLUEBERRY_OSGI_DIR};${OPENCV_DIR}")
 endif()
 set(ENV{PATH} "${CTEST_PATH}")


BUG: Limit itksoftwareguide-dashboard build parallelism

Prevent build errors from running out of memory on CircleCI.

--- Docker/itksoftwareguide-dashboard/dashboard.cmake
+++ Docker/itksoftwareguide-dashboard/dashboard.cmake
@@ -16,6 +16,7 @@
 set( CTEST_SOURCE_DIRECTORY ${CTEST_DASHBOARD_ROOT}ITKSoftwareGuide )
 set( CTEST_BINARY_DIRECTORY ${CTEST_DASHBOARD_ROOT}ITKSoftwareGuide-build )
 set( CTEST_CONFIGURATION_TYPE ${CTEST_BUILD_CONFIGURATION} )
+set( CTEST_BUILD_FLAGS "-j5" )

 find_program(CTEST_GIT_COMMAND NAMES git git.cmd)
 if(NOT DEFINED CTEST_GIT_COMMAND)


[buildsystem] python packages from plugins are installed directly in the prefix/lib/python2.7/site-packages folder

Former-commit-id: dabf8009011181f56235e7b16b5f7b23d4a66f12

--- SofaFramework/SofaMacros.cmake
+++ SofaFramework/SofaMacros.cmake
@@ -205,17 +205,15 @@
         file(RELATIVE_PATH script "${CMAKE_CURRENT_SOURCE_DIR}/${directory}" "${python_file}")
         get_filename_component(path ${script} DIRECTORY)
         install(FILES ${directory}/${script}
-                DESTINATION "lib/python2.7/site-packages/${plugin_name}/${path}")
+                DESTINATION "lib/python2.7/site-packages/${path}")
     endforeach()

     ## Python configuration file (build tree)
     file(WRITE "${CMAKE_BINARY_DIR}/etc/sofa/python.d/${plugin_name}"
-         "${CMAKE_CURRENT_SOURCE_DIR}/python
-")
+         "${CMAKE_CURRENT_SOURCE_DIR}/python")
     ## Python configuration file (install tree)
      file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/installed-SofaPython-config"
-         "lib/python2.7/site-packages/${plugin_name}
-")
+         "lib/python2.7/site-packages")
      install(FILES "${CMAKE_CURRENT_BINARY_DIR}/installed-SofaPython-config"
              DESTINATION "etc/sofa/python.d"
              RENAME "${plugin_name}")


Split off 8.8.18

Split off 8.8.18

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 8 )
-set ( HPCC_POINT 17 )
+set ( HPCC_POINT 19 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Nagios Monitoring 5.0.0-rc8 Release Candidate 8

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,5 +5,5 @@
 set ( HPCC_NM_MINOR 0 )
 set ( HPCC_NM_POINT 0 )
 set ( HPCC_NM_MATURITY "rc" )
-set ( HPCC_NM_SEQUENCE 3 )
+set ( HPCC_NM_SEQUENCE 8 )
 ###


Graph Control 4.2.2-1 Gold

Graph Control 4.2.2-1 Gold

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,8 +5,8 @@
 set ( HPCC_MAJOR 4 )
 set ( HPCC_MINOR 2 )
 set ( HPCC_POINT 2 )
-set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 11 )
+set ( HPCC_MATURITY "release" )
+set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


[cmake] automatic date/time information in version info

--- version.cmake
+++ version.cmake
@@ -14,7 +14,11 @@
 	set (AXL_VERSION_TAG_SUFFIX)
 endif ()

+string (TIMESTAMP AXL_VERSION_YEAR  "%Y")
+string (TIMESTAMP AXL_VERSION_MONTH "%m")
+string (TIMESTAMP AXL_VERSION_DAY   "%d")
+
 set (AXL_VERSION_COMPANY   "Tibbo Technology Inc")
-set (AXL_VERSION_YEARS     "2007-2016")
+set (AXL_VERSION_YEARS     "2007-${AXL_VERSION_YEAR}")

 #..............................................................................


Graph Control 3.10.0 Release Candidate 7

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -6,5 +6,5 @@
 set ( HPCC_MINOR 10 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "candidate" )
-set ( HPCC_SEQUENCE 5 )
+set ( HPCC_SEQUENCE 7 )
 ###


Handle mac launcher script (binary path is different)

--- packaging/unix/Launchers.cmake
+++ packaging/unix/Launchers.cmake
@@ -26,7 +26,13 @@

 set(LOCATE "")
 set(MEDINRIA_DIR ${CMAKE_BINARY_DIR})
-set(MEDINRIA_BIN ${binary_dir}/bin/medInria)
+
+if (APPLE)
+  set(MEDINRIA_BIN ${binary_dir}/bin/medInria.app/Contents/MacOS/medInria)
+else()
+  set(MEDINRIA_BIN ${binary_dir}/bin/medInria)
+endif()
+
 set(MEDINRIA_PLUGINS_DIRS "${binary_dir}/plugins:${DEV_PLUGINS_DIRS}")

 configure_file(${CURRENT_SRC_DIR}/medInria.sh.in medInria.sh @ONLY)
@@ -35,7 +41,13 @@

 file(READ "${CURRENT_SRC_DIR}/locate_bin.sh" LOCATE)
 set(MEDINRIA_DIR "$(locate)")
-set(MEDINRIA_BIN "\${MEDINRIA_DIR}/bin/medInria")
+
+if (APPLE)
+  set(MEDINRIA_BIN "\${MEDINRIA_DIR}/bin/medInria.app/Contents/MacOS/medInria")
+else()
+  set(MEDINRIA_BIN "\${MEDINRIA_DIR}/bin/medInria")
+endif()
+
 set(MEDINRIA_PLUGINS_DIRS "\${MEDINRIA_DIR}/plugins:\${MEDINRIA_USER_PLUGINS_DIRS}")

 configure_file(${CURRENT_SRC_DIR}/medInria.sh.in ${CURRENT_BIN_DIR}/medInria_launcher.sh @ONLY)


Wrong binary for render_ascii

Wrong binary for render_ascii

--- test/testing.cmake
+++ test/testing.cmake
@@ -28,7 +28,7 @@
   ${MESHES}/cube/pumi11/cube.smb
   render_test)
 mpi_test(render_ascii 1
-  ./render
+  ./render_ascii
   ${MESHES}/cube/cube.dmg
   ${MESHES}/cube/pumi11/cube.smb
   render_ascii_test)


BUG: TIFF download link in SuperBuild/External_TIFF.cmake broken. Link changed to 4.0.4 version with corresponding MD5

--- SuperBuild/External_TIFF.cmake
+++ SuperBuild/External_TIFF.cmake
@@ -83,8 +83,8 @@
   AutoConf_FLAGS(${proj}_CXXFLAGS CXX "${APPLE_CFLAGS}")

   ### --- End Project specific additions
-  set(${proj}_URL "http://download.osgeo.org/libtiff/tiff-4.0.3.tar.gz")
-  set(${proj}_MD5 "051c1068e6a0627f461948c365290410")
+  set(${proj}_URL "http://download.osgeo.org/libtiff/tiff-4.0.4.tar.gz")
+  set(${proj}_MD5 "9aee7107408a128c0c7b24286c0db900")
   ExternalProject_Add(${proj}
     URL ${${proj}_URL}
     ${URL_HASH_CLAUSE}


CMake: Revise _ALWAYSLINK_LIBS_MLIR

CMake: Revise _ALWAYSLINK_LIBS_MLIR

Closes https://github.com/google/iree/pull/1529

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/iree/pull/1529 from iml130:cmake-alwayslink 670764ce031d118ad0764c12bca05f97a8610b1a
PiperOrigin-RevId: 306702851

--- build_tools/cmake/iree_alwayslink.cmake
+++ build_tools/cmake/iree_alwayslink.cmake
@@ -56,15 +56,10 @@

 function(set_alwayslink_mlir_libs)
   set(_ALWAYSLINK_LIBS_MLIR
-    # Required passes
-    MLIRPass
     # TODO(marbre): Check the previously added libs
     MLIRAnalysis
     MLIREDSC
-    MLIRLoopToStandard
     MLIRParser
-    MLIRStandardToLLVM
-    MLIRTargetLLVMIR
     MLIRTransforms
     MLIRTranslation
     MLIRSupport


changes in FindWampcpp.make

changes in FindWampcpp.make

--- wamp_cpp/CMakeModules/FindWampcpp.cmake
+++ wamp_cpp/CMakeModules/FindWampcpp.cmake
@@ -20,11 +20,13 @@
 # find the include directories.
  # only look in default directories
 find_path(
-  WAMPCPP_INCLUDE_DIR
-  NAMES WAMPServer.h
-  PATHS ${WAMPCPPLIB_ROOT_DIR}/include
+  WAMPCPP_INCLUDE_DIR
+  NAMES wamp_cpp/WAMPServer.h
+  HINTS
+   /usr/include
   DOC "wamp_cpp include dir"
  )
+

 find_library(
   WAMPCPP_LIBRARY


generation: fix handling of external dependencies in CMake code

The PkgConfig object was used instead of its name

--- lib/orocos/templates/config/OrocosComponent.cmake
+++ lib/orocos/templates/config/OrocosComponent.cmake
@@ -59,13 +59,20 @@
 list(APPEND DEPENDENCIES_LDFLAGS ${<%= name %>_TOOLKIT_LDFLAGS})
 <% end %>

-SET(USED_LIBRARIES_LIBS "")
-<% component.used_libraries.each do |pkg| %>
+<% component.used_libraries.each do |pkg|
+name = pkg.name %>
 pkg_check_modules(<%= name %> REQUIRED <%= name %>)
 INCLUDE_DIRECTORIES(${<%= name %>_INCLUDE_DIRS})
 LINK_DIRECTORIES(${<%= name %>_LIBRARY_DIRS})
+list(APPEND DEPENDENCIES_LDFLAGS ${<%= name %>_LDFLAGS})
+<% end %>

-list(APPEND DEPENDENCIES_LDFLAGS ${<%= name %>_LDFLAGS})
+<% component.used_task_libraries.each do |pkg|
+name = pkg.name %>
+pkg_check_modules(<%= name %>_TASKLIB REQUIRED <%= name %>-tasks-${OROCOS_TARGET})
+INCLUDE_DIRECTORIES(${<%= name %>_TASKLIB_INCLUDE_DIRS})
+LINK_DIRECTORIES(${<%= name %>_TASKLIB_LIBRARY_DIRS})
+list(APPEND DEPENDENCIES_LDFLAGS ${<%= name %>_TASKLIB_LDFLAGS})
 <% end %>

 MESSAGE(STATUS "External dependencies libraries: ${DEPENDENCIES_LDFLAGS}")


CI: enable -Werror on OSX

CI: enable -Werror on OSX

--- ci-build.cmake
+++ ci-build.cmake
@@ -31,6 +31,7 @@
         -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=TRUE)

     set(OTHER
+        ${OTHER}
         -DOGRE_DEPENDENCIES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/ogredeps
         ${CROSS})
 endif()


Updated Buzz to search for Lua5.3

Updated Buzz to search for Lua5.3

--- src/cmake/BuzzBuildChecks.cmake
+++ src/cmake/BuzzBuildChecks.cmake
@@ -12,7 +12,9 @@
   link_directories(${ARGOS_LIBRARY_DIRS})
   set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ARGOS_PREFIX}/share/argos3/cmake)
   include(ARGoSCheckQTOpenGL)
-  # Look for Lua52
-  find_package(Lua52 REQUIRED)
-  include_directories(${LUA_INCLUDE_DIR})
+  # Look for Lua53
+  find_package(Lua53)
+  if(Lua53_FOUND)
+    include_directories(${LUA_INCLUDE_DIR})
+  endif(Lua53_FOUND)
 endif(ARGOS_FOUND)


cmake: fix compiler flags (CPU_BASELINE_REQUIRED=xxx + CPU_BASELINE=DETECT)

--- cmake/OpenCVCompilerOptimizations.cmake
+++ cmake/OpenCVCompilerOptimizations.cmake
@@ -30,6 +30,8 @@
 # CPU_DISPATCH_FINAL=<list> - final list of dispatched optimizations
 #
 # CPU_DISPATCH_FLAGS_${opt} - flags for source files compiled separately (<name>.avx2.cpp)
+#
+# CPU_{opt}_ENABLED_DEFAULT=ON/OFF - has compiler support without additional flag (CPU_BASELINE_DETECT=ON only)

 set(CPU_ALL_OPTIMIZATIONS "SSE;SSE2;SSE3;SSSE3;SSE4_1;SSE4_2;POPCNT;AVX;FP16;AVX2;FMA3;AVX_512F;AVX512_SKX")
 list(APPEND CPU_ALL_OPTIMIZATIONS NEON VFPV3 FP16)
@@ -345,6 +347,7 @@
           ocv_check_compiler_flag(CXX "${CPU_BASELINE_FLAGS}" "${_varname}" "${CPU_${OPT}_TEST_FILE}")
           if(${_varname})
             list(APPEND CPU_BASELINE_FINAL ${OPT})
+            set(CPU_${OPT}_ENABLED_DEFAULT ON)
             set(__available 1)
           endif()
         endif()
@@ -462,7 +465,7 @@
       if(NOT ";${CPU_BASELINE_FINAL};" MATCHES ";${OPT};")
         list(APPEND CPU_BASELINE_FINAL ${OPT})
       endif()
-      if(NOT CPU_BASELINE_DETECT)  # Don't change compiler flags in 'detection' mode
+      if(NOT CPU_${OPT}_ENABLED_DEFAULT)  # Don't change compiler flags in 'detection' mode
         ocv_append_optimization_flag(CPU_BASELINE_FLAGS ${OPT})
       endif()
     endif()


fixed installation of workspace marker

fixed installation of workspace marker

--- cmake/catkin_generate_environment.cmake
+++ cmake/catkin_generate_environment.cmake
@@ -44,8 +44,10 @@
   set(CURRENT_WORKSPACE ${CMAKE_INSTALL_PREFIX})

   if(NOT CATKIN_BUILD_BINARY_PACKAGE OR "${PROJECT_NAME}" STREQUAL "catkin")
-    # create workspace marker
-    file(WRITE ${CMAKE_INSTALL_PREFIX}/CATKIN_WORKSPACE "")
+    # install workspace marker
+    install(FILES
+      ${CMAKE_INSTALL_PREFIX}/CATKIN_WORKSPACE
+      DESTINATION ${CMAKE_INSTALL_PREFIX})
     # install setup.py
     install(PROGRAMS
       ${catkin_EXTRAS_DIR}/templates/setup.py


Removed non-existing file

Removed non-existing file

--- Modules/BasicImageProcessing/files.cmake
+++ Modules/BasicImageProcessing/files.cmake
@@ -1,7 +1,6 @@
 file(GLOB_RECURSE H_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/include/*")

 set(CPP_FILES
-   mitkEmptyClass.cpp
    mitkArithmeticOperation.cpp
 )


fix a typo in cmake files

fix a typo in cmake files

--- build/FindCheck.cmake
+++ build/FindCheck.cmake
@@ -11,7 +11,7 @@

 list(APPEND CHECK_LIBRARIES rt)
 list(APPEND CHECK_LIBRARIES m)
-list(APPEND CHECK_LIBRARIES ${CMAKE_THREAD_LIB_INIT})
+list(APPEND CHECK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})

 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Check
 	REQUIRED_VARS CHECK_LIBRARIES CHECK_INCLUDE_DIRS)


Update ICC flags to avoid deprecated options.

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -152,8 +152,8 @@
     IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
       SET(OPT_FLG "-O3 -unroll2 -ip")
       SET(DBG_FLG "")
-      SET(COMMON_CFLAGS   "-static-intel -static-libgcc -g -mp -restrict -no-ftz -no-prefetch")
-      SET(COMMON_CXXFLAGS "-static-intel -static-libgcc -g -mp -restrict -no-ftz -no-prefetch")
+      SET(COMMON_CFLAGS   "-static-intel -static-libgcc -g -mieee-fp -restrict -no-ftz -no-opt-prefetch")
+      SET(COMMON_CXXFLAGS "-static-intel -static-libgcc -g -mieee-fp -restrict -no-ftz -no-opt-prefetch")
       SET(WITH_SSL no)
     ENDIF()
   ENDIF()


Update PCHSupport.cmake

Update PCHSupport.cmake

--- cmake/Modules/PCHSupport.cmake
+++ cmake/Modules/PCHSupport.cmake
@@ -1,6 +1,5 @@
 include(cotire)

-if(WIN32)
 function(GEN_CXX_PCH TARGET_LIST PCH_HEADERS)
   # iterate through targets
   foreach(TARGET_HEADER ${TARGET_LIST})
@@ -12,10 +11,3 @@
   endforeach()
   cotire(${TARGET_LIST})
 endfunction(GEN_CXX_PCH)
-else()
-  function(GEN_CXX_PCH TARGET_LIST PCH_HEADERS)
-    foreach(TARGET_HEADER ${TARGET_LIST})
-      target_precompile_headers(${TARGET_HEADER} PRIVATE ${PCH_HEADERS})
-    endforeach()
-  endfunction(GEN_CXX_PCH)
-endif()


added: config workaround for clang 3.4+ and boost < 1.56

--- share/hugh/cmake/CMakeAddons_SetupVariables.cmake
+++ share/hugh/cmake/CMakeAddons_SetupVariables.cmake
@@ -7,11 +7,11 @@
 ####################################################################################################

 # Boost
-set(BOOST_MINIMUM_VERSION "1.55.0")
+set(BOOST_MINIMUM_VERSION 1.55.0)

 if(CMAKE_HOST_WIN32)
-  foreach(version "1.59.0" "1.57.0" "1.55.0")
-    set(BOOST_ROOT "C:/Tools/boost/${version}")
+  foreach(version 1.60.0 1.59.0 1.57.0 1.55.0)
+    set(BOOST_ROOT C:/Tools/boost/${version})
     if(EXISTS "${BOOST_ROOT}" AND IS_DIRECTORY "${BOOST_ROOT}")
       break()
     endif()
@@ -46,12 +46,24 @@
     endif()
   endif()
 elseif(CMAKE_HOST_UNIX)
-  set(Boost_DEBUG               FALSE)
-  # set(Boost_USE_STATIC_LIBS     ON)
-  set(Boost_USE_MULTITHREAD     ON)
+  set(Boost_DEBUG           FALSE)
+  set(Boost_USE_MULTITHREAD ON)

   add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
   add_definitions(-DBOOST_ALL_DYN_LINK)
+endif()
+
+# [https://stackoverflow.com/questions/22476267]
+# [https://svn.boost.org/trac/boost/ticket/9610]
+#cma_print_variable(Boost_VERSION)
+#cma_print_variable(CMAKE_CXX_COMPILER_ID)
+#cma_print_variable(CMAKE_CXX_COMPILER_VERSION)
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "CLANG" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.3)
+  find_package(Boost ${BOOST_MINIMUM_VERSION} QUIET)
+
+  if (Boost_VERSION VERSION_LESS 105060)
+    add_definitions(-DBOOST_HAS_INT128)
+  endif()
 endif()

 # GL[I|M]


Make the default build type a little cleverer

Detect the presence of the .git directory, if present default to a Debug
build, otherwise default to a Release build for source tarballs.

--- cmake/BuildType.cmake
+++ cmake/BuildType.cmake
@@ -1,7 +1,13 @@
 # Set a default build type if none was specified
+set(default_build_type "Release")
+if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
+  set(default_build_type "Debug")
+endif()
+
 if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
-  message(STATUS "Setting build type to 'Debug' as none was specified.")
-  set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
+  message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
+  set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
+      STRING "Choose the type of build." FORCE)
   # Set the possible values of build type for cmake-gui
   set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
     "MinSizeRel" "RelWithDebInfo")


FindFFTW3.cmake: initialize FFTW3_DEFINITIONS to avoid cmake errors

when there;s no fftw installed

--- cmake/FindFFTW3.cmake
+++ cmake/FindFFTW3.cmake
@@ -67,6 +67,7 @@

 	set(FFTW3_VERSION "3.${FFTW3_VERSION_MINOR}")
 else ()
+	set(FFT3_DEFINITIONS "")
 	find_package(PkgConfig)

 	macro(_fftw3_lib _SUFFIXV _SUFFIXF)


* Adding support for suil RPC and JSON RPC * Also added support for a code generator to generate RPC files and IOD data types from a file

--- cmake/SuilUtils.cmake
+++ cmake/SuilUtils.cmake
@@ -58,6 +58,11 @@
     endif()
 endfunction()

+function(SuilListJoin VALUES GLUE OUTPUT)
+    string(REPLACE ";" "${GLUE}" _TMP_STR "${VALUES}")
+    set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE)
+endfunction()
+
 function(suil_gen_types name)
     set(options "")
     set(kvargs  BINARY OUTPUT PROJECT)
@@ -145,7 +150,7 @@
                 ${${name}_OUTDIR}/${__temp}.cpp)
     endforeach()

-    list(JOIN SUIL_SCC_SOURCES "," ${name}_SOURCES)
+    SuilListJoin(${${name}_SOURCES} "," ${name}_SOURCES)
     message(STATUS "${name} scc sources: ${${name}_SOURCES}")
     message(STATUS "${name} scc outputs: ${${name}_OUTPUTS}")


[llvm-exegesis] Check for libpfm headers.

HAVE_LIBPFM is only defined if the libpfm headers are present.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -87,7 +87,17 @@
   endif()
   check_library_exists(dl dlopen "" HAVE_LIBDL)
   check_library_exists(rt clock_gettime "" HAVE_LIBRT)
-  check_library_exists(pfm pfm_initialize "" HAVE_LIBPFM)
+endif()
+
+# Check for libpfm.
+check_library_exists(pfm pfm_initialize "" HAVE_LIBPFM_INITIALIZE)
+if(HAVE_LIBPFM_INITIALIZE)
+  check_include_file(perfmon/perf_event.h HAVE_PERFMON_PERF_EVENT_H)
+  check_include_file(perfmon/pfmlib.h HAVE_PERFMON_PFMLIB_H)
+  check_include_file(perfmon/pfmlib_perf_event.h HAVE_PERFMON_PFMLIB_PERF_EVENT_H)
+  if(HAVE_PERFMON_PERF_EVENT_H AND HAVE_PERFMON_PFMLIB_H AND HAVE_PERFMON_PFMLIB_PERF_EVENT_H)
+    set(HAVE_LIBPFM 1)
+  endif()
 endif()

 if(HAVE_LIBPTHREAD)


[Libcxxabi]: Support using compiler-rt for MinGW64

Reviewers: EricWF

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

git-svn-id: 6a9f6578bdee8d959f0ed58970538b4ab6004734@302824 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -30,9 +30,14 @@
   if (MINGW)
     # Mingw64 requires quite a few "C" runtime libraries in order for basic
     # programs to link successfully with -nodefaultlibs.
-    set(MINGW_LIBRARIES mingw32 gcc_s gcc moldname mingwex msvcrt advapi32
-                        shell32 user32 kernel32 iconv mingw32 gcc_s gcc moldname
-                        mingwex msvcrt)
+    if (LIBCXXABI_USE_COMPILER_RT)
+      set(MINGW_RUNTIME ${LIBCXXABI_BUILTINS_LIBRARY})
+    else ()
+      set(MINGW_RUNTIME gcc_s gcc)
+    endif()
+    set(MINGW_LIBRARIES mingw32 ${MINGW_RUNTIME} moldname mingwex msvcrt advapi32
+                        shell32 user32 kernel32 iconv mingw32 ${MINGW_RUNTIME}
+                        moldname mingwex msvcrt)
     list(APPEND CMAKE_REQUIRED_LIBRARIES ${MINGW_LIBRARIES})
   endif()
   if (CMAKE_C_FLAGS MATCHES -fsanitize OR CMAKE_CXX_FLAGS MATCHES -fsanitize)


[cmake] fix component find

[cmake] fix component find

--- cmake/nd-config.cmake
+++ cmake/nd-config.cmake
@@ -54,8 +54,14 @@
 endif()

 ### Handle components
+# component name and the imported target must be the same
 foreach(package ${ND_FIND_COMPONENTS})
   find_package(${package} CONFIG PATHS .)
+  get_property(plugin TARGET ${package} PROPERTY LOCATION)
+  if(plugin) ## should remove this when I add config files for the plugins?
+    set(ND_${package}_FOUND TRUE)
+  endif()
+  install(FILES ${plugin} DESTINATION bin/plugins)
 endforeach()

 ### Check everything got found
@@ -67,12 +73,43 @@
 )

 ### macro for copying plugins to a target's build Location
-macro(nd_copy_plugins_to_target _target)
-    add_custom_command(TARGET ${_target} POST_BUILD
-      COMMAND ${CMAKE_COMMAND} -E copy_directory
-          ${INSTALL_DIR}/bin/plugins
-          $<TARGET_FILE_DIR:${_target}>/plugins
-          COMMENT "Copying libnd plugins to build path for ${_target}."
-          )
-    add_dependencies(${_target} libnd)
-endmacro()
+# component name and the imported target must be the same
+#
+# plugins should define an "Extras" variable named <plugin>-EXTRAS
+# that has an extra files (eg associated shared libraries) to be copied
+# along side the plugin.
+function(nd_copy_plugins_to_target _target _plugins)
+    list(REMOVE_AT ARGV 0)
+    foreach(package ${ARGV})
+      if(NOT TARGET ${package})
+        find_package(${package} CONFIG PATHS .)
+      endif()
+      if(TARGET ${package})
+        get_property(plugin TARGET ${package} PROPERTY LOCATION)
+        if(plugin)
+          message(STATUS "Configuring ${package} to be copied to build path for ${_target}.")
+          add_custom_command(TARGET ${_target} POST_BUILD
+            COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${_target}>/plugins/
+            COMMAND ${CMAKE_COMMAND} -E copy
+                ${plugin}
+                $<TARGET_FILE_DIR:${_target}>/plugins
+                COMMENT "Copying ${package} to build path for ${_target}."
+                )
+          add_dependencies(${_target} ${package})
+          # extras
+          if(${package}-EXTRAS)
+            message(STATUS "Configuring ${package} extras to be copied to build path for ${_target}.")
+            foreach(extra ${${package}-EXTRAS})
+            add_custom_command(TARGET ${_target} POST_BUILD
+                COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${_target}>/plugins/
+                COMMAND ${CMAKE_COMMAND} -E copy
+                    ${extra}
+                    $<TARGET_FILE_DIR:${_target}>/plugins
+                    COMMENT "Copying ${extra} to build path for ${_target}."
+                    )
+            endforeach()
+          endif()
+        endif()
+      endif()
+    endforeach()
+endfunction()


cpack: Revert renaming com.facebook.plist to com.osquery.plist (#6093)

--- cmake/packaging.cmake
+++ cmake/packaging.cmake
@@ -231,14 +231,10 @@
     install(FILES "${CMAKE_SOURCE_DIR}/tools/deployment/certs.pem" COMPONENT osquery DESTINATION /private/var/osquery/certs)

     file(COPY "${CMAKE_SOURCE_DIR}/tools/deployment/com.facebook.osqueryd.conf" DESTINATION "${CMAKE_BINARY_DIR}/package/pkg")
-    file(RENAME "${CMAKE_BINARY_DIR}/package/pkg/com.facebook.osqueryd.conf" "${CMAKE_BINARY_DIR}/package/pkg/com.osquery.osqueryd.conf")
-    install(FILES "${CMAKE_BINARY_DIR}/package/pkg/com.osquery.osqueryd.conf" DESTINATION /private/var/osquery COMPONENT osquery)
-
-    file(READ "${CMAKE_SOURCE_DIR}/tools/deployment/com.facebook.osqueryd.plist" osquery_service_plist)
-    string(REPLACE "com.facebook.osqueryd" "com.osquery.osqueryd" osquery_service_plist "${osquery_service_plist}")
-    file(WRITE "${CMAKE_BINARY_DIR}/package/productbuild/com.osquery.osqueryd.plist" "${osquery_service_plist}")
-
-    install(FILES "${CMAKE_BINARY_DIR}/package/productbuild/com.osquery.osqueryd.plist" DESTINATION /private/var/osquery COMPONENT osquery)
+    install(FILES "${CMAKE_BINARY_DIR}/package/pkg/com.facebook.osqueryd.conf" DESTINATION /private/var/osquery COMPONENT osquery)
+
+    file(COPY "${CMAKE_SOURCE_DIR}/tools/deployment/com.facebook.osqueryd.plist" DESTINATION "${CMAKE_BINARY_DIR}/package/pkg")
+    install(FILES "${CMAKE_BINARY_DIR}/package/pkg/com.facebook.osqueryd.plist" DESTINATION /private/var/osquery COMPONENT osquery)

     file(COPY "${CMAKE_SOURCE_DIR}/tools/deployment/osquery.example.conf" DESTINATION "${CMAKE_BINARY_DIR}/package/pkg")
     install(FILES "${CMAKE_BINARY_DIR}/package/pkg/osquery.example.conf" DESTINATION /private/var/osquery COMPONENT osquery)


Add dependency info for flatbuffers proto build

--- cmake/protocols.cmake
+++ cmake/protocols.cmake
@@ -24,7 +24,8 @@
       add_custom_command(
         OUTPUT ${GEN_HEADER}
         COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -c
-          -o "${GEN_PATH}/" -I "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}")
+          -o "${GEN_PATH}/" -I "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}"
+        MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}")
       list(APPEND GENERATED_FILES ${GEN_HEADER})
     endforeach()

@@ -58,7 +59,8 @@
       add_custom_command(
         OUTPUT ${GEN_JS}
         COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" ${FB_FLAG}
-          -o "${JS_GEN_PATH}/" -I "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}")
+          -o "${JS_GEN_PATH}/" -I "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}"
+        MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}")
       list(APPEND GENERATED_FILES_JS ${GEN_JS})
     endforeach()


Refactored code-coverage.cmake, mostly with messages

--- src/cmake/code-coverage.cmake
+++ src/cmake/code-coverage.cmake
@@ -7,22 +7,24 @@
 if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
     message("Current compiler is ${CMAKE_CXX_COMPILER_ID}. Code-coverage only available for GCC.\n")
     set(SKIP_COVERAGE true)
-
 elseif(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
     message("Code-coverage only available when building for Debug.\n")
     set(SKIP_COVERAGE true)
+else()
+    if(NOT GCOV)
+        message(WARNING "Gcov not found.")
+        set(SKIP_COVERAGE true)
+    endif()

-elseif(NOT GCOV)
-    message(WARNING "Gcov not found.")
-    set(SKIP_COVERAGE true)
+    if(NOT LCOV)
+        message(WARNING "Lcov not found.")
+        set(SKIP_COVERAGE true)
+    endif()

-elseif(NOT LCOV)
-    message(WARNING "Lcov not found.")
-    set(SKIP_COVERAGE true)
-
-elseif(NOT GENHTML)
-    message(WARNING "Genhtml not found.")
-    set(SKIP_COVERAGE true)
+    if(NOT GENHTML)
+        message(WARNING "Genhtml not found.")
+        set(SKIP_COVERAGE true)
+    endif()
 endif()

 # ----------------------------------------------------------------------
@@ -32,6 +34,11 @@
 if(NOT TARGET ${COVERAGE_ALL})
     add_custom_target( ${COVERAGE_ALL}
         COMMENT "Main target for all code coverage targets."
+    )
+
+    message("Target '${COVERAGE_ALL}' will build all code coverage targets. Run the following to generate coverage reports:\n \
+    \tcmake --build . --target coverage_all\n \
+    \tcmake --build . --target install"
     )
 endif()

@@ -98,9 +105,6 @@
     )

     message("Code coverage setup for target '${args_TARGET}' in: ${TARGET_BINARY_DIR}.\n \
-    \tOutput found in: ${TARGET_BINARY_DIR}/${TARGET_COVERAGE}\n \
-    \tTarget '${COVERAGE_ALL}' will build all coverage-targets. Run the following to generate coverage reports:\n \
-    \t\tcmake --build . --target coverage_all\n \
-    \t\tcmake --build . --target install"
+    \tOutput found in: ${TARGET_BINARY_DIR}/${TARGET_COVERAGE}\n"
     )
 endfunction()


COMP: Update VTK external project name to support Slicer >= 4.10

This change is not backward compatible.

--- SuperBuild/External_RigidAlignment.cmake
+++ SuperBuild/External_RigidAlignment.cmake
@@ -8,7 +8,7 @@
 if(DEFINED Slicer_SOURCE_DIR)
   list(APPEND ${proj}_DEPENDS
     SlicerExecutionModel
-    VTKv9
+    VTK
     )
 endif()


Move classad external upward to accomodate Linux builds. Ticket #4022.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -585,13 +585,15 @@
   add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/pcre/8.33)
   add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/krb5/1.10)
   add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/curl/7.33.0)
+  add_subdirectory(${CONDOR_SOURCE_DIR}/src/classad)
 else ()

   # DRMAA currently punted on Windows until we can figure out correct build
   add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/drmaa/1.6)
   add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/qpid/0.8-RC3)
   add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/boost/1.49.0)
-
+  add_subdirectory(${CONDOR_SOURCE_DIR}/src/classad)
+
   add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/curl/7.31.0-p1 )
   add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/openssl/0.9.8h-p2)
   add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/pcre/7.6)
@@ -649,7 +651,6 @@

 endif(WINDOWS)

-add_subdirectory(${CONDOR_SOURCE_DIR}/src/classad)
 add_subdirectory(${CONDOR_SOURCE_DIR}/src/safefile)

 ### addition of a single externals target which allows you to


Modifying the find

Modifying the find

--- cmake/CMakeModules/FindGEOS.cmake
+++ cmake/CMakeModules/FindGEOS.cmake
@@ -27,7 +27,7 @@
 # Instead looking for Geometry.h
 #---

-find_path( GEOS_INCLUDE_DIR geos/geom/Geometry.h
+find_path( GEOS_INCLUDE_DIR geos_c.h
            PATHS
            $ENV{GEOS_DIR}/include
            ${GEOS_DIR}/include)


update

update

--- cmake/SetupProjectVariables.cmake
+++ cmake/SetupProjectVariables.cmake
@@ -32,9 +32,9 @@
 # defaults for 3rd-party tools
 IF(UNIX)
   # GLM
-  SET(GLM_INCLUDE_DIR "~/Projects/others/glm-git")
+  SET(GLM_INCLUDE_DIR "~/Projects/others/glm-regnirpsj-git")
   # GLI
-  SET(GLI_INCLUDE_DIR "~/Projects/others/gli-git")
+  SET(GLI_INCLUDE_DIR "~/Projects/others/gli-regnirpsj-git")
 ENDIF()

 IF(WIN32 OR WIN64)


[CMake][Fuchsia] Enable experimental new pass manager by default

This change enableds experimental new pass manager.

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

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@350461 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -16,6 +16,7 @@

 set(ENABLE_LINKER_BUILD_ID ON CACHE BOOL "")
 set(ENABLE_X86_RELAX_RELOCATIONS ON CACHE BOOL "")
+set(ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER ON CACHE BOOL "")

 set(LLVM_ENABLE_LTO ON CACHE BOOL "")
 if(NOT APPLE)


[CMake] Use internal_linkage rather than always_inline for libc++

This is a workaround for PR39053 which was uncovered by D50652 when
the default attribute has been changed from internal_linkage to
always_inline.

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

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@342833 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -109,6 +109,8 @@
     set(RUNTIMES_${target}-fuchsia_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY OFF CACHE BOOL "")
+    # TODO: this is a workaround for PR39053 which was uncovered by D50652.
+    set(RUNTIMES_${target}-fuchsia_LIBCXX_HIDE_FROM_ABI_PER_TU_BY_DEFAULT ON CACHE BOOL "")
   endforeach()

   set(LLVM_RUNTIME_SANITIZERS "Address" CACHE STRING "")


Windows: enable the profiling library on Windows

The official builds include the profiling library, so we should enable
it on the CI to ensure that the path is tested.  This should only add
~1m to the total build time.

--- cmake/caches/Windows-x86_64.cmake
+++ cmake/caches/Windows-x86_64.cmake
@@ -10,6 +10,10 @@
       swift
     CACHE STRING "")

+set(LLVM_ENABLE_RUNTIMES
+      compiler-rt
+    CACHE STRING "")
+
 # NOTE(compnerd) always enable assertions, the toolchain will not provide enough
 # context to resolve issues otherwise and may silently generate invalid output.
 set(LLVM_ENABLE_ASSERTIONS YES CACHE BOOL "")
@@ -17,7 +21,24 @@
 set(ENABLE_X86_RELAX_RELOCATIONS YES CACHE BOOL "")

 set(LLVM_APPEND_VC_REV NO CACHE BOOL "")
+set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR YES CACHE BOOL "")
 set(LLVM_ENABLE_PYTHON YES CACHE BOOL "")
+set(LLVM_RUNTIME_TARGETS
+      x86_64-unknown-windows-msvc
+    CACHE STRING "")
+foreach(target ${LLVM_RUNTIME_TARGETS})
+  set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES
+        compiler-rt
+      CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_MT mt CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Windows CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "")
+  set(RUNTIMES_${target}_COMPILER_RT_BUILD_CRT NO CACHE BOOL "")
+  set(RUNTIMES_${target}_COMPILER_RT_BUILD_LIBFUZZER NO CACHE BOOL "")
+  set(RUNTIMES_${target}_COMPILER_RT_BUILD_PROFILE YES CACHE BOOL "")
+  set(RUNTIMES_${target}_COMPILER_RT_BUILD_SANITIZERS NO CACHE BOOL "")
+  set(RUNTIMES_${target}_COMPILER_RT_BUILD_XRAY NO CACHE BOOL "")
+endforeach()
 set(LLVM_TARGETS_TO_BUILD AArch64 ARM WebAssembly X86 CACHE STRING "")

 # Disable certain targets to reduce the configure time or to avoid configuration
@@ -129,6 +150,7 @@
       libclang
       libclang-headers
       LTO
+      runtimes
       ${LLVM_TOOLCHAIN_TOOLS}
       ${CLANG_TOOLS}
       ${LLD_TOOLS}


Clean up some more warnings seen by clang on SLC.

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -110,17 +110,13 @@

 if(cxx11)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-  if(CMAKE_COMPILER_IS_GNUCXX)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
-  endif()
 endif()

 if(cxx14)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
-  if(CMAKE_COMPILER_IS_GNUCXX)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
-  endif()
 endif()
+
+ROOT_ADD_CXX_FLAG(CMAKE_CXX_FLAGS -Wno-deprecated-declarations)

 if(libcxx)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")


Add current folder to the list of includes.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -1083,7 +1083,7 @@
 #
 function(ROOT_ADD_GTEST test_suite)
   CMAKE_PARSE_ARGUMENTS(ARG "" "" "LIBRARIES" ${ARGN})
-  include_directories(${GTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR})
+  include_directories(${CMAKE_CURRENT_BINARY_DIR} ${GTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR})

   set(source_files ${ARG_UNPARSED_ARGUMENTS})
   # Note we cannot use ROOT_EXECUTABLE without user-specified set of LIBRARIES to link with.


COMP: Depend on ITKHigherOrderAccurateGradient

--- itk-module.cmake
+++ itk-module.cmake
@@ -18,6 +18,7 @@
   COMPILE_DEPENDS
     SplitComponents
     BSplineGradient
+    HigherOrderAccurateGradient
   PRIVATE_DEPENDS
     ITKHDF5
   TEST_DEPENDS


- fix wrong name for static lib on unix based os with multi generator compilers
- fix permissions for static lib (they have the same as all other libs now)

git-svn-id: b66b41e514ff40863ef1aa95df2dbf63dd8d6be1@1139 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGCommon.cmake
+++ cmake/ACGCommon.cmake
@@ -628,6 +628,8 @@

     # set common target properties defined in common.cmake
     acg_set_target_props (${_target}Static)
+
+    set_target_properties(${_target}Static PROPERTIES OUTPUT_NAME ${_target})

     if (NOT APPLE)
       set_target_properties (${_target}Static PROPERTIES
@@ -678,18 +680,11 @@
   endif(WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE))

   if (_and_static)
-    if( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
-      set ( postfix ${CMAKE_DEBUG_POSTFIX} )
-    else ()
-      set ( postfix "" )
-    endif ()
-
-    set( fullname ${_target}${postfix} )
     add_custom_command (TARGET ${_target}Static POST_BUILD
                         COMMAND ${CMAKE_COMMAND} -E
                         copy_if_different
                           $<TARGET_FILE:${_target}Static>
-                          ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/lib${fullname}.a)
+                          ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$<TARGET_FILE_NAME:${_target}Static>)

   endif ()

@@ -703,10 +698,8 @@
                  LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}
                  ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR})
         if (_and_static)
-          install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${_target}Static${postfix}.a
-                   DESTINATION ${ACG_PROJECT_LIBDIR}
-                   RENAME lib${fullname}.a
-                   PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+          install (TARGETS ${_target}Static
+                   DESTINATION ${ACG_PROJECT_LIBDIR})
         endif ()
       elseif (${_type} STREQUAL MODULE)
         install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_PLUGINDIR})


remove header copy in UseCyclus.cmake

remove header copy in UseCyclus.cmake

--- cmake/UseCyclus.cmake
+++ cmake/UseCyclus.cmake
@@ -272,21 +272,9 @@
         )
     SET(${lib_name}_LIB ${lib_name} CACHE INTERNAL "Agent library alias." FORCE)

-    # install headers
-    IF(NOT "${lib_h}" STREQUAL "")
-        INSTALL(FILES ${lib_h} DESTINATION include/cyclus COMPONENT "${lib_name}")
-    ENDIF(NOT "${lib_h}" STREQUAL "")
 ENDMACRO()

 MACRO(INSTALL_AGENT_TESTS_ lib_name test_src test_h driver inst_dir)
-    # install test header
-    IF(NOT "${test_h}" STREQUAL "")
-        INSTALL(
-            FILES ${test_h}
-            DESTINATION include/cyclus/${inst_dir}
-            COMPONENT ${lib_name}
-            )
-    ENDIF(NOT "${test_h}" STREQUAL "")

     # build & install test impl
     IF(NOT "${test_src}" STREQUAL "" AND NOT "${driver}" STREQUAL "NONE")


Fix cython compiled file dependency generation.

The CMake find_file command usually caches a file location so it can be set by
the user and so redundant searches do not occur.  However, if a file is found in
this case, we still want to perform the search every time.  So, we have to call
the CMake unset command on the variable used.

--- cmake/UseCython.cmake
+++ cmake/UseCython.cmake
@@ -113,6 +113,7 @@

     # Determine dependencies.
     # Add the pxd file will the same name as the given pyx file.
+    unset( corresponding_pxd_file CACHE )
     find_file( corresponding_pxd_file ${pyx_file_basename}.pxd
       PATHS "${pyx_path}" ${cmake_include_directories}
       NO_DEFAULT_PATH )
@@ -135,6 +136,7 @@
         foreach( statement ${extern_from_statements} )
           # Had trouble getting the quote in the regex
           string( REGEX REPLACE "cdef[ ]+extern[ ]+from[ ]+[\"]([^\"]+)[\"].*" "\\1" header "${statement}" )
+          unset( header_location CACHE )
           find_file( header_location ${header} PATHS ${cmake_include_directories} )
           if( header_location )
             list( FIND c_header_dependencies "${header_location}" header_idx )
@@ -160,6 +162,7 @@
         list( REMOVE_DUPLICATES module_dependencies )
         # Add the module to the files to check, if appropriate.
         foreach( module ${module_dependencies} )
+          unset( pxd_location CACHE )
           find_file( pxd_location ${module}.pxd
             PATHS "${pyx_path}" ${cmake_include_directories} NO_DEFAULT_PATH )
           if( pxd_location )


BUG: fix compile definitions.

BUG: fix compile definitions.

--- cmake/do_macros.cmake
+++ cmake/do_macros.cmake
@@ -207,10 +207,12 @@
     ${_target} PROPERTIES
     VERSION ${DO_${DO_PROJECT_NAME}_VERSION}
     SOVERSION ${DO_${DO_PROJECT_NAME}_SOVERSION}
-    COMPILE_DEFINITIONS ${_additional_compile_flags}
     COMPILE_FLAGS ${DO_COMPILE_FLAGS}
     OUTPUT_NAME ${_out_target_name}-${DO_${DO_PROJECT_NAME}_VERSION}
     OUTPUT_NAME_DEBUG ${_out_target_name}-${DO_${DO_PROJECT_NAME}_VERSION}-d)
+  set_target_properties(
+    ${_target} PROPERTIES
+    COMPILE_FLAGS ${_additional_compile_flags})
 endfunction (do_set_specific_target_properties)


skip saltgen on MSVC

skip saltgen on MSVC

--- cmake/libscrypt.cmake
+++ cmake/libscrypt.cmake
@@ -3,7 +3,6 @@
     "${CMAKE_CURRENT_SOURCE_DIR}/libscrypt/sha256.c"
     "${CMAKE_CURRENT_SOURCE_DIR}/libscrypt/crypto-mcf.c"
     "${CMAKE_CURRENT_SOURCE_DIR}/libscrypt/b64.c"
-    "${CMAKE_CURRENT_SOURCE_DIR}/libscrypt/crypto-scrypt-saltgen.c"
     "${CMAKE_CURRENT_SOURCE_DIR}/libscrypt/crypto_scrypt-check.c"
     "${CMAKE_CURRENT_SOURCE_DIR}/libscrypt/crypto_scrypt-hash.c"
     "${CMAKE_CURRENT_SOURCE_DIR}/libscrypt/slowequals.c"
@@ -28,6 +27,8 @@

 if(MSVC OR WIN32)
     include_directories(${CMAKE_CURRENT_SOURCE_DIR}/portable)
+else()
+    list(APPEND LIBSCRYPT_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/libscrypt/crypto-scrypt-saltgen.c")
 endif()

 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libscrypt)


Fix: even if set to ON disable tests if GTest not found

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@4286 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_tests.cmake
+++ cmake/pcl_tests.cmake
@@ -23,7 +23,11 @@
 elseif(NOT ${BUILD_TESTS})
     message(STATUS "Tests will not be built: Disabled manually")
 else(NOT ${DEFAULT} AND NOT ${BUILD_TESTS})
-    message(STATUS "Tests will be built")
+    if(GTEST_FOUND)
+        message(STATUS "Tests will be built")
+    else(GTEST_FOUND)
+        set (BUILD_TESTS OFF CACHE BOOL "Tests can not be built!" FORCE)
+    endif(GTEST_FOUND)
 endif(NOT ${DEFAULT} AND NOT ${BUILD_TESTS})

 # Set up for testing if tests are enabled


-fPIC for spdlog

-fPIC for spdlog

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -539,7 +539,9 @@
         -DSPDLOG_BUILD_EXAMPLE=OFF
         -DSPDLOG_BUILD_TESTS=OFF
         -DSPDLOG_FMT_EXTERNAL=ON
-        -Dfmt_DIR=${BINARY_DIR})
+        -Dfmt_DIR=${BINARY_DIR}
+        -DCMAKE_C_FLAGS=-fPIC
+        -DCMAKE_CXX_FLAGS=-fPIC)

     add_external_library(spdlog
       LIBRARY ${SPDLOG_LIB}


Missing quotes were leading cmake to believe that a source directory was passed

--- utilities/ITKCudaCommon/CMake/itkCUDA.cmake
+++ utilities/ITKCudaCommon/CMake/itkCUDA.cmake
@@ -32,9 +32,8 @@
       DEPENDS ${PTX_FILES}
       COMMAND ${CMAKE_COMMAND} ARGS
         -D "_BUILD_CUDA_KERNEL=TRUE"
-        -D "PTXKernels:STRING=${PTX_FILES}"
-        #-P "${CMAKE_SOURCE_DIR}/Modules/External/ITKCudaCommon/CMake/itkCUDA.cmake" # call to itself!
-	    -P "${ITKCudaCommon_SOURCE_DIR}/CMake/itkCUDA.cmake" # call to itself!
+        -D "PTXKernels:STRING=\"${PTX_FILES}\""
+	-P "${ITKCudaCommon_SOURCE_DIR}/CMake/itkCUDA.cmake" # call to itself!
       WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
       COMMENT "Building CUDA PTX wrappers"
     )


Fix clang coverage (#5)

Fix clang coverage (#5)

* attempt at fixing clang coverage for travis (#2)

* more modifications for clang

* working coverage (I think)

--- CMake/Coveralls.cmake
+++ CMake/Coveralls.cmake
@@ -122,6 +122,11 @@

 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
 	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
+
+	if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -coverage-cfg-checksum -Xclang -coverage-no-function-names-in-data -Xclang -coverage-version='407*'")
+		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Xclang -coverage-cfg-checksum -Xclang -coverage-no-function-names-in-data -Xclang -coverage-version='407*'")
+	endif()
 endmacro()


add yotta_apply_target_rules function to replace YOTTA_POSTPROCESS_COMMAND

--- CMake/toolchain.cmake
+++ CMake/toolchain.cmake
@@ -45,3 +45,15 @@
 cmake_force_c_compiler(arm-none-eabi-gcc GNU)
 cmake_force_cxx_compiler(arm-none-eabi-g++ GNU)

+# post-process elf files into .bin files:
+function(yotta_apply_target_rules target_type target_name)
+    if(${target_type} STREQUAL "EXECUTABLE")
+        add_custom_command(TARGET ${target_name}
+            POST_BUILD
+            COMMAND arm-none-eabi-objcopy -O binary ${target_name} ${target_name}.bin
+            COMMENT "converting to .bin"
+            VERBATIM
+        )
+    endif()
+endfunction()
+


Superproject improvements

Superproject improvements

--- SubProject.cmake
+++ SubProject.cmake
@@ -92,7 +92,7 @@
         include_directories(${${NAME}_INCLUDE_DIRS})
       endif()
     endif()
-    if(${name}_IS_SUBPROJECT)
+    if(${name}_IS_SUBPROJECT OR __included)
       list(APPEND __subprojects "${name} ${url} ${tag}")
     endif()
   endif()


BUG: URL in wrong place

BUG: URL in wrong place

Why is this here? I don't think we will ever find an answer to this crucial question

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -1,4 +1,4 @@
-git@github.com:NIRALUser/DTIProcessToolkit.gitset(PRIMARY_PROJECT_NAME DTIProcess)
+set(PRIMARY_PROJECT_NAME DTIProcess)

 #-----------------------------------------------------------------------------
 # Superbuild option(s)


modified install instruction for boost on windows

--- superbuild/External-Boost.cmake
+++ superbuild/External-Boost.cmake
@@ -5,11 +5,15 @@

 set( Boost_Bootstrap_Command )
 if( UNIX )
+  set( Boost_url "http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz")
+  set( Boost_md5 93780777cfbf999a600f62883bd54b17)
   set( Boost_Bootstrap_Command ./bootstrap.sh )
   set( Boost_b2_Command ./b2 )
   set( SHELL_CMD sh)
 else()
   if( WIN32 )
+    set( Boost_url "http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.zip")
+	set( Boost_md5 8aca361a4713a1f491b0a5e33fee0f1f)
     set( Boost_Bootstrap_Command cmd /C bootstrap.bat msvc )
     set( Boost_b2_Command b2.exe )
     set (SHELL_CMD "")
@@ -28,12 +32,12 @@

 ExternalProject_Add(Boost
   BUILD_IN_SOURCE 1
-  URL "http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz"
-  URL_MD5 93780777cfbf999a600f62883bd54b17
+  URL ${Boost_url}
+  URL_MD5 ${Boost_md5}
   UPDATE_COMMAND ""
-  PATCH_COMMAND ${Boost_Patch_Command}
-  CONFIGURE_COMMAND ${Boost_Bootstrap_Command} --prefix=${INSTALL_DEPECENCIES_DIR}/lib --with-libraries=thread --with-libraries=system
-  BUILD_COMMAND ${Boost_b2_Command} install -j8   --prefix=${INSTALL_DEPECENCIES_DIR} address-model=${Boost_address_model}
+  #PATCH_COMMAND ${Boost_Patch_Command}
+  CONFIGURE_COMMAND ${Boost_Bootstrap_Command} --prefix=${INSTALL_DEPECENCIES_DIR}/lib
+  BUILD_COMMAND ${Boost_b2_Command} install -j8   --prefix=${INSTALL_DEPECENCIES_DIR} --with-thread --with-system  address-model=${Boost_address_model}
   INSTALL_COMMAND ""
 )


FIX (#1356): remove unneccessary include_directories() statement

--- Utilities/openCherry/CMake/MacroCreatePlugin.cmake
+++ Utilities/openCherry/CMake/MacroCreatePlugin.cmake
@@ -110,7 +110,7 @@
       ${CORRESPONDING__TXX_FILES}
       )

-  INCLUDE_DIRECTORIES(PLUGIN_OUTPUT_DIR)
+  #INCLUDE_DIRECTORIES(PLUGIN_OUTPUT_DIR)
   ADD_LIBRARY(${PLUGIN_TARGET} SHARED ${_all_target_files})

   # we need to explicitly state the debug versions of the libraries


FIX (#3235): linker errors for Qmitk dependend modules after turning MITK_USE_QT to OFF

--- CMake/CoreHelpers.cmake
+++ CMake/CoreHelpers.cmake
@@ -173,17 +173,17 @@
   MACRO_PARSE_ARGUMENTS(MODULE "INCLUDE_DIRS;INTERNAL_INCLUDE_DIRS;DEPENDS;DEPENDS_INTERNAL;PROVIDES;PACKAGE_DEPENDS;EXPORT_DEFINE;ADDITIONAL_LIBS;GENERATED_CPP" "QT_MODULE;FORCE_STATIC;HEADERS_ONLY" ${ARGN})
   SET(MODULE_NAME ${MODULE_NAME_IN})

+  # assume worst case
+  SET(MODULE_IS_ENABLED 0)
   # first of all we check for the dependencies
   MITK_CHECK_MODULE(_MISSING_DEP ${MODULE_DEPENDS})
   IF(_MISSING_DEP)
     MESSAGE("Warning: Module ${MODULE_NAME} won't be built, missing dependency: ${_MISSING_DEP}")
-     # remove possibly existing config, to avoid strange errors
-    FILE(REMOVE ${MITK_MODULES_CONF_DIR}/${MODULE_NAME}Config.cmake )
   ELSE(_MISSING_DEP)
     IF(NOT MODULE_QT_MODULE OR MITK_USE_QT)

+    SET(MODULE_IS_ENABLED 1)
     _MITK_CREATE_MODULE_CONF()
-    SET(MODULE_IS_ENABLED 1)
     IF(NOT MODULE_EXPORT_DEFINE)
       SET(MODULE_EXPORT_DEFINE ${MODULE_NAME}_EXPORT)
     ENDIF(NOT MODULE_EXPORT_DEFINE)
@@ -270,6 +270,11 @@
     ENDIF(NOT MODULE_FORCE_STATIC OR MINGW)
   ENDIF(NOT MODULE_QT_MODULE OR MITK_USE_QT)
 ENDIF(_MISSING_DEP)
+  IF(NOT MODULE_IS_ENABLED)
+    # remove possibly existing config, to avoid strange error
+    # this could maybe improved to create a "disabled" config
+    FILE(REMOVE ${MITK_MODULES_CONF_DIR}/${MODULE_NAME}Config.cmake )
+  ENDIF(NOT MODULE_IS_ENABLED)
 ENDMACRO(MITK_CREATE_MODULE)

 MACRO(MITK_USE_MODULE)


use level 3 warnings by default in MSVC

use level 3 warnings by default in MSVC

--- toolchains/msvc.toolchain.cmake
+++ toolchains/msvc.toolchain.cmake
@@ -30,7 +30,7 @@
 set( TNUN_compiler_runtime_sanity_checks -GS -sdl -guard:cf -fp:strict -RTC1 -RTCc -D_ALLOW_RTCc_IN_STL ) # https://www.reddit.com/r/cpp/comments/46mhne/rtcc_rejects_conformant_code_with_visual_c_2015
 set( TNUN_disabled_warnings              -wd4324 -wd4373 -wd4100 -wd4456 -wd4067 -wd4995 -wd4635 -wd4800 -wd4101 -wd4756 -wd4068 -wd4056 -wd4996 -wd4503 )
 set( TNUN_warnings_as_errors             -WX )
-set( TNUN_default_warnings               -W4 )
+set( TNUN_default_warnings               -W3 )

 # w4373: '...': virtual function overrides '...', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers


Issue #44: Try being less strict for Mac libs.

--- CMake/mpAddPythonBindings.cmake
+++ CMake/mpAddPythonBindings.cmake
@@ -28,7 +28,7 @@

   if (DEFINED MYPROJECT_PYTHON_VERSION)
     find_package(PythonInterp ${MYPROJECT_PYTHON_VERSION} EXACT REQUIRED)
-    find_package(PythonLibs ${MYPROJECT_PYTHON_VERSION} REQUIRED)
+    find_package(PythonLibs REQUIRED)
   else()
     find_package(PythonInterp)
     find_package(PythonLibs)


[cmake] Check for 3 UNIX methods we use.

--- cmake/Modules/WintermuteFunctionDependencies.cmake
+++ cmake/Modules/WintermuteFunctionDependencies.cmake
@@ -26,3 +26,7 @@
 endif()

 include(CheckFunctionExists)
+
+CHECK_FUNCTION_EXISTS(basename CFE_basename)
+CHECK_FUNCTION_EXISTS(getenv CFE_getenv)
+CHECK_FUNCTION_EXISTS(setenv CFE_setenv)


Fix the check for compilers defaulting to C++11.

Some compilers (notably clang on macOS) enable C++11 features as
extensions even when __cplusplus == 199711 (i.e., compilation in C++98
mode). Mixing language versions in this way confuses some system
headers (i..e., override versus throw()), so only treat the default
compiler setting as C++11 if it sets the right value for __cplusplus.

--- cmake/checks/check_01_cxx_features.cmake
+++ cmake/checks/check_01_cxx_features.cmake
@@ -325,9 +325,14 @@
 CHECK_CXX_SOURCE_COMPILES(
   "
   #include <memory>
-  int main()
-  {
-    std::unique_ptr<int> p0;
+
+  #if __cplusplus < 201103L
+  #  error \"The compiler does not default to C++11 or newer.\"
+  #endif
+
+  auto main() -> int
+  {
+    auto p0 = std::unique_ptr<int>();
     auto p1 = std::move(p0);
   }
   "


Add possibility to set your own git tag and repo for NIFTYREG

--- SuperBuild/External_NIFTYREG.cmake
+++ SuperBuild/External_NIFTYREG.cmake
@@ -47,10 +47,13 @@
   option(${proj}_USE_CUDA "Enable ${proj} CUDA (if cuda libraries are present)" ${CUDA_FOUND})
   mark_as_advanced(${proj}_USE_CUDA)

+  # Sets ${proj}_URL_MODIFIED and ${proj}_TAG_MODIFIED
+  SetGitTagAndRepo("${proj}")
+
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
-    GIT_REPOSITORY ${${proj}_URL}
-    GIT_TAG ${${proj}_TAG}
+    GIT_REPOSITORY "${${proj}_URL_MODIFIED}"
+    GIT_TAG "${${proj}_TAG_MODIFIED}"
     CMAKE_ARGS
       -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=${CMAKE_POSITION_INDEPENDENT_CODE}
       -DCMAKE_PREFIX_PATH=${SUPERBUILD_INSTALL_DIR}


Remove check for LLKDU source in the tree before downloading the pre-built lib.

--- indra/cmake/LLKDU.cmake
+++ indra/cmake/LLKDU.cmake
@@ -1,7 +1,7 @@
 # -*- cmake -*-
 include(Prebuilt)

-if (INSTALL_PROPRIETARY AND NOT STANDALONE AND EXISTS ${LIBS_CLOSED_DIR}/llkdu)
+if (INSTALL_PROPRIETARY AND NOT STANDALONE)
   use_prebuilt_binary(kdu)
   if (WINDOWS)
     set(KDU_LIBRARY debug kdu_cored optimized kdu_core)
@@ -15,4 +15,4 @@
   set(LLKDU_STATIC_LIBRARY llkdu_static)
   set(LLKDU_LIBRARIES ${LLKDU_LIBRARY})
   set(LLKDU_STATIC_LIBRARIES ${LLKDU_STATIC_LIBRARY})
-endif (INSTALL_PROPRIETARY AND NOT STANDALONE AND EXISTS ${LIBS_CLOSED_DIR}/llkdu)
+endif (INSTALL_PROPRIETARY AND NOT STANDALONE)


Fix issue #623 - MacOS ld: unknown option: --exclude-libs

apply this option only on Linux

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -238,7 +238,9 @@
 foreach(LIBNAME ${CLANG_LIBNAMES})
   find_library(C_LIBFILE_${LIBNAME} NAMES "${LIBNAME}" HINTS "${LLVM_LIBDIR}")
   list(APPEND CLANG_LIBFILES "${C_LIBFILE_${LIBNAME}}")
-  set(LLVM_LDFLAGS "${LLVM_LDFLAGS} -Wl,--exclude-libs,lib${LIBNAME}")
+  if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+    set(LLVM_LDFLAGS "${LLVM_LDFLAGS} -Wl,--exclude-libs,lib${LIBNAME}")
+  endif()
 endforeach()

 # With Visual Studio llvm-config gives invalid list of static libs (libXXXX.a instead of XXXX.lib)


Make disabling DYNAMIC_ARCH on unsupported systems work

needs to be unset in the cache for the change to have any effect

--- cmake/arch.cmake
+++ cmake/arch.cmake
@@ -81,7 +81,8 @@
   endif ()

   if (NOT DYNAMIC_CORE)
-    unset(DYNAMIC_ARCH)
+    message (STATUS "DYNAMIC_ARCH is not supported on this architecture, removing from options")
+    unset(DYNAMIC_ARCH CACHE)
   endif ()
 endif ()


[added] flags for intel on linux/darwin

[added] flags for intel on linux/darwin

--- cmake/BOTG.cmake
+++ cmake/BOTG.cmake
@@ -279,6 +279,9 @@
     BOTG_AddCompilerFlags( CXX "GNU|Clang" ANY
         "-std=c++${version}"
     )
+    BOTG_AddCompilerFlags( CXX "Intel" "Linux|Darwin"
+        "-std=c${version}"
+    )
 ENDMACRO()
 #-------------------------------------------------------------------------------
 MACRO( BOTG_EnableFortran )


Apply debian patch do-not-export-clang-symbols.patch

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -238,6 +238,7 @@
 foreach(LIBNAME ${CLANG_LIBNAMES})
   find_library(C_LIBFILE_${LIBNAME} NAMES "${LIBNAME}" HINTS "${LLVM_LIBDIR}")
   list(APPEND CLANG_LIBFILES "${C_LIBFILE_${LIBNAME}}")
+  set(LLVM_LDFLAGS "${LLVM_LDFLAGS} -Wl,--exclude-libs,lib${LIBNAME}")
 endforeach()

 # With Visual Studio llvm-config gives invalid list of static libs (libXXXX.a instead of XXXX.lib)


Sanitize BUILD_ONLY CMake variable

Sanitize BUILD_ONLY CMake variable

To prevent empty elements in the input list from breaking the build
script (e.g. extra or trailing semicolons)

--- cmake/sdks.cmake
+++ cmake/sdks.cmake
@@ -18,6 +18,9 @@

 if(BUILD_ONLY)
+    # Sanitize input client list, for example removing empty elements
+    # that may be introduced by trailing semicolons
+    set(BUILD_ONLY ${BUILD_ONLY})
     set(SDK_BUILD_LIST ${BUILD_ONLY})
     foreach(TARGET IN LISTS BUILD_ONLY)
         message(STATUS "Considering ${TARGET}")


move IPPICV binaries to GitHub opencv_3rdparty repository

--- 3rdparty/ippicv/downloader.cmake
+++ 3rdparty/ippicv/downloader.cmake
@@ -6,6 +6,8 @@
 #

 function(_icv_downloader)
+  # Commit SHA in the opencv_3rdparty repo
+  set(IPPICV_BINARIES_COMMIT "3d41df448b589aa076d9d27ace344d3ef709e4b9")
   # Define actual ICV versions
   if(APPLE)
     set(OPENCV_ICV_PACKAGE_NAME "ippicv_macosx_20141027.tgz")
@@ -62,7 +64,7 @@
       if(DEFINED ENV{OPENCV_ICV_URL})
         set(OPENCV_ICV_URL $ENV{OPENCV_ICV_URL})
       else()
-        set(OPENCV_ICV_URL "http://sourceforge.net/projects/opencvlibrary/files/3rdparty/ippicv")
+        set(OPENCV_ICV_URL "https://raw.githubusercontent.com/Itseez/opencv_3rdparty/${IPPICV_BINARIES_COMMIT}/ippicv")
       endif()
     endif()


Fixed variable name dereference

Fixed variable name dereference

--- CMakeModules/OsgMacroUtils.cmake
+++ CMakeModules/OsgMacroUtils.cmake
@@ -178,7 +178,7 @@

 MACRO(SETUP_COMMANDLINE_APPLICATION APPLICATION_NAME)

-    SETUP_APPLICATION(APPLICATION_NAME 1)
+    SETUP_APPLICATION(${APPLICATION_NAME} 1)

 ENDMACRO(SETUP_COMMANDLINE_APPLICATION)

@@ -202,6 +202,6 @@

 MACRO(SETUP_COMMANDLINE_EXAMPLE EXAMPLE_NAME)

-    SETUP_EXAMPLE(EXAMPLE_NAME 1)
+    SETUP_EXAMPLE(${EXAMPLE_NAME} 1)

 ENDMACRO(SETUP_COMMANDLINE_EXAMPLE)


kconfig: specify full path of built mconf

--- tools/cmake/kconfig.cmake
+++ tools/cmake/kconfig.cmake
@@ -67,7 +67,7 @@
         "COMPONENT_KCONFIGS_PROJBUILD=${kconfigs_projbuild}"
         "IDF_CMAKE=y"
         "KCONFIG_CONFIG=${SDKCONFIG}"
-        ${MCONF} ${ROOT_KCONFIG}
+        ${CMAKE_BINARY_DIR}/${MCONF} ${ROOT_KCONFIG}
         VERBATIM
         USES_TERMINAL)

@@ -157,6 +157,7 @@
         BUILD_BYPRODUCTS ${MCONF}
         INSTALL_COMMAND ""
         EXCLUDE_FROM_ALL 1
+        WORKING_DIRECTORY ${CMAKE_BINARY_DIR} # Put built files on top level build directory
         )

     file(GLOB mconf_srcfiles ${IDF_PATH}/tools/kconfig/*.c)


Remove CI server path to ancient Oculus SDK.

--- cmake/FindOVR.cmake
+++ cmake/FindOVR.cmake
@@ -195,7 +195,6 @@
 	PATHS
 	"${OVR_ROOT_DIR}"
 	"${OVR_ROOT_DIR}/LibOVR"
-	c:/tools/oculus-sdk.install/OculusSDK/LibOVR
 	PATH_SUFFIXES
 	${_ovr_library_paths}
 	lib
@@ -208,7 +207,6 @@
 	PATHS
 	"${OVR_ROOT_DIR}"
 	"${OVR_ROOT_DIR}/LibOVR"
-	c:/tools/oculus-sdk.install/OculusSDK/LibOVR
 	PATH_SUFFIXES
 	${_ovr_library_debug_paths}
 	lib
@@ -221,7 +219,6 @@
 	PATHS
 	"${OVR_ROOT_DIR}"
 	"${OVR_ROOT_DIR}/LibOVR"
-	c:/tools/oculus-sdk.install/OculusSDK/LibOVR
 	PATH_SUFFIXES
 	${_ovr_library_paths}
 	lib
@@ -234,7 +231,6 @@
 	PATHS
 	"${OVR_ROOT_DIR}"
 	"${OVR_ROOT_DIR}/LibOVR"
-	c:/tools/oculus-sdk.install/OculusSDK/LibOVR
 	PATH_SUFFIXES
 	${_ovr_library_debug_paths}
 	lib


cmake: fix typo

cmake: fix typo

Former-commit-id: fa81286c1f2bc42bc7ed0c9468fdd34c0dec5a3c

--- cmake/doxygen.cmake
+++ cmake/doxygen.cmake
@@ -169,7 +169,7 @@
             COMMAND bin/generateComponentList > misc/component_list.h
             DEPENDS generateComponentList)
         add_doc_target("SOFA" "${SOFA_FRAMEWORK_DIR}/sofa ${SOFA_BUILD_DIR}/misc/doc.h ${SOFA_BUILD_DIR}/misc/component_list.h" "")
-        add_dependencies("doc-SOFA", "component_list")
+        add_dependencies("doc-SOFA" "component_list")
     else()
         add_doc_target("SOFA" "${SOFA_FRAMEWORK_DIR}/sofa ${SOFA_BUILD_DIR}/misc/doc.h" "")
     endif()


r9887/sofa : FIX: cmake: SOFA-LIB_GUI_QT should be autodisabled when SOFA-MISC_NO_OPENGL is set (rule lost when renaming the options with SOFA-MISC).

Former-commit-id: aa8022d601ad2f6450bfd68a08c9f38c69a2386b

--- cmake/options.cmake
+++ cmake/options.cmake
@@ -266,9 +266,9 @@

 # optionnal features
-CMAKE_DEPENDENT_OPTION(SOFA-LIB_GUI_QT "Use QT interface" ON "NOT OPTION_NO_OPENGL;NOT OPTION_NO_QT;NOT PS3;" OFF)
+CMAKE_DEPENDENT_OPTION(SOFA-LIB_GUI_QT "Use QT interface" ON "NOT SOFA-MISC_NO_OPENGL;NOT SOFA-MISC_NO_QT;NOT PS3;" OFF)
 MARK_AS_ADVANCED(FORCE SOFA-LIB_GUI_QT) # to hide it from the user
-CMAKE_DEPENDENT_OPTION(SOFA-LIB_GUI_QTVIEWER "Use QT Viewer" ON "NOT OPTION_NO_OPENGL;NOT OPTION_NO_QT;NOT PS3;" OFF)
+CMAKE_DEPENDENT_OPTION(SOFA-LIB_GUI_QTVIEWER "Use QT Viewer" ON "NOT SOFA-MISC_NO_OPENGL;NOT SOFA-MISC_NO_QT;NOT PS3;" OFF)
 CMAKE_DEPENDENT_OPTION(SOFA-LIB_GUI_QGLVIEWER "Use QGLViewer" OFF "NOT SOFA-MISC_NO_OPENGL; NOT SOFA-MISC_NO_QT;" OFF)
 CMAKE_DEPENDENT_OPTION(SOFA-LIB_GUI_GLUT "Use GLUT interface" ON "NOT SOFA-MISC_NO_OPENGL" OFF)
 option(SOFA-LIB_GUI_INTERACTION "Enable interaction mode" OFF)


Updated version generation

Updated version generation

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -1,19 +1,10 @@

-set(FL_MAJOR_VERSION 0)
-set(FL_MINOR_VERSION 1)
+find_package(Git)

-execute_process(COMMAND git rev-list --count HEAD
+execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --always
                 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
-                OUTPUT_VARIABLE FL_BUILD_VERSION
+                OUTPUT_VARIABLE PROJECT_VERSION
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-execute_process(COMMAND git rev-parse --short HEAD
-                WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
-                OUTPUT_VARIABLE FL_REV_VERSION
-                OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-set(PROJECT_VERSION
-    "${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}.${FL_BUILD_VERSION}")

 # update version in documentation config
 configure_file(


0.2.6

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -1 +1 @@
-set(HUNTER_VERSION "0.2.5")
+set(HUNTER_VERSION "0.2.6")


ENH: Use http submit by default

ENH: Use http submit by default

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -3,6 +3,9 @@
 SET (NIGHTLY_START_TIME "23:00:00 EDT")

 # Dart server to submit results (used by client)
+IF(NOT DROP_METHOD)
+  SET(DROP_METHOD http)
+ENDIF(NOT DROP_METHOD)
 IF(DROP_METHOD MATCHES http)
   SET (DROP_SITE "public.kitware.com")
   SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")


build: Fix libssh_threads pkg-config. (cherry picked from commit 269c9fed354f3a8adbc54fccba6287d5b1f166e3)

--- libssh_threads.pc.cmake
+++ libssh_threads.pc.cmake
@@ -1,5 +1,5 @@
 Name: ${APPLICATION_NAME}_threads
 Description: The SSH Library Thread Extension
 Version: ${APPLICATION_VERSION}
-Libs: -L${LIB_INSTALL_DIR} -lssh -lssh_threads
+Libs: -L${LIB_INSTALL_DIR} -lssh_threads
 Cflags: -I${INCLUDE_INSTALL_DIR}


modify cmake

modify cmake

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -20,11 +20,13 @@

 FIND_PACKAGE(ilplib REQUIRED COMPONENTS langid la)
 FIND_PACKAGE(imllib REQUIRED)
-#FIND_PACKAGE(xml2 REQUIRED)
+
 SET(libxml2_FOUND FALSE)
 IF(IS_DIRECTORY "$ENV{LIBXML2}")
 	SET(libxml2_FOUND TRUE)
 	SET(libxml2_INCLUDE_DIRS "$ENV{LIBXML2}")
+ELSE(IS_DIRECTORY "$ENV{LIBXML2}")
+	FIND_PACKAGE(xml2 REQUIRED)
 ENDIF(IS_DIRECTORY "$ENV{LIBXML2}")

 IF(NOT libxml2_FOUND)


Fix cppcheck project target creation

Fix cppcheck project target creation

--- CppcheckTargets.cmake
+++ CppcheckTargets.cmake
@@ -34,10 +34,6 @@
   add_custom_target(cppcheck_${PROJECT_NAME}
     COMMENT "cppcheck executable not found")
   set_target_properties(cppcheck_${PROJECT_NAME} PROPERTIES EXCLUDE_FROM_ALL TRUE)
-endif()
-
-if(NOT TARGET cppcheck_${PROJECT_NAME})
-  add_custom_target(cppcheck_${PROJECT_NAME})
 endif()

 if(NOT TARGET cppcheck)
@@ -127,5 +123,9 @@
     WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
     COMMENT "cppcheck_run_${_name}: Running cppcheck on target ${_name}..."
     VERBATIM)
+
+  if(NOT TARGET cppcheck_${PROJECT_NAME})
+    add_custom_target(cppcheck_${PROJECT_NAME})
+  endif()
   add_dependencies(cppcheck_${PROJECT_NAME} cppcheck_run_${_name})
 endfunction()


[DOC] CMake: mentioned the correct Visual Studio vesion

--- util/cmake/FindCXX11.cmake
+++ util/cmake/FindCXX11.cmake
@@ -6,7 +6,7 @@
 # Visual Studio 2008 (vs9) doesn't seem to support C++11 directly (only as TR1)
 if (MSVC AND MSVC_VERSION GREATER 1500)
   set(CXX11_FOUND 1)
-  # Visual Studio 2012 (vs11) doesn't support C++11 STL.
+  # Visual Studio 2010 (vs10) doesn't support C++11 STL.
   if (MSVC_VERSION GREATER 1600)
     set(CXX11_STL_FOUND 1)
   endif (MSVC_VERSION GREATER 1600)


[FIX] Using more strict GCC flags.

[FIX] Using more strict GCC flags.

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

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -192,9 +192,9 @@
   # mainly important for 64 bit but does not get into the way on 32 bit either
   # at minimal performance impact.
   if (CMAKE_BUILD_TYPE STREQUAL Debug)
-    set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer")
+    set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} ${SEQAN_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer")
   elseif (CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
-    set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS_RELEASE} -g -fno-omit-frame-pointer")
+    set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} ${SEQAN_CXX_FLAGS_RELEASE} -g -fno-omit-frame-pointer")
   endif ()
 endif ()


[FIX] Activating exception semantics for MSVC

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

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -209,12 +209,12 @@
 if (WIN32)
   # Always set NOMINMAX such that <Windows.h> does not define min/max as
   # macros.
-  set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /EHsc")
   add_definitions (-DNOMINMAX)
 endif (WIN32)

 # Visual Studio Setup
 if (MSVC)
+  set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /EHsc")
   # Warning level 3 for MSVC is disabled for now to see how much really bad warnings there are.
   #set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /W3)