cosmetic fixes

cosmetic fixes

tabs to spaces

--- cmake/UseDO.cmake
+++ cmake/UseDO.cmake
@@ -1,71 +1,71 @@
 do_substep_message("UseDO running for project '${PROJECT_NAME}'")

 if (POLICY CMP0011)
-    cmake_policy(SET CMP0011 OLD)
+  cmake_policy(SET CMP0011 OLD)
 endif (POLICY CMP0011)

 set(DO_LIBRARIES "")
 foreach (COMPONENT ${DO_USE_COMPONENTS})
-    include(UseDO${COMPONENT})
-    if ("${DO_LIBRARIES}" STREQUAL "" AND
-        NOT "${DO_${COMPONENT}_LIBRARIES}" STREQUAL "")
-        set (DO_LIBRARIES "${DO_${COMPONENT}_LIBRARIES}")
-    elseif (NOT "${DO_${COMPONENT}_LIBRARIES}" STREQUAL "")
-        set(DO_LIBRARIES "${DO_LIBRARIES};${DO_${COMPONENT}_LIBRARIES}")
-    endif ()
+  include(UseDO${COMPONENT})
+  if ("${DO_LIBRARIES}" STREQUAL "" AND
+    NOT "${DO_${COMPONENT}_LIBRARIES}" STREQUAL "")
+    set (DO_LIBRARIES "${DO_${COMPONENT}_LIBRARIES}")
+  elseif (NOT "${DO_${COMPONENT}_LIBRARIES}" STREQUAL "")
+    set(DO_LIBRARIES "${DO_LIBRARIES};${DO_${COMPONENT}_LIBRARIES}")
+  endif ()
 endforeach (COMPONENT)

 # Not stable yet.
 macro (do_use_modules TARGET COMPONENT_LIST)
-    # Include the following useful macros.
-    set_target_properties(${TARGET} PROPERTIES
-                          COMPILE_FLAGS -DSRCDIR=${CMAKE_CURRENT_SOURCE_DIR})
+  # Include the following useful macros.
+  set_target_properties(${TARGET} PROPERTIES
+                        COMPILE_FLAGS -DSRCDIR=${CMAKE_CURRENT_SOURCE_DIR})

-    if (DO_USE_FROM_SOURCE)
-        set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS DO_STATIC)
-        target_link_libraries(${TARGET} ${COMPONENT_LIST})
+  if (DO_USE_FROM_SOURCE)
+    set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS DO_STATIC)
+    target_link_libraries(${TARGET} ${COMPONENT_LIST})
+  else ()
+    # Warn the user that precompiled libraries does not work for every build types...
+    message (WARNING "Precompiled libraries only work for DEBUG or RELEASE builds... If you want to use other build modes, you need to recompile DO++ from the sources. To do so, just insert at the top of the CMakeLists.txt: '(set DO_USE_FROM_SOURCE 1)'")
+
+    # Static or dynamic linking?
+    if (DO_USE_STATIC_LIBS)
+      set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS DO_STATIC)
+    endif ()
+
+    # Set library paths
+    if (WIN32)
+      set(FLAG /LIBPATH:"${DO_DIR}/lib")
     else ()
-        # Warn the user that precompiled libraries does not work for every build types...
-        message (WARNING "Precompiled libraries only work for DEBUG or RELEASE builds... If you want to use other build modes, you need to recompile DO++ from the sources. To do so, just insert at the top of the CMakeLists.txt: '(set DO_USE_FROM_SOURCE 1)'")
+      set(FLAG -L"${DO_DIR}/lib")
+    endif ()
+    set_target_properties(${TARGET} PROPERTIES LINK_FLAGS ${FLAG})

-        # Static or dynamic linking?
-        if (DO_USE_STATIC_LIBS)
-            set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS DO_STATIC)
+    # Link with libraries listed in ${COMPONENT_LIST}
+    foreach (f ${COMPONENT_LIST})
+      if ("${f}" STREQUAL "DO_Graphics")
+        qt5_use_modules(${TARGET} Widgets OpenGL) # Link with Qt5
+        target_link_libraries(${TARGET} ${OPENGL_LIBRARIES})
+      endif ()
+
+      if (NOT "${${f}_LIBRARIES}" STREQUAL "" AND NOT DO_USE_STATIC_LIBS)
+        if (WIN32)
+          target_link_libraries(${TARGET}
+                                debug ${f}_SHARED-1.0.0-debug
+                                optimized ${f}_SHARED-1.0.0-release)
+        else ()
+          target_link_libraries(${TARGET} ${f}_SHARED-1.0.0)
         endif ()
-
-        # Set library paths
-        if (WIN32)
-            set(FLAG /LIBPATH:"${DO_DIR}/lib")
+      elseif (NOT "${${f}_LIBRARIES}" STREQUAL "")
+         if (WIN32)
+          target_link_libraries(${TARGET} debug ${f}-1.0.0-debug
+                                optimized ${f}-1.0.0-release)
         else ()
-            set(FLAG -L"${DO_DIR}/lib")
+          target_link_libraries(${TARGET} ${f}-1.0.0)
         endif ()
-        set_target_properties(${TARGET} PROPERTIES LINK_FLAGS ${FLAG})
-
-        # Link with libraries listed in ${COMPONENT_LIST}
-        foreach (f ${COMPONENT_LIST})
-            if ("${f}" STREQUAL "DO_Graphics")
-                qt5_use_modules(${TARGET} Widgets OpenGL) # Link with Qt5
-                target_link_libraries(${TARGET} ${OPENGL_LIBRARIES})
-            endif ()
-
-            if (NOT "${${f}_LIBRARIES}" STREQUAL "" AND NOT DO_USE_STATIC_LIBS)
-                if (WIN32)
-                    target_link_libraries(${TARGET}
-                        debug ${f}_SHARED-1.0.0-debug
-                        optimized ${f}_SHARED-1.0.0-release)
-                else ()
-                    target_link_libraries(${TARGET} ${f}_SHARED-1.0.0)
-                endif ()
-            elseif (NOT "${${f}_LIBRARIES}" STREQUAL "")
-                 if (WIN32)
-                    target_link_libraries(${TARGET} debug ${f}-1.0.0-debug
-                                                    optimized ${f}-1.0.0-release)
-                else ()
-                    target_link_libraries(${TARGET} ${f}-1.0.0)
-                endif ()
-            endif ()
-        endforeach ()
-    endif ()
+      endif ()
+    endforeach ()
+  endif ()
 endmacro (do_use_modules)


CMake: Warn if the BSL isn't the expected version

CMake will warn if the BSL dependency isn't at the expected
version locally. This is useful when using a local copy with
-DFETCHCONTENT_SOURCE_DIR_BSL=<path_to_bsl> that needs to
be updated.

--- cmake/depend/bsl.cmake
+++ cmake/depend/bsl.cmake
@@ -19,10 +19,12 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.

+set(GIT_TAG         4215efc76ff0997a44f39a16f6f84b487cef5bf6)
+
 FetchContent_Declare(
     bsl
     GIT_REPOSITORY  https://github.com/bareflank/bsl.git
-    GIT_TAG         4215efc76ff0997a44f39a16f6f84b487cef5bf6
+    GIT_TAG         ${GIT_TAG}
 )

 FetchContent_GetProperties(bsl)
@@ -33,3 +35,6 @@
     FetchContent_Populate(bsl)
     add_subdirectory(${bsl_SOURCE_DIR} ${bsl_BINARY_DIR})
 endif()
+
+include(${bsl_SOURCE_DIR}/cmake/function/bf_check_dependency.cmake)
+bf_check_dependency(bsl ${GIT_TAG})


Only use the appropriate component of QT_LIBRARIES depending on the embedded
keywords.

svn path=/trunk/; revision=9945

--- cmake/modules/qt.cmake
+++ cmake/modules/qt.cmake
@@ -50,6 +50,33 @@
       set(qt_COMPILE_FLAGS "${qt_COMPILE_FLAGS} -I${DIR}")
     endforeach(DIR ${QT_INCLUDES})

+    split_libraries_list(QT_LIBRARIES QT_LIBRARIES_general QT_LIBRARIES_debug QT_LIBRARIES_optimized)
+
+    # There is a complicated interpretation issue to be considered here.
+    # FindQt4.cmake associates "debug" with the Qt4 library DEBUG suffix (with
+    # currently unknown criteria for which libraries are labelled that way),
+    # and "optimized" with the Qt4 library RELEASE suffix (again with
+    # currently unknown criteria).  Furthermore, CMake documentation is
+    # is not completely clear on how the debug and optimized keywords are to
+    # be interpreted by target_link_libraries for the Debug, Release,
+    # RelWithDebInfo and MinSizeRes possibilities for CMAKE_BUILD_TYPE.  For
+    # example with gcc, the C options are Debug=-g, Release=-O3,
+    # RelWithDebInfo = -g -O2, and MinSizeRes=-Os.  For that compiler, some of
+    # the options are clearly debug (Debug), some of the options are clearly
+    # optimized (Release), but the rest are ambiguous.  This decision may
+    # be changed in the future, but for now choose the debug or optimized
+    # Qt4 libraries only for the cases which are clearly justified, and
+    # otherwise just use the general Qt4 libraries.
+    message(STATUS "QT_LIBRARIES (mixed for all CMAKE_BUILD_TYPES) = ${QT_LIBRARIES}")
+    if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+      set(QT_LIBRARIES ${QT_LIBRARIES_debug})
+    elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
+      set(QT_LIBRARIES ${QT_LIBRARIES_optimized})
+    else(CMAKE_BUILD_TYPE STREQUAL "Debug")
+      set(QT_LIBRARIES ${QT_LIBRARIES_general})
+    endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
+    message(STATUS "specific QT_LIBRARIES results used for this CMAKE_BUILD_TYPE = ${QT_LIBRARIES}")
+
     set(qt_LINK_FLAGS ${QT_LIBRARIES})
     #message("qt_LINK_FLAGS = ${qt_LINK_FLAGS}")
     set(qt_RPATH ${QT_LIBRARY_DIR})


Add support for ResourceGroupsTaggingApi service

--- cmake/sdksCommon.cmake
+++ cmake/sdksCommon.cmake
@@ -108,6 +108,7 @@
 list(APPEND C2J_LIST "cognito-idp:2016-04-18")
 list(APPEND C2J_LIST "application-autoscaling:2016-02-06")
 list(APPEND C2J_LIST "servicecatalog:2015-12-10")
+list(APPEND C2J_LIST "resourcegroupstaggingapi:2017-01-26")

 set(SDK_TEST_PROJECT_LIST "")
 list(APPEND SDK_TEST_PROJECT_LIST "cognito-identity:aws-cpp-sdk-cognitoidentity-integration-tests")


adding new compressible/test/testing.cmake

--- phSolver/compressible/test/testing.cmake
+++ phSolver/compressible/test/testing.cmake
@@ -1,5 +1,5 @@
 set(casename staticBubble)
-set(CDIR ${CASES}/test_surface_tension/gasLiquid/run)
+set(CDIR ${CASES}/${casename}/run)
 set(NPROCS 8)
 c_serial_test(inpCfg_${casename} ${CDIR} cp ${PHASTA_SOURCE_DIR}/phSolver/common/input.config ${CDIR})
 c_serial_test(resCfg_${casename} ${CDIR} cp -r ${CDIR}/../chef/${NPROCS}-procs_case ${CDIR})


added ensembles to GTEST

added ensembles to GTEST

--- test/GoogleTest.cmake
+++ test/GoogleTest.cmake
@@ -1,3 +1,63 @@
+#EnsemblePreprocessor defines NVT = 1, GEMC = 2, GCMC = 3, NPT = 4
+
+function(add_NVT_test name)
+      set(NVT_flags "-DENSEMBLE=1")
+      # My test are all called name_test.cpp
+      add_executable(${name} ${sources} ${headers} ${libHeaders} ${libSources} ${TestHeaders} ${TestSources})
+      target_link_libraries(${name} gtest_main)
+      set_target_properties(${name} PROPERTIES
+      COMPILE_FLAGS "${NVT_flags}")
+      add_test(NAME BasicTypesTest_NVT COMMAND BasicTypesTest)
+      #add_test(NAME CircuitTester_NVT COMMAND DialaTest)
+      add_test(NAME MolLookupTest_NVT COMMAND CheckConsensusBeta)
+      #add_test(NAME PSFParserTest_NVT COMMAND CheckProtAndWaterTest)
+      add_test(NAME EndianTest_NVT COMMAND TestBitSwap)
+endfunction(add_NVT_test)
+
+function(add_NPT_test name)
+      set(NPT_flags "-DENSEMBLE=4")
+      # My test are all called name_test.cpp
+      add_executable(${name} ${sources} ${headers} ${libHeaders} ${libSources} ${TestHeaders} ${TestSources})
+      target_link_libraries(${name} gtest_main)
+      set_target_properties(${name} PROPERTIES
+      COMPILE_FLAGS "${NPT_flags}")
+      add_test(NAME BasicTypesTest_NPT COMMAND BasicTypesTest)
+      #add_test(NAME CircuitTester_NPT COMMAND DialaTest)
+      add_test(NAME MolLookupTest_NPT COMMAND CheckConsensusBeta)
+      #add_test(NAME PSFParserTest_NPT COMMAND CheckProtAndWaterTest)
+      add_test(NAME EndianTest_NPT COMMAND TestBitSwap)
+endfunction(add_NPT_test)
+
+function(add_GCMC_test name)
+      set(GCMC_flags "-DENSEMBLE=3")
+      # My test are all called name_test.cpp
+      add_executable(${name} ${sources} ${headers} ${libHeaders} ${libSources} ${TestHeaders} ${TestSources})
+      target_link_libraries(${name} gtest_main)
+      set_target_properties(${name} PROPERTIES
+      COMPILE_FLAGS "${GCMC_flags}")
+      add_test(NAME BasicTypesTest_GCMC COMMAND BasicTypesTest)
+      #add_test(NAME CircuitTester_GCMC COMMAND DialaTest)
+      add_test(NAME MolLookupTest_GCMC COMMAND CheckConsensusBeta)
+      #add_test(NAME PSFParserTest_GCMC COMMAND CheckProtAndWaterTest)
+      add_test(NAME ConsistentTrajectoryTest COMMAND CheckPDBTrajCoordinates)
+      add_test(NAME EndianTest_GCMC COMMAND TestBitSwap)
+endfunction(add_GCMC_test)
+
+function(add_GEMC_test name)
+      set(GEMC_flags "-DENSEMBLE=2")
+      # My test are all called name_test.cpp
+      add_executable(${name} ${sources} ${headers} ${libHeaders} ${libSources} ${TestHeaders} ${TestSources})
+      target_link_libraries(${name} gtest_main)
+      set_target_properties(${name} PROPERTIES
+      COMPILE_FLAGS "${GEMC_flags}")
+      add_test(NAME BasicTypesTest_GEMC COMMAND BasicTypesTest)
+      #add_test(NAME CircuitTester_GEMC COMMAND DialaTest)
+      add_test(NAME MolLookupTest_GEMC COMMAND CheckConsensusBeta)
+      #add_test(NAME PSFParserTest_GEMC COMMAND CheckProtAndWaterTest)
+      add_test(NAME ConsistentTrajectoryTest COMMAND CheckPDBTrajCoordinates)
+      add_test(NAME EndianTest_GEMC COMMAND TestBitSwap)
+endfunction(add_GEMC_test)
+
 # Download and unpack googletest at configure time
 configure_file(${PROJECT_SOURCE_DIR}/test/CMakeLists.txt.in googletest-download/CMakeLists.txt)
 execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
@@ -33,14 +93,11 @@
 # Include file lists
 include(test/FileList.cmake)

+if(GOMC_GTEST)
 # Now simply link against gtest or gtest_main as needed. Eg
-add_executable(GOMC_Test ${TestHeaders} ${TestSources} ${GOMCHeaders} ${GOMCSources} ${libHeaders} ${libSources})
-target_link_libraries(GOMC_Test gtest_main)
-add_test(NAME BasicTypesTest COMMAND BasicTypesTest)
-add_test(NAME CircuitTester COMMAND DialaTest)
-add_test(NAME MolLookupTest COMMAND CheckConsensusBeta)
-add_test(NAME PSFParserTest COMMAND CheckProtAndWaterTest)
-add_test(NAME EndianTest COMMAND TestBitSwap)
-add_test(NAME ConsistentTrajectoryTest COMMAND CheckPDBTrajCoordinates)
-
-
+  add_NVT_test(GOMC_NVT_Test)
+  add_NPT_test(GOMC_NPT_Test)
+  add_GCMC_test(GOMC_GCMC_Test)
+  add_GEMC_test(GOMC_GEMC_Test)
+  set(GOMC_GTEST 1)
+endif()


Use correct case for CSharp find package

The quiet variable was not getting propagated to the handle standard
args functions due to cases of the variables not matching.

--- CMake/FindCSharp.cmake
+++ CMake/FindCSharp.cmake
@@ -59,7 +59,8 @@
   endif ( )
 endif( )

-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CSHARP DEFAULT_MSG CSHARP_TYPE CSHARP_VERSION CSHARP_COMPILER)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CSharp DEFAULT_MSG CSHARP_TYPE CSHARP_VERSION CSHARP_COMPILER)
+

 # Set the USE_FILE path
 # http://public.kitware.com/Bug/view.php?id=7757


CMake: Support stb installations through vcpkg

--- CMake/InstallSTB.cmake
+++ CMake/InstallSTB.cmake
@@ -1,17 +1,30 @@
-FetchContent_Declare (
-	stb
-	GIT_REPOSITORY [[https://github.com/nothings/stb]]
-	GIT_TAG [[c0c982601f40183e74d84a61237e968dca08380e]]
-)
+find_package (Stb QUIET)
+if (NOT Stb_FOUND)
+	FetchContent_Declare (
+		stb
+		GIT_REPOSITORY [[https://github.com/nothings/stb]]
+		GIT_TAG [[c0c982601f40183e74d84a61237e968dca08380e]]
+	)

-FetchContent_GetProperties (stb)
-if (NOT stb_POPULATED)
-	message (STATUS "Cloning stb…")
-	FetchContent_Populate (stb)
+	FetchContent_GetProperties (stb)
+	if (NOT stb_POPULATED)
+		message (STATUS "Cloning stb…")
+		FetchContent_Populate (stb)
+	endif ()
+
+	add_library (stb::stb INTERFACE IMPORTED)
+	set_target_properties (stb::stb PROPERTIES
+		INTERFACE_INCLUDE_DIRECTORIES "${stb_SOURCE_DIR}"
+		INTERFACE_SOURCES "${CMAKE_SOURCE_DIR}/src/core/stb_impl.c"
+	)
+else ()
+	# vcpkg has its own FindStb.cmake which defines `Stb_FOUND` and
+	# `Stb_INCLUDE_DIR`, but not library which can be readily linked
+	# against. So wrap an interface library around those sources, similar
+	# to when we retrieve the library sources ourselves.
+	add_library (stb::stb INTERFACE IMPORTED)
+	set_target_properties (stb::stb PROPERTIES
+		INTERFACE_INCLUDE_DIRECTORIES "${Stb_INCLUDE_DIR}"
+		INTERFACE_SOURCES "${CMAKE_SOURCE_DIR}/src/core/stb_impl.c"
+	)
 endif ()
-
-add_library( stb::stb INTERFACE IMPORTED)
-set_target_properties(stb::stb PROPERTIES
-	INTERFACE_INCLUDE_DIRECTORIES "${stb_SOURCE_DIR}"
-	INTERFACE_SOURCES "${CMAKE_SOURCE_DIR}/src/core/stb_impl.c"
-)


libsndfile.cmake: Set __USE_MINGW_ANSI_STDIO as needed

--- CMake/libsndfile.cmake
+++ CMake/libsndfile.cmake
@@ -61,11 +61,13 @@
 	set (USE_WINDOWS_API 1)
 	set (USE_WINDOWS_API 1)
 	set (WIN32_TARGET_DLL 1)
+	set (__USE_MINGW_ANSI_STDIO 1)
 else (${WINDOWS})
 	set (OS_IS_WIN32 0)
 	set (USE_WINDOWS_API 0)
 	set (USE_WINDOWS_API 0)
 	set (WIN32_TARGET_DLL 0)
+	set (__USE_MINGW_ANSI_STDIO 0)
 	endif ()

 if (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")


cmake: improved vigranumpy dependencies search

--- config/FindVIGRANUMPY_DEPENDENCIES.cmake
+++ config/FindVIGRANUMPY_DEPENDENCIES.cmake
@@ -17,8 +17,11 @@
         FIND_LIBRARY(PYTHON_LIBRARIES ${PYTHON_LIBRARY_NAME} "${PYTHON_PREFIX}/libs")
         execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
                         "from distutils.sysconfig import *; print get_python_inc()"
-                         OUTPUT_VARIABLE PYTHON_INCLUDE_DIRS OUTPUT_STRIP_TRAILING_WHITESPACE)
-        IF(PYTHON_LIBRARIES AND PYTHON_INCLUDE_DIRS)
+                         OUTPUT_VARIABLE PYTHON_INCLUDE OUTPUT_STRIP_TRAILING_WHITESPACE)
+        SET(PYTHON_INCLUDE_PATH ${PYTHON_INCLUDE}
+            CACHE PATH "Path to Python include files"
+            FORCE)
+        IF(PYTHON_LIBRARIES AND PYTHON_INCLUDE_PATH)
            SET(PYTHONLIBS_FOUND TRUE)
         ENDIF()
     ENDIF()
@@ -91,7 +94,7 @@
                          Boost_PYTHON_FOUND PYTHON_NUMPY_INCLUDE_DIR VIGRANUMPY_INSTALL_DIR)

     IF(NOT VIGRANUMPY_INCLUDE_DIRS OR VIGRANUMPY_INCLUDE_DIRS MATCHES "-NOTFOUND")
-        SET(VIGRANUMPY_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} ${Boost_INCLUDE_DIR} ${PYTHON_NUMPY_INCLUDE_DIR})
+        SET(VIGRANUMPY_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH} ${Boost_INCLUDE_DIR} ${PYTHON_NUMPY_INCLUDE_DIR})
     ENDIF()
     SET(VIGRANUMPY_INCLUDE_DIRS ${VIGRANUMPY_INCLUDE_DIRS}
         CACHE PATH "include directories needed by VIGRA Python bindings"


Fix bug I introduced in #2202

Fix bug I introduced in #2202

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -181,7 +181,7 @@
   microstrain
   fovis
   estimate-pose
-  #vicon # deactivated unless used with vicon camera setup
+  vicon
   apriltags
   bullet
   spotless


Updated the mac target file.

Updated the mac target file.

Homebrew's newest version changes some of the paths.

--- Targets/Mac.cmake
+++ Targets/Mac.cmake
@@ -4,14 +4,16 @@
 # when you install SWIG, it might link against the wrong version of python.
 # That's why I've included custom set variables for the python framework,
 # include path, etc. These come from using Homebrew with default settings.
+# You might need to adjust based on your brew path (in this case /usr/local)
+# and the version of python you have installed.
 set(CMAKE_SYSTEM_NAME Darwin)
 set(CMAKE_C_COMPILER mpicc)
 set(CMAKE_Fortran_COMPILER mpif90)
 set(CMAKE_CXX_COMPILER mpicxx)
-set(Python_FRAMEWORKS /usr/local/Frameworks/Python.framework)
-set(PYTHON_INCLUDE_DIRS /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/Headers)
-set(PYTHON_INCLUDE_PATH /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/Headers /usr/local/lib/python2.7/site-packages/mpi4py/include)
-set(PYTHON_LIBRARIES /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib)
+set(PYTHON_EXECUTABLE python2)
+set(PYTHON_INCLUDE_DIRS /usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/Headers)
+set(PYTHON_INCLUDE_PATH /usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Headers/ /usr/local/lib/python2.7/site-packages/mpi4py/include)
+set(PYTHON_LIBRARIES /usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib)

 set(CXX_TOOLCHAINFLAGS "-O3 -openmp -lgomp")
 set(F_TOOLCHAINFLAGS "-O3 -cpp -fopenmp")


cmake changes

cmake changes

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -67,7 +67,7 @@
 #
 OPTION(VTK_WRAP_PYTHON "wrap classes into the Python interpreted language")
 IF (VTK_WRAP_PYTHON)
-  INCLUDE (${CMAKE_SOURCE_DIR}/CMake/Modules/FindPythonLibs.cmake)
+  INCLUDE (${CMAKE_ROOT}/Modules/FindPythonLibs.cmake)
   FIND_FILE(VTK_WRAP_HINTS hints ${VTK_SOURCE_DIR}/Wrapping )
   UTILITY_SOURCE(VTK_WRAP_PYTHON_EXE vtkWrapPython Wrapping vtkWrapPython.c)
   INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
@@ -78,7 +78,7 @@
 #
 OPTION(VTK_WRAP_JAVA "wrap classes into the Java language")
 IF (VTK_WRAP_JAVA)
-  INCLUDE (${CMAKE_SOURCE_DIR}/CMake/Modules/FindJNI.cmake)
+  INCLUDE (${CMAKE_ROOT}/Modules/FindJNI.cmake)
   FIND_FILE(VTK_WRAP_HINTS hints ${VTK_SOURCE_DIR}/Wrapping )
   UTILITY_SOURCE(VTK_WRAP_JAVA_EXE vtkWrapJava Wrapping vtkWrapJava.c)
   UTILITY_SOURCE(VTK_PARSE_JAVA_EXE vtkParseJava Wrapping vtkParseJava.c)


Fail during build configuration if libwebp < 0.2.0 is found.

--- cmake/FindWebP.cmake
+++ cmake/FindWebP.cmake
@@ -51,3 +51,22 @@

 SET(WEBP_LIBRARIES ${WEBP_LIBRARY})
 SET(WEBP_INCLUDE_DIRS ${WEBP_INCLUDE_DIR})
+
+SET(_WEBP_RQ_INCLUDES ${CMAKE_REQUIRED_INCLUDES})
+
+if(NOT DEFINED _WEBP_COMPILATION_TEST)
+  INCLUDE (CheckCSourceCompiles)
+  SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${WEBP_INCLUDE_DIRS})
+  CHECK_C_SOURCE_COMPILES("#include <webp/decode.h>
+  int main(void) {
+  #if WEBP_DECODER_ABI_VERSION < 0x0200
+  error; // Deliberate compile-time error
+  #endif
+  }"
+   _WEBP_COMPILATION_TEST)
+  SET(CMAKE_REQUIRED_INCLUDES ${_WEBP_RQ_INCLUDES})
+endif()
+
+if(NOT _WEBP_COMPILATION_TEST)
+  message(FATAL_ERROR "You need libwebp 0.2.0 or later")
+endif()


enable OpenMP by default when using ifort

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -3,5 +3,5 @@
 if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
   set(CMAKE_Fortran_FLAGS_INIT "-fopenmp -Wall -Wextra -Wconversion -std=f2008 -pedantic")
 elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
-  set(CMAKE_Fortran_FLAGS_INIT "-stand f08")
+  set(CMAKE_Fortran_FLAGS_INIT "-openmp -stand f08")
 endif()


forget to change swig md5sum to the new one.

--- cmake/get-swig.cmake
+++ cmake/get-swig.cmake
@@ -17,7 +17,7 @@
         PREFIX              ${DEPENDENCY_EXTRACT_DIR}
         DOWNLOAD_DIR        ${DEPENDENCY_DOWNLOAD_DIR}
         URL                 http://downloads.sourceforge.net/project/swig/swigwin/swigwin-${SWIG_VERSION}/swigwin-${SWIG_VERSION}.zip
-        URL_MD5             5cc57e3658f62b7f648bec7eed91a4f0
+        URL_MD5             a49524dad2c91ae1920974e7062bfc93
         #INSTALL_DIR         ${DEPENDENCY_INSTALL_DIR}/../build-tools/swig
         CONFIGURE_COMMAND   ""
         BUILD_COMMAND       ""


Set target options

Set target options

--- test/module_test.cmake
+++ test/module_test.cmake
@@ -99,6 +99,13 @@
 add_executable (${EXECUTABLE_TRANSFORMED_GPU} EXCLUDE_FROM_ALL "${OUTPUT_FILE_GPU}" "${CMAKE_CURRENT_SOURCE_DIR}/${GPU_DIR}/main.f90")
 target_compile_definitions(${EXECUTABLE_TRANSFORMED_GPU} PRIVATE -D_CLAW)

+# Set target specific compilation options
+if(OPENACC_ENABLE)
+  target_compile_options(${EXECUTABLE_TRANSFORMED_GPU} PUBLIC ${OPENACC_FLAGS})
+elseif(OPENMP_ENABLE)
+  target_compile_options(${EXECUTABLE_TRANSFORMED_GPU} PUBLIC ${OPENMP_FLAGS})
+endif()
+
 if(NOT IGNORE_TEST)
   # Compare reference transformed code and output of the transformation
   add_test(NAME ast-transform-${TEST_NAME} COMMAND "${CMAKE_COMMAND}"  --build ${CMAKE_BINARY_DIR} --target transform-${TEST_NAME})


ENH: solve case of WIN32 platform where gdal-config is not found

--- CMake/ImportGdal.cmake
+++ CMake/ImportGdal.cmake
@@ -40,6 +40,7 @@
   ENDIF (GDALCONFIG_EXECUTABLE)

   # Detect if gdal support hdf format
+  IF(NOT WIN32)
   FIND_PROGRAM(GDALCONFIG_EXECUTABLE gdal-config)
   IF (GDALCONFIG_EXECUTABLE)
      EXECUTE_PROCESS(COMMAND ${GDALCONFIG_EXECUTABLE} --formats
@@ -55,6 +56,10 @@
   ELSE (GDALCONFIG_EXECUTABLE)
     MESSAGE(WARNING "gdal-config not found")
   ENDIF (GDALCONFIG_EXECUTABLE)
+  ELSE (NOT WIN32)
+  	# For WIN32 platform, GDAL is automatically build with HDF support.
+    SET(CHECK_GDAL_BUILDED_WITH_HDF 1 CACHE INTERNAL "GDAL_BUILDED_WITH_HDF" FORCE)
+  ENDIF (NOT WIN32)

   # Find geotiff headers
   FIND_PATH(GEOTIFF_INCLUDE_DIRS geotiff.h $ENV{GDAL_INCLUDE_DIR} ${GDAL_INCLUDE_DIR} /usr/include/geotiff /usr/include/libgeotiff)


DOC: fix warning message

DOC: fix warning message

--- CMake/ImportGdal.cmake
+++ CMake/ImportGdal.cmake
@@ -161,7 +161,7 @@
     MESSAGE(WARNING "CHECK_GDALOPEN_SYMBOL test failed : your platform exhibits a gdal/geotiff conflict. "
     "Opening a TIF file may generate a crash. This is most probably because the gdal library you configured "
     "embeds its own libgeotiff and is compiled with --with-hide-internal-symbols=yes.\n"
-    "You might consider building GDAL yourself without using --with-hide-internal-symbols=no" )
+    "You might consider building GDAL yourself without using --with-hide-internal-symbols" )
   ENDIF(NOT CHECK_GDALOPEN_SYMBOL)

   # This test is known to fail with the Ubuntu gdal package
@@ -176,7 +176,7 @@
     MESSAGE(WARNING "CHECK_XTIFFOPEN_SYMBOL test failed : your platform exhibits a gdal/geotiff conflict. "
     "Opening a TIF file may generate a crash. This is most probably because the gdal library you configured "
     "embeds its own libgeotiff and is compiled with --with-hide-internal-symbols=yes.\n"
-    "You might consider building GDAL yourself without using --with-hide-internal-symbols=no" )
+    "You might consider building GDAL yourself without using --with-hide-internal-symbols" )
   ENDIF(NOT CHECK_XTIFFOPEN_SYMBOL)

 ELSE(OTB_USE_EXTERNAL_GDAL)


Synchronize adm files

Synchronize adm files

--- adm_local_without_kernel/cmake_files/SalomeMacros.cmake
+++ adm_local_without_kernel/cmake_files/SalomeMacros.cmake
@@ -465,8 +465,8 @@
   ELSE()
      SET(_var_already_there FALSE)
   ENDIF()
-  #   Make cache entry
-  SET(${pkg_UC}_ROOT_DIR "${_dflt_value}" CACHE PATH "Path to ${pkg_UC} directory")
+  #   Make cache entry, giving precedence to the env variable
+  SET(${pkg_UC}_ROOT_DIR "${_dflt_value}" CACHE PATH "Path to ${pkg_UC} directory" FORCE)

   ##
   ## 2. Find package - try CONFIG mode first (i.e. looking for XYZ-config.cmake)


COMP: Temporarily added debug output to boost config to squash configure errors on MBI dashboard.

--- CMake/PackageDepends/MITK_Boost_Config.cmake
+++ CMake/PackageDepends/MITK_Boost_Config.cmake
@@ -12,6 +12,8 @@
     if(NOT MITK_USE_SYSTEM_Boost)
       set(BOOST_INCLUDEDIR ${CMAKE_BINARY_DIR}/../Boost-install/include/boost-1_54)
       set(BOOST_LIBRARYDIR ${CMAKE_BINARY_DIR}/../Boost-install/lib)
+      # Following line is temporary, see bug #15837.
+      set(Boost_DEBUG TRUE)
     endif()
     find_package(Boost 1.54.0 REQUIRED COMPONENTS ${MITK_USE_Boost_LIBRARIES})
   else()


Fix FindGStreamer.cmake

Fix FindGStreamer.cmake

--- cmake/FindGStreamer.cmake
+++ cmake/FindGStreamer.cmake
@@ -156,9 +156,10 @@
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GStreamer REQUIRED_VARS ${_GSTREAMER_REQUIRED_VARS}
                                             VERSION_VAR   GSTREAMER_VERSION)
 if (WIN32)
+    get_filename_component(_gst_libs_DIR ${GSTREAMER_LIBRARIES} DIRECTORY)
 	find_path(_gst_config_include_DIR
 			NAMES gst/gstconfig.h
-			PATHS C:/gstreamer/1.0/x86/lib C:/gstreamer/1.0/x86_64/lib
+			PATHS ${_gst_libs_DIR}
 			PATH_SUFFIXES gstreamer-1.0/include
 	)
 	list(APPEND GSTREAMER_INCLUDE_DIRS ${_gst_config_include_DIR})


one more attempt to fix the LICENSE install macro

--- cmake/InstallMacros.cmake
+++ cmake/InstallMacros.cmake
@@ -74,8 +74,10 @@
   if (MSVC)
     set(CRLFSTYLE "CRLF")
   endif ()
+  configure_file(${PROJECT_SOURCE_DIR}/${input} "${PROJECT_BINARY_DIR}/${input}" NEWLINE_STYLE ${CRLFSTYLE})
   install(
-    CODE "configure_file(${PROJECT_SOURCE_DIR}/${input} \$ENV{DESTDIR}/${where}${PKG_VERSION}/${output} NEWLINE_STYLE ${CRLFSTYLE})"
+    FILES "${PROJECT_BINARY_DIR}/${input}"
+    DESTINATION "${where}"
     )
 endmacro ()


Fix typo in external project include guard. (#2795)

--- cmake/external/grpc.cmake
+++ cmake/external/grpc.cmake
@@ -19,7 +19,7 @@
 include(external/ssl)
 include(external/protobuf)

-if (NOT TARGET gprc_project)
+if (NOT TARGET grpc_project)
     # Give application developers a hook to configure the version and hash
     # downloaded from GitHub.
     set(GOOGLE_CLOUD_CPP_GRPC_URL


rename WITH_BUILTIN_GLEW, WITH_SYSTEM_GLEW & negate.

--- cmake/external_libs.cmake
+++ cmake/external_libs.cmake
@@ -11,10 +11,10 @@
 	include_directories(${GLUT_INCLUDE_DIR})
 endif()

-if(WITH_BUILTIN_GLEW)
+if(WITH_SYSTEM_GLEW)
+	set(CYCLES_GLEW_LIBRARY ${GLEW_LIBRARY})
+else()
 	set(CYCLES_GLEW_LIBRARY extern_glew)
-else()
-	set(CYCLES_GLEW_LIBRARY ${GLEW_LIBRARY})
 endif()

 ###########################################################################


Add back in pkg-config check for pango and pangoft2. Without it we
don't get the correct include path for the freetype or pango
headers.

svn path=/trunk/; revision=8184

--- cmake/modules/psttf.cmake
+++ cmake/modules/psttf.cmake
@@ -47,7 +47,7 @@
 endif(PLD_psttf)

 if(PLD_psttf)
-  pkg_check_pkgconfig(lasi includedir libdir linkflags cflags _PSTTF)
+  pkg_check_pkgconfig("lasi;pango;pangoft2" includedir libdir linkflags cflags _PSTTF)
   if(linkflags)
     #blank-separated required.
     string(REGEX REPLACE ";" " " psttf_COMPILE_FLAGS "${cflags}")


Doing some cleanup to the iOS toolchain.

* There is no reason to require SDKROOT as an environment variable because we can derive it from xcrun
* Setting CMAKE_RANLIB makes our static archives usable

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

--- cmake/platforms/iOS.cmake
+++ cmake/platforms/iOS.cmake
@@ -15,11 +15,10 @@
 SET(DARWIN_TARGET_OS_NAME ios)

 IF(NOT DEFINED ENV{SDKROOT})
- MESSAGE(FATAL_ERROR "SDKROOT env var must be set: " $ENV{SDKROOT})
-ENDIF()
-
-IF(EXISTS $ENV{SDKROOT})
-  SET(SDKROOT $ENV{SDKROOT})
+ execute_process(COMMAND xcodebuild -version -sdk iphoneos Path
+   OUTPUT_VARIABLE SDKROOT
+   ERROR_QUIET
+   OUTPUT_STRIP_TRAILING_WHITESPACE)
 ELSE()
   execute_process(COMMAND xcodebuild -version -sdk $ENV{SDKROOT} Path
    OUTPUT_VARIABLE SDKROOT
@@ -27,8 +26,14 @@
    OUTPUT_STRIP_TRAILING_WHITESPACE)
 ENDIF()

+IF(NOT EXISTS ${SDKROOT})
+  MESSAGE(FATAL_ERROR "SDKROOT could not be detected!")
+ENDIF()
+
+set(CMAKE_OSX_SYSROOT ${SDKROOT})
+
 IF(NOT CMAKE_C_COMPILER)
-  execute_process(COMMAND xcrun -sdk $ENV{SDKROOT} -find clang
+  execute_process(COMMAND xcrun -sdk ${SDKROOT} -find clang
    OUTPUT_VARIABLE CMAKE_C_COMPILER
    ERROR_QUIET
    OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -36,7 +41,7 @@
 ENDIF()

 IF(NOT CMAKE_CXX_COMPILER)
-  execute_process(COMMAND xcrun -sdk $ENV{SDKROOT} -find clang++
+  execute_process(COMMAND xcrun -sdk ${SDKROOT} -find clang++
    OUTPUT_VARIABLE CMAKE_CXX_COMPILER
    ERROR_QUIET
    OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -44,7 +49,7 @@
 ENDIF()

 IF(NOT CMAKE_AR)
-  execute_process(COMMAND xcrun -sdk $ENV{SDKROOT} -find ar
+  execute_process(COMMAND xcrun -sdk ${SDKROOT} -find ar
    OUTPUT_VARIABLE CMAKE_AR_val
    ERROR_QUIET
    OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -52,8 +57,17 @@
   message(STATUS "Using ar ${CMAKE_AR}")
 ENDIF()

+IF(NOT CMAKE_RANLIB)
+  execute_process(COMMAND xcrun -sdk ${SDKROOT} -find ranlib
+   OUTPUT_VARIABLE CMAKE_RANLIB_val
+   ERROR_QUIET
+   OUTPUT_STRIP_TRAILING_WHITESPACE)
+  SET(CMAKE_RANLIB ${CMAKE_RANLIB_val} CACHE FILEPATH "Ranlib")
+  message(STATUS "Using ranlib ${CMAKE_RANLIB}")
+ENDIF()
+
 IF (NOT DEFINED IOS_MIN_TARGET)
-execute_process(COMMAND xcodebuild -sdk $ENV{SDKROOT} -version SDKVersion
+execute_process(COMMAND xcodebuild -sdk ${SDKROOT} -version SDKVersion
    OUTPUT_VARIABLE IOS_MIN_TARGET
    ERROR_QUIET
    OUTPUT_STRIP_TRAILING_WHITESPACE)


doc doc

doc doc

--- cmake/qibuild/tests.cmake
+++ cmake/qibuild/tests.cmake
@@ -26,12 +26,6 @@
 # \group:SRC sources
 # \group:DEPENDS dependencies to pass to use_lib
 # \group:ARGUMENTS arguments to pass to add_test (to your test program)
-#
-# Usage:
-# create_gtest("test_name" SRC mytest0.cpp mytest1.cpp
-#                          DEPENDS MY_LIB_TO_TEST0 MY_LIB_TO_TEST1
-#                          TIMEOUT 45)
-################################################################################
 function(qi_create_gtest name)
   qi_debug("qi_create_gtest(${name})")
   cmake_parse_arguments(ARG "NO_ADD_TEST" "TIMEOUT" "SRC;DEPENDS;ARGUMENTS" ${ARGN})


qi_create_gtest: always add GTEST dependency

--- cmake/qibuild/tests.cmake
+++ cmake/qibuild/tests.cmake
@@ -81,7 +81,7 @@

   # First, create the target
   qi_create_bin(${name} SRC ${ARG_SRC} ${ARG_UNPARSED_ARGUMENTS} NO_INSTALL)
-  qi_use_lib(${name} ${ARG_DEPENDS})
+  qi_use_lib(${name} GTEST ${ARG_DEPENDS})

   # Build a correct xml output name
   set(_xml_output "${_TESTS_RESULTS_FOLDER}/${name}.xml")


a bit of rosbuild_lite hardening

a bit of rosbuild_lite hardening

--- cmake/rosbuild_lite.cmake
+++ cmake/rosbuild_lite.cmake
@@ -12,68 +12,70 @@
       )

     if(rospack_error)
-        message(STATUS "***")
-        message(STATUS "*** rospack ${COMMAND} ${PACKAGE} failed: ${rospack_error}")
-        message(STATUS "***")
-        set(${cachevar} "ROSPACK_${PACKAGE}_${COMMAND}-NOTFOUND"
-          CACHE INTERNAL "rospack output for rospack ${PACKAGE} ${COMMAND}")
+      message(STATUS "***")
+      message(STATUS "*** rospack ${COMMAND} ${PACKAGE} failed: ${rospack_error}")
+      message(STATUS "***")
+      set(${cachevar} "ROSPACK_${PACKAGE}_${COMMAND}-NOTFOUND"
+        CACHE INTERNAL "rospack output for rospack ${PACKAGE} ${COMMAND}")
     else()
-        separate_arguments(ROSPACK_SEPARATED UNIX_COMMAND ${ROSPACK_OUT})
-        set(${cachevar} ${ROSPACK_SEPARATED} CACHE INTERNAL "value")
-        set(${VAR} ${ROSPACK_SEPARATED} CACHE INTERNAL "" FORCE)
-        # message("${VAR} == ${${VAR}}")
+      separate_arguments(ROSPACK_SEPARATED UNIX_COMMAND ${ROSPACK_OUT})
+      set(${cachevar} ${ROSPACK_SEPARATED} CACHE INTERNAL "value")
+      set(${VAR} ${ROSPACK_SEPARATED} CACHE INTERNAL "" FORCE)
+      # message("${VAR} == ${${VAR}}")
     endif()
   else()
-    set(${VAR} "${${cachevar}}" CACHE INTERNAL "" FORCE)
+    set(${VAR} "${${cachevar}}")
   endif()
 endmacro()

 macro (find_ros_package PACKAGE)
-  rospack(${PACKAGE}_DIR find ${PACKAGE})
+  if (NOT ${PACKAGE}_DIR)
+    rospack(${PACKAGE}_DIR find ${PACKAGE})
+  endif()

   if(NOT ${PACKAGE}_DIR)
     message(STATUS "Could not find package ${PACKAGE} via rosmake")
-  elseif(NOT ${PACKAGE}_FOUND)
-    message(STATUS "Finding ROS package ${PACKAGE} via rospack and ROS environment variables...")
-    rospack(${PACKAGE}_INCLUDE_DIRS cflags-only-I ${PACKAGE})
+  else()
+    if(NOT ${PACKAGE}_FOUND)
+      message(STATUS "Finding ROS package ${PACKAGE} via rospack and ROS environment variables...")
+      rospack(${PACKAGE}_INCLUDE_DIRS cflags-only-I ${PACKAGE})
+      include_directories(${${PACKAGE}_INCLUDE_DIRS})
+      rospack(${PACKAGE}_DEFINITIONS cflags-only-other ${PACKAGE})
+
+      rospack(libdirs libs-only-L ${PACKAGE})
+      rospack(libnames libs-only-l ${PACKAGE})
+
+      set(${PACKAGE}_LIBRARIES "" CACHE INTERNAL "")
+
+      foreach(libname ${ROSPACK_${PACKAGE}_libs-only-l})
+        find_library(${libname}_LIBRARY
+          NAMES ${libname}
+          PATHS ${ROSPACK_${PACKAGE}_libs-only-L}
+          NO_DEFAULT_PATH
+          )
+        find_library(${libname}_LIBRARY ${libname})
+        message("${libname}_LIBRARY ${${libname}_LIBRARY}")
+        if (NOT ${libname}_LIBRARY)
+          message(FATAL_ERROR "uh oh ${PACKAGE} ${libname} found us ${thelib}")
+        endif()
+        set(${PACKAGE}_LIBRARIES ${${PACKAGE}_LIBRARIES};${${libname}_LIBRARY})
+      endforeach()
+      set(${PACKAGE}_LIBRARIES ${${PACKAGE}_LIBRARIES} CACHE INTERNAL "" FORCE)
+    endif()
+
     include_directories(${${PACKAGE}_INCLUDE_DIRS})
-    rospack(${PACKAGE}_DEFINITIONS cflags-only-other ${PACKAGE})
-    foreach(DEF ${${PACKAGE}_DEFINITIONS})
-      add_definitions(" ${DEF}")
-    endforeach()
-    rospack(libdirs libs-only-L ${PACKAGE})
-    rospack(libnames libs-only-l ${PACKAGE})
-    set(${PACKAGE}_LIBRARIES "" CACHE STRING "libs to link against when depending on ${PACKAGE}" FORCE)
+    add_definitions(${${PACKAGE}_DEFINITIONS})

-    # message(STATUS "Finding libraries ${libnames}")
-    # message(STATUS "in directories    ${libdirs}")
-    #foreach(p ${libdirs})
-    #  message("bing=${p}")
-    #endforeach()
-    foreach(libname ${libnames})
-      #message("finding ${libname}")
-      find_library(${libname}_LIBRARY
-        NAMES ${libname}
-        PATHS ${libdirs}
-        NO_DEFAULT_PATH
-        )
-      find_library(${libname}_LIBRARY ${libname})
-      # message("${libname}_LIBRARY ${${libname}_LIBRARY}")
-      if (NOT ${libname}_LIBRARY)
-        message(FATAL_ERROR "uh oh ${PACKAGE} ${libname} found us ${thelib}")
-      endif()
-      list(APPEND ${PACKAGE}_LIBRARIES ${${libname}_LIBRARY})
-      # link_directories(${${PACKAGE}_LIBRARY_DIRS})
-    endforeach()
-    # message("${PACKAGE}_LIBRARIES ${${PACKAGE}_LIBRARIES}")
-  endif()
-
-
-  list(LENGTH ${PACKAGE}_LIBRARIES nlibs)
-  list(LENGTH ${PACKAGE}_INCLUDE_DIRS nincludes)
-  list(LENGTH ${PACKAGE}_DEFINITIONS ndefs)
+    message(STATUS "BING BING ${PACKAGE} ${${PACKAGE}_LIBRARIES}")
+  endif() # not PACKAGE_DIR

   if (${PACKAGE}_DIR)
+
+    message("${PACKAGE}_LIBRARIES ${${PACKAGE}_LIBRARIES}")
+    list(LENGTH ${PACKAGE}_LIBRARIES nlibs)
+    list(LENGTH ${PACKAGE}_INCLUDE_DIRS nincludes)
+    list(LENGTH ${PACKAGE}_DEFINITIONS ndefs)
+
     message(STATUS "+ ${PACKAGE} at ${${PACKAGE}_DIR}")
     message(STATUS "+   ${nlibs} libraries, ${nincludes} include directories, ${ndefs} compile definitions")
     set(${PACKAGE}_FOUND TRUE CACHE INTERNAL "" FORCE)


Link to gcc_s and gcc if compiler is GCC version 5 (#17849)

When using cmake and GCC 5.4 to build tensorflow in Ubuntu 16.04,
the following error message would show up when loading
_pywrap_tensorflow_internal.so:
```
_pywrap_tensorflow_internal.so: undefined symbol: __cpu_model
```

The root cause is the same to this issue:
https://github.com/tensorflow/tensorflow/issues/9593

Signed-off-by: Yihong Wang <f520643bf8cff572a9eb593b2aa4ab3c892470e2@ibm.com>

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -586,6 +586,12 @@
     ${pywrap_tensorflow_deffile}
 )

+# There is a bug in GCC 5 resulting in undefined reference to a __cpu_model function when
+# linking to the tensorflow library. Adding the following libraries fixes it.
+if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0)
+    target_link_libraries(pywrap_tensorflow_internal PRIVATE gcc_s gcc)
+endif()
+
 if(WIN32)
     add_dependencies(pywrap_tensorflow_internal pywrap_tensorflow_internal_static)
 endif(WIN32)


Remove globbed file that doesn't actually exist on this branch :(

Change-Id: I60c0027c176792c9806ab1c58394dc8b49ebeb0f

--- core/log/CMakeFiles.cmake
+++ core/log/CMakeFiles.cmake
@@ -23,7 +23,6 @@
     filter.go
     handler.go
     log.go
-    log.pb.go
     logger.go
     message.go
     raw.go
@@ -35,5 +34,5 @@
     values.go
 )
 set(dirs
-
+
 )


Fix cegui_dependent_option so it actually works with conditionals

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -520,8 +520,9 @@
 macro (cegui_dependent_option OPTIONNAME DESC DEPS)
     set (${OPTIONNAME}_DEFAULT TRUE)
     foreach (DEP ${DEPS})
+        string(REGEX REPLACE " +" ";" _DEP "${DEP}")
         # Don't use NOT here, because conditions like 'NOT NOT foo' will break
-        if (${${DEP}})
+        if (${_DEP})
         else()
             set (${OPTIONNAME}_DEFAULT FALSE)
         endif()


Refactor ClangFormat.cmake

Refactor ClangFormat.cmake

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -1,29 +1,31 @@
 if(NOT CLANG_FORMAT_COMMAND)
-    set(CLANG_FORMAT_COMMAND "clang-format")
+    set(CLANG_FORMAT_COMMAND "clang-format-6" "clang-format-7" "clang-format-8" "clang-format")
 endif()

 find_program(CLANG_FORMAT_PROGRAM ${CLANG_FORMAT_COMMAND})
-if(CLANG_FORMAT_PROGRAM)
-    message(STATUS "Found ClangFormat at ${CLANG_FORMAT_PROGRAM}")
+if(NOT CLANG_FORMAT_PROGRAM)
+    message(STATUS "clang-format not found")
+    function(format)
+        # no-op
+    endfunction()
+    return()
+endif()

-    function(clang_format TARGET SOURCES)
-        list(APPEND SOURCE_LIST)
-        add_custom_target(${TARGET}-clang-format VERBATIM)
-        foreach(SOURCE_FILE IN LISTS ${SOURCES})
-            list(APPEND SOURCE_LIST ${SOURCE_FILE})
-            add_custom_command(
-                    COMMAND ${CLANG_FORMAT_PROGRAM} -i -style=file ${SOURCE_FILE}
-                    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE}
-                    COMMENT "Formatting ${SOURCE_FILE} with ${CLANG_FORMAT_PROGRAM}"
-                    TARGET ${TARGET}-clang-format
-                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-            )
-        endforeach()
+message(STATUS "Found clang-format at ${CLANG_FORMAT_PROGRAM}")

-        add_dependencies(${TARGET} ${TARGET}-clang-format)
-    endfunction()
-else()
-    function(clang_format TARGET SOURCES)
-        message(WARNING "Tried to call clang-format for sources but it wasn't found")
-    endfunction()
-endif()+function(format TARGET SOURCES)
+    list(APPEND SOURCE_LIST)
+    add_custom_target(${TARGET}-format VERBATIM)
+    foreach(SOURCE_FILE IN LISTS ${SOURCES})
+        list(APPEND SOURCE_LIST ${SOURCE_FILE})
+        add_custom_command(
+                COMMAND ${CLANG_FORMAT_PROGRAM} -i -style=file ${SOURCE_FILE}
+                DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE}
+                COMMENT "Formatting ${SOURCE_FILE} with ${CLANG_FORMAT_PROGRAM}"
+                TARGET ${TARGET}-format
+                WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+        )
+    endforeach()
+
+    add_dependencies(${TARGET} ${TARGET}-format)
+endfunction()


add use of profile names

add use of profile names

--- cmake/ConanInline.cmake
+++ cmake/ConanInline.cmake
@@ -62,7 +62,14 @@
 	if(CMAKE_CXX_STANDARD)
 		set(settings ${settings} compiler.cppstd=${CMAKE_CXX_STANDARD})
 	endif()
+	if (NOT "$ENV{CONAN_PROFILE_NAME}" STREQUAL "")
+    	set(CONAN_PROFILE "$ENV{CONAN_PROFILE_NAME}" CACHE INTERNAL "Copied from environment variable")
+    else()
+    	set(CONAN_PROFILE "default" CACHE INTERNAL "Copied from environment variable")
+   endif()
+
 	conan_cmake_install(PATH_OR_REFERENCE .
 	                    BUILD missing
+	                    PROFILE ${CONAN_PROFILE}
 	                    SETTINGS ${settings})
 endmacro()


Update ImportBoost.cmake for newer versions of Boost (#266)

Previously this script allowed using Boost up to 1.61 with CMake < 3.5 Updated
with _Boost_IMPORTED_TARGETS from CMake 3.10, so it can (maybe) handle up to
Boost 1.65 with older CMake versions.

Tested the case Boost 1.63 + CMake 3.5

--- cmake/ImportBoost.cmake
+++ cmake/ImportBoost.cmake
@@ -4,6 +4,11 @@
 # targets are not defined.
 #
 # Modified from CMake 3.5.2 FindBoost.cmake by Leo Koppel <lkoppel@uwaterloo.ca>
+#
+# Updated _Boost_COMPONENT_DEPENDENCIES from CMake 3.10.0 to allow some newer
+# Boost / older CMake combinations as well (e.g. Boost 1.63 with CMake 3.5).
+# This case is mostly untested.
+#
 #
 #=============================================================================
 # Copyright 2006-2012 Kitware, Inc.
@@ -111,7 +116,10 @@
     # The addition of a new release should only require it to be run
     # against the new release.
     set(_Boost_IMPORTED_TARGETS TRUE)
-    if(NOT Boost_VERSION VERSION_LESS 103300 AND Boost_VERSION VERSION_LESS 103500)
+    if(Boost_VERSION VERSION_LESS 103300)
+        message(WARNING "Imported targets and dependency information not available for Boost version ${Boost_VERSION} (all versions older than 1.33)")
+        set(_Boost_IMPORTED_TARGETS FALSE)
+    elseif(NOT Boost_VERSION VERSION_LESS 103300 AND Boost_VERSION VERSION_LESS 103500)
         set(_Boost_IOSTREAMS_DEPENDENCIES regex thread)
         set(_Boost_REGEX_DEPENDENCIES thread)
         set(_Boost_WAVE_DEPENDENCIES filesystem thread)
@@ -265,7 +273,7 @@
         set(_Boost_TIMER_DEPENDENCIES chrono system)
         set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
         set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-    elseif(NOT Boost_VERSION VERSION_LESS 106000 AND Boost_VERSION VERSION_LESS 106200)
+    elseif(NOT Boost_VERSION VERSION_LESS 106000 AND Boost_VERSION VERSION_LESS 106100)
         set(_Boost_CHRONO_DEPENDENCIES system)
         set(_Boost_COROUTINE_DEPENDENCIES context system)
         set(_Boost_FILESYSTEM_DEPENDENCIES system)
@@ -279,9 +287,73 @@
         set(_Boost_TIMER_DEPENDENCIES chrono system)
         set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
         set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(NOT Boost_VERSION VERSION_LESS 106100 AND Boost_VERSION VERSION_LESS 106200)
+        set(_Boost_CHRONO_DEPENDENCIES system)
+        set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+        set(_Boost_COROUTINE_DEPENDENCIES context system)
+        set(_Boost_FILESYSTEM_DEPENDENCIES system)
+        set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+        set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+        set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+        set(_Boost_MPI_DEPENDENCIES serialization)
+        set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+        set(_Boost_RANDOM_DEPENDENCIES system)
+        set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+        set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+        set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106300)
+        set(_Boost_CHRONO_DEPENDENCIES system)
+        set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+        set(_Boost_COROUTINE_DEPENDENCIES context system)
+        set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+        set(_Boost_FILESYSTEM_DEPENDENCIES system)
+        set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+        set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+        set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+        set(_Boost_MPI_DEPENDENCIES serialization)
+        set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+        set(_Boost_RANDOM_DEPENDENCIES system)
+        set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+        set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+        set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(NOT Boost_VERSION VERSION_LESS 106300 AND Boost_VERSION VERSION_LESS 106500)
+        set(_Boost_CHRONO_DEPENDENCIES system)
+        set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+        set(_Boost_COROUTINE_DEPENDENCIES context system)
+        set(_Boost_COROUTINE2_DEPENDENCIES context fiber thread chrono system date_time)
+        set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+        set(_Boost_FILESYSTEM_DEPENDENCIES system)
+        set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+        set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+        set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+        set(_Boost_MPI_DEPENDENCIES serialization)
+        set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+        set(_Boost_RANDOM_DEPENDENCIES system)
+        set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+        set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+        set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
     else()
-        message(WARNING "Imported targets not available for Boost version ${Boost_VERSION}")
-        set(_Boost_IMPORTED_TARGETS FALSE)
+        if(NOT Boost_VERSION VERSION_LESS 106500)
+            set(_Boost_CHRONO_DEPENDENCIES system)
+            set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+            set(_Boost_COROUTINE_DEPENDENCIES context system)
+            set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+            set(_Boost_FILESYSTEM_DEPENDENCIES system)
+            set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+            set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+            set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+            set(_Boost_MPI_DEPENDENCIES serialization)
+            set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+            set(_Boost_NUMPY_DEPENDENCIES python)
+            set(_Boost_RANDOM_DEPENDENCIES system)
+            set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+            set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+            set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+        endif()
+        if(NOT Boost_VERSION VERSION_LESS 106600)
+            message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
+            set(_Boost_IMPORTED_TARGETS FALSE)
+        endif()
     endif()

     string(TOUPPER ${component} uppercomponent)


Make ocv_include_directories a function to minimize problems with windows backslashes

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -12,7 +12,7 @@
 endif()

 #added include directories in such way that directories from the OpenCV source tree go first
-macro(ocv_include_directories)
+function(ocv_include_directories)
   set(__add_before "")
   foreach(dir ${ARGN})
     get_filename_component(__abs_dir "${dir}" ABSOLUTE)
@@ -23,7 +23,7 @@
     endif()
   endforeach()
   include_directories(BEFORE ${__add_before})
-endmacro()
+endfunction()

 # Provides an option that the user can optionally select.


label meta integration test with integration label

--- cmake/ShogunUtils.cmake
+++ cmake/ShogunUtils.cmake
@@ -96,6 +96,7 @@
                     set_tests_properties(
                         integration_meta_${META_TARGET}-${NAME_WITH_DIR}
 	                        PROPERTIES
+	                        LABELS "integration"
 	                        DEPENDS generated_${META_TARGET}-${NAME_WITH_DIR}
                     )
     ENDIF()


Tweak documentation.

Tweak documentation.

pkgconfig ==> pkg_check_pkgconfig (which implies cflags must be converted
to blank delimited string, and only use linkflags to decide whether there
was success or not)

exec_prog ==> execute_process

svn path=/trunk/; revision=7680

--- cmake/modules/gcw.cmake
+++ cmake/modules/gcw.cmake
@@ -21,57 +21,58 @@
 # device driver.
 # The following variables are set/modified:
 # PLD_gcw		  - ON means the gcw device is enabled.
-# gcw_COMPILE_FLAGS	  - individual COMPILE_FLAGS required to compile gcw
-# 			    device.
-# gcw_LINK_FLAGS	  - individual LINK_FLAGS for dynamic gcw device.
+# gcw_COMPILE_FLAGS	  - blank-separated COMPILE_FLAGS required to
+#			    compile gcw device and gnome2 bindings.
+# gcw_LINK_FLAGS	  - list of LINK_FLAGS for dynamic gcw device and
+#			    gnome2 bindings.
 # gcw_TARGETS		  - list of targets which the gcw dynamic device
-# 			    depends on.
+#			    depends on.
 # DRIVERS_LINK_FLAGS	  - list of LINK_FLAGS for case when
-# 			    ENABLE_DYNDRIVERS OFF.  (gcw_TARGETS not included
+#			    ENABLE_DYNDRIVERS OFF.  (gcw_TARGETS not included
 #			    since source code used instead of this target
 #			    for ENABLE_DYNDRIVERS OFF.)
 # gcw_SOURCE		  - list of source files other than gcw.c
-if(PLD_gcw)
-  if(NOT PKGCONFIG_EXECUTABLE)
+# PYGCW_CFLAGS		  - blank-separated COMPILE_FLAGS required to
+#			    compile pygcw bindings.
+# PYGCW_LIBS		  - list of LINK_FLAGS for pygcw bindings.
+if(PLD_gcw)
+  if(NOT PKG_CONFIG_EXECUTABLE)
     message(STATUS
     "WARNING: pkg-config not found. Setting PLD_gcw to OFF."
     )
     set(PLD_gcw OFF CACHE BOOL "Enable gcw device" FORCE)
-  endif(NOT PKGCONFIG_EXECUTABLE)
+  endif(NOT PKG_CONFIG_EXECUTABLE)
 endif(PLD_gcw)
 if(PLD_gcw)
 # linkflags and cflags ignored because not used in autotools side and
 # there is a question whether all that ton of extra potentially interfering
 # libraries might be causing a segfault that is observed for the
 # dynamic devices case.
-#  pkgconfig(libgnomeui-2.0 includedir libdir linkflags cflags)
-#  if(linkflags AND cflags)
-    pkgconfig(libgnomeprintui-2.2 includedir libdir linkflags1 cflags1)
-    if(linkflags1 AND cflags1)
-      # N.B. pkgconfig returns blank-delimited strings so must concatanate
-      # results the same way.
-      #set(gcw_COMPILE_FLAGS "${cflags} ${cflags1}")
-      #set(gcw_LINK_FLAGS "${linkflags} ${linkflags1}")
-      set(gcw_COMPILE_FLAGS "${cflags1}")
+#  pkg_check_pkgconfig(libgnomeui-2.0 includedir libdir linkflags cflags _GCW1)
+#  if(linkflags)
+    pkg_check_pkgconfig(libgnomeprintui-2.2 includedir libdir linkflags1 cflags1 _GCW2)
+    if(linkflags1)
+      # Requires blank-delimited list.
+      string(REGEX REPLACE ";" " " gcw_COMPILE_FLAGS "${cflags1}")
       set(gcw_LINK_FLAGS "${linkflags1}")
-    else(linkflags1 AND cflags1)
+    else(linkflags1)
       message(STATUS
       "WARNING: libgnomeprintui-2.2 not found.  Setting PLD_gcw "
       "to OFF."
       )
       set(PLD_gcw OFF CACHE BOOL "Enable gcw device" FORCE)
-    endif(linkflags1 AND cflags1)
-#  else(linkflags AND cflags)
+    endif(linkflags1)
+#  else(linkflags)
 #    message(STATUS "WARNING: libgnomeui-2.0 not found.  "
 #    "Setting PLD_gcw to OFF."
 #    )
 #    set(PLD_gcw OFF CACHE BOOL "Enable gcw device" FORCE)
-#  endif(linkflags AND cflags)
+#  endif(linkflags)
 endif(PLD_gcw)
 if(PLD_gcw)
 #  Check for gthread-2.0 done in cf/gcw.ac, but result not actually used
 #  anywhere in the autotools configuration so we comment it out here.
-#  pkgconfig(gthread-2.0 includedir libdir linkflags cflags)
+#  pkg_check_pkgconfig(gthread-2.0 includedir libdir linkflags cflags _GCW3)
   set(include_files_to_check
   "math.h"
   "glib.h"
@@ -165,25 +166,29 @@
 endif(ENABLE_pygcw AND NOT ENABLE_python)

 if(ENABLE_pygcw)
-  pkgconfig(pygtk-2.0 includedir libdir linkflags cflags)
-  if(linkflags AND cflags)
-    pkgconfig(gnome-python-2.0 includedir libdir linkflags1 cflags1)
+  pkg_check_pkgconfig(pygtk-2.0 includedir libdir linkflags cflags _GCW4)
+  if(linkflags)
     # This logic needs review.  It was copied right out of cf/gcw.ac
     # which checks for the existence of gnome-python-2.0 but uses no
     # compile or link flag returned by that check.  That made sense
     # at the time because the returned values were blank, but now (2006-11-27)
     # Ubuntu dapper drake, for example, returns an interesting value
     # "-I/usr/include/gnome-python-2.0" for --cflags1.
-    if(linkflags1 AND cflags1)
-      set(PYGCW_CFLAGS "${cflags}")
+    #pkg_check_pkgconfig(gnome-python-2.0 includedir libdir linkflags1 cflags1 _GCW5)
+#    if(linkflags1)
+      # Requires blank-delimited list.
+      string(REGEX REPLACE ";" " " PYGCW_CFLAGS "${cflags}")
       set(PYGCW_LIBS "${linkflags}")
       set(CMAKE_REQUIRED_FLAGS "${PYGCW_CFLAGS}")
       check_include_files(glib-object.h pygcw_HEADERS)
       set(CMAKE_REQUIRED_FLAGS)
       if(pygcw_HEADERS)
-        EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE}
-	ARGS pygtk-2.0 --variable=codegendir
+        execute_process(
+	COMMAND
+	${PKG_CONFIG_EXECUTABLE}
+	pygtk-2.0 --variable=codegendir
 	OUTPUT_VARIABLE codegen
+	OUTPUT_STRIP_TRAILING_WHITESPACE
 	)
 	if(NOT codegen)
           message(STATUS "WARNING: pygtk/codegen not found.  "
@@ -197,16 +202,16 @@
 	)
         set(ENABLE_pygcw OFF CACHE BOOL "Enable Python Gnome2 bindings" FORCE)
       endif(pygcw_HEADERS)
-    else(linkflags1 AND cflags1)
-      message(STATUS "WARNING: gnome-python-2.0 not found. "
-      "Setting ENABLE_pygcw to OFF."
-      )
-      set(ENABLE_pygcw OFF CACHE BOOL "Enable Python Gnome2 bindings" FORCE)
-    endif(linkflags1 AND cflags1)
-  else(linkflags AND cflags)
+#    else(linkflags1)
+#      message(STATUS "WARNING: gnome-python-2.0 not found. "
+#      "Setting ENABLE_pygcw to OFF."
+#      )
+#      set(ENABLE_pygcw OFF CACHE BOOL "Enable Python Gnome2 bindings" FORCE)
+#    endif(linkflags1)
+  else(linkflags)
     message(STATUS "WARNING: pygtk-2.0 not found.  "
     "Setting ENABLE_pygcw to OFF"
     )
     set(ENABLE_pygcw OFF)
-  endif(linkflags AND cflags)
+  endif(linkflags)
 endif(ENABLE_pygcw)


* fixed issue #888: Clang unknown warning option '-Wl'

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -115,7 +115,9 @@
     if(WIN32 AND MSVC)
       set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
     elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+      if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+        set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+      endif()
     elseif(__COMPILER_PATHSCALE)
       set_target_properties(${_name} PROPERTIES LINK_FLAGS -mp)
     else()
@@ -158,7 +160,9 @@
     if(WIN32 AND MSVC)
       set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
     elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+      if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+        set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+      endif()
     else()
       set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl,--as-needed)
     endif()
@@ -198,7 +202,9 @@
                                                 DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX}
                                                 RELEASE_OUTPUT_NAME ${_name}${CMAKE_RELEASE_POSTFIX})
     elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+      if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+        set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+      endif()
     elseif(__COMPILER_PATHSCALE)
       set_target_properties(${_name} PROPERTIES LINK_FLAGS -mp)
     else()
@@ -240,7 +246,9 @@
                                                 DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX}
                                                 RELEASE_OUTPUT_NAME ${_name}${CMAKE_RELEASE_POSTFIX})
     elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+      if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+        set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+      endif()
     elseif(__COMPILER_PATHSCALE)
       set_target_properties(${_name} PROPERTIES LINK_FLAGS -mp)
     else()
@@ -282,7 +290,9 @@
                                                 DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX}
                                                 RELEASE_OUTPUT_NAME ${_name}${CMAKE_RELEASE_POSTFIX})
     elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+      if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+        set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+      endif()
     else()
       set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl,--as-needed)
     endif()
@@ -318,7 +328,9 @@
     #
     # Only link if needed
     if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-      set_target_properties(${_exename} PROPERTIES LINK_FLAGS -Wl)
+      if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+        set_target_properties(${_exename} PROPERTIES LINK_FLAGS -Wl)
+      endif()
       target_link_libraries(${_exename} pthread)
     elseif(UNIX AND NOT ANDROID)
       set_target_properties(${_exename} PROPERTIES LINK_FLAGS -Wl,--as-needed)


FIX: switch to 'if test' syntax from 'if [' for shell commands (cmake issues)

--HG--
branch : v0-8

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -316,33 +316,33 @@
     endif()

     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-        COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; rm -rf \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks\"
+        COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; rm -rf \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks\"
         COMMENT "Removing old Frameworks in ${_TARGET_NAME}.app")
     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-        COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; rm -rf \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources\"
+        COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; rm -rf \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources\"
         COMMENT "Removing old Resources in ${_TARGET_NAME}.app")

     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-        COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; mkdir -p \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks\"
+        COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; mkdir -p \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks\"
         COMMENT "Creating Frameworks directory ${_TARGET_NAME}.app")
     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-        COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; mkdir -p \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources\"
+        COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; mkdir -p \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources\"
         COMMENT "Creating Resources directory ${_TARGET_NAME}.app")

     if (NOT ${_STATIC})
         if (NOT CEGUI_BUILD_SHARED_LIBS_WITH_STATIC_DEPENDENCIES)
             add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-                COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; ce_libglob=\"*${CEGUI_BUILD_SUFFIX}.dylib\"\; else ce_ext=\"\"\; shopt -s extglob\; ce_libglob=\"!\(*${CEGUI_BUILD_SUFFIX}\).dylib\"\; fi\; ${_ACTIONCMD} ${CMAKE_PREFIX_PATH}/lib/dynamic/$$ce_libglob \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks/\"
+                COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; ce_libglob=\"*${CEGUI_BUILD_SUFFIX}.dylib\"\; else ce_ext=\"\"\; shopt -s extglob\; ce_libglob=\"!\(*${CEGUI_BUILD_SUFFIX}\).dylib\"\; fi\; ${_ACTIONCMD} ${CMAKE_PREFIX_PATH}/lib/dynamic/$$ce_libglob \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks/\"
                 COMMENT "Creating ${_ACTIONMSG} dependency libraries in ${_TARGET_NAME}.app")
         endif()

         add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-            COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; ce_libglob=\"*${CEGUI_BUILD_SUFFIX}.dylib\"\; else ce_ext=\"\"\; shopt -s extglob\; ce_libglob=\"!\(*${CEGUI_BUILD_SUFFIX}\).dylib\"\; fi\; ${_ACTIONCMD} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$$ce_libglob \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks/\"
+            COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; ce_libglob=\"*${CEGUI_BUILD_SUFFIX}.dylib\"\; else ce_ext=\"\"\; shopt -s extglob\; ce_libglob=\"!\(*${CEGUI_BUILD_SUFFIX}\).dylib\"\; fi\; ${_ACTIONCMD} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$$ce_libglob \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks/\"
             COMMENT "Creating ${_ACTIONMSG} built cegui libraries in ${_TARGET_NAME}.app")
     endif()

     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-        COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; ${_ACTIONCMD} ${CMAKE_SOURCE_DIR}/datafiles \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources/\"
+        COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; ${_ACTIONCMD} ${CMAKE_SOURCE_DIR}/datafiles \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources/\"
         COMMENT "Creating ${_ACTIONMSG} sample datafiles ${_TARGET_NAME}.app")

     # When CEGUI_APPLE_SYMLINK_DEPENDENCIES_TO_SAMPLE_APPS is TRUE, this
@@ -352,7 +352,7 @@
     # CEGUI_APPLE_SYMLINK_DEPENDENCIES_TO_SAMPLE_APPS to false and the thing
     # will be copied to the output app bundle instead.
     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-        COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; ${_ACTIONCMD} ${CMAKE_BINARY_DIR}/datafiles/samples \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources/datafiles\"
+        COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; ${_ACTIONCMD} ${CMAKE_BINARY_DIR}/datafiles/samples \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources/datafiles\"
         COMMENT "Creating ${_ACTIONMSG} samples.xml ${_TARGET_NAME}.app")
 endmacro()


FindCppUnit.cmake: Add CPPUNIT_ROOT env var support

With this change it is possible to specify the location of the
cppunit framework.

--- cmake/FindCppUnit.cmake
+++ cmake/FindCppUnit.cmake
@@ -3,6 +3,7 @@
 FIND_PATH(CPPUNIT_INCLUDE_DIR cppunit/TestCase.h
   /usr/local/include
   /usr/include
+  $ENV{CPPUNIT_ROOT}/include
 )

 # With Win32, important to have both


Also look for sndfile-1 as the lib name

Also look for sndfile-1 as the lib name

--- cmake/FindSndFile.cmake
+++ cmake/FindSndFile.cmake
@@ -25,7 +25,7 @@

 find_library(SNDFILE_LIBRARY
     NAMES
-      sndfile
+      sndfile sndfile-1
     PATHS
       /usr/lib
       /usr/local/lib


Update property file for Nuget Linux package (#369)

* Copy mkldnn to output folder for linux. Nuget doesn't resolve dll dependency correctly within a package

* Modify to copy all dlls to output folder

* update rpath for shared library

* Simplified linker flags for RPATH

* Removing copying of dlls to output folder, since setting RPATH works fine now

--- cmake/onnxruntime.cmake
+++ cmake/onnxruntime.cmake
@@ -39,6 +39,10 @@
   set(ONNXRUNTIME_SO_LINK_FLAG "-DEF:${SYMBOL_FILE}")
 endif()

+if (NOT WIN32)
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath='$ORIGIN'")
+endif()
+
 #The BEGIN_WHOLE_ARCHIVE/END_WHOLE_ARCHIVE part should contain the implementations of all the C API functions
 target_link_libraries(onnxruntime PRIVATE
     ${BEGIN_WHOLE_ARCHIVE}


Split off 7.8.58

Split off 7.8.58

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

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


[ioninja] release 3.2.1

[ioninja] release 3.2.1

--- version.cmake
+++ version.cmake
@@ -1,5 +1,5 @@
 set (VERSION_MAJOR     5)
-set (VERSION_MINOR     1)
+set (VERSION_MINOR     2)
 set (VERSION_REVISION  0)
 set (VERSION_TAG)


Fix by Josh Levenberg for cmake build (#7233)

* Fix by Josh Levenberg for cmake build.

* Cmake fix, take 2.

--- tensorflow/contrib/cmake/tf_cc_ops.cmake
+++ tensorflow/contrib/cmake/tf_cc_ops.cmake
@@ -66,13 +66,17 @@
     add_custom_command(
         OUTPUT ${cc_ops_target_dir}/${tf_cc_op_lib_name}.h
                ${cc_ops_target_dir}/${tf_cc_op_lib_name}.cc
-        COMMAND ${tf_cc_op_lib_name}_gen_cc ${cc_ops_target_dir}/${tf_cc_op_lib_name}.h ${cc_ops_target_dir}/${tf_cc_op_lib_name}.cc ${cc_ops_include_internal}
+	       ${cc_ops_target_dir}/${tf_cc_op_lib_name}_internal.h
+	       ${cc_ops_target_dir}/${tf_cc_op_lib_name}_internal.cc
+        COMMAND ${tf_cc_op_lib_name}_gen_cc ${cc_ops_target_dir}/${tf_cc_op_lib_name}.h ${cc_ops_target_dir}/${tf_cc_op_lib_name}.cc ${tensorflow_source_dir}/tensorflow/cc/ops/op_gen_overrides.pbtxt ${cc_ops_include_internal}
         DEPENDS ${tf_cc_op_lib_name}_gen_cc create_cc_ops_header_dir
     )
-
+
     list(APPEND tf_cc_ops_generated_files ${cc_ops_target_dir}/${tf_cc_op_lib_name}.h)
     list(APPEND tf_cc_ops_generated_files ${cc_ops_target_dir}/${tf_cc_op_lib_name}.cc)
-endforeach()
+    list(APPEND tf_cc_ops_generated_files ${cc_ops_target_dir}/${tf_cc_op_lib_name}_internal.h)
+    list(APPEND tf_cc_ops_generated_files ${cc_ops_target_dir}/${tf_cc_op_lib_name}_internal.cc)
+  endforeach()

 ########################################################


[Windows/CMake] Avoid file locking race in protoc.

In particular, we avoid regenerating the C++ protobuf implementations
for `tensorflow/core` proto files, because this can trigger a flaky
race when run on Windows.

Another reminder of why hermetic builds are delightful, I suppose :).

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -118,8 +118,16 @@
     ${tensorflow_source_dir} PYTHON_PROTO_GENFILES ${tf_protos_python_srcs}
 )

+# NOTE(mrry): Avoid regenerating the tensorflow/core protos because this
+# can cause benign-but-failing-on-Windows-due-to-file-locking conflicts
+# when two rules attempt to generate the same file.
+file(GLOB_RECURSE tf_python_protos_cc_srcs RELATIVE ${tensorflow_source_dir}
+    "${tensorflow_source_dir}/tensorflow/python/*.proto"
+    "${tensorflow_source_dir}/tensorflow/contrib/session_bundle/*.proto"
+    "${tensorflow_source_dir}/tensorflow/contrib/tensorboard/*.proto"
+)
 RELATIVE_PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS
-    ${tensorflow_source_dir} ${tf_protos_python_srcs}
+    ${tensorflow_source_dir} ${tf_python_protos_cc_srcs}
 )

 add_library(tf_python_protos_cc ${PROTO_SRCS} ${PROTO_HDRS})


SuperBuild: cannot apply patch on all due to different sources

--- SuperBuild/CMake/External_geos.cmake
+++ SuperBuild/CMake/External_geos.cmake
@@ -37,4 +37,6 @@
 endif()
 SUPERBUILD_UPDATE_CMAKE_VARIABLES(GEOS FALSE)

-SUPERBUILD_PATCH_SOURCE(GEOS "-ut")
+if(NOT WIN32)
+  SUPERBUILD_PATCH_SOURCE(GEOS)
+endif()


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


'ctest_update' call can optionally be disabled when debugging the script

--- CMake/VisomicsDashboardDriverScript.cmake
+++ CMake/VisomicsDashboardDriverScript.cmake
@@ -228,12 +228,23 @@
 # Note: The following command should be specified as a list.
 set(CTEST_GIT_UPDATE_CUSTOM ${CMAKE_COMMAND} -P ${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}-${GIT_TAG}-${SCRIPT_MODE}-gitupdate.cmake)

+#-----------------------------------------------------------------------------
+# The following variable can be used while testing the driver scripts
+#-----------------------------------------------------------------------------
+set(run_ctest_with_update TRUE)
+set(run_ctest_with_configure TRUE)
+set(run_ctest_with_build TRUE)
+set(run_ctest_with_test TRUE)
+set(run_ctest_with_coverage TRUE)
+set(run_ctest_with_memcheck TRUE)
+set(run_ctest_with_packages TRUE)
+set(run_ctest_with_notes TRUE)
+
 #
 # run_ctest macro
 #
 MACRO(run_ctest)
   ctest_start(${model} TRACK ${track})
-  ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE FILES_UPDATED)

   # force a build if this is the first run and the build dir is empty
   if(NOT EXISTS "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
@@ -254,24 +265,20 @@
 ")
   endif()

+  #-----------------------------------------------------------------------------
+  # Update
+  #-----------------------------------------------------------------------------
+  set(FILES_UPDATED 0)
+  if (run_ctest_with_update)
+    ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE FILES_UPDATED)
+  endif()
+
   if (FILES_UPDATED GREATER 0 OR force_build)

     set(force_build 0)

     #-----------------------------------------------------------------------------
-    # The following variable can be used while testing the driver scripts
-    #-----------------------------------------------------------------------------
-    set(run_ctest_with_update TRUE)
-    set(run_ctest_with_configure TRUE)
-    set(run_ctest_with_build TRUE)
-    set(run_ctest_with_test TRUE)
-    set(run_ctest_with_coverage TRUE)
-    set(run_ctest_with_memcheck TRUE)
-    set(run_ctest_with_packages TRUE)
-    set(run_ctest_with_notes TRUE)
-
-    #-----------------------------------------------------------------------------
-    # Update
+    # Submit Update
     #-----------------------------------------------------------------------------
     if(run_ctest_with_update)
       ctest_submit(PARTS Update)


Drop quoting of parameters to compile commands

There seem to be no point since we can't get spaces to work anyway
and cmake is supposed to quote automatically anyway.

--- toolchain/Platform/Freescale-chc12.cmake
+++ toolchain/Platform/Freescale-chc12.cmake
@@ -171,13 +171,13 @@
 #
 # Compiler invocation.
 #
-SET (CMAKE_C_COMPILE_OBJECT 			"\"${HC12_PIPER}\" \"${CMAKE_C_COMPILER}\" <DEFINES> <FLAGS> -ObjN=<OBJECT> -EnvERRORFILE=${HC12_ERR_OUTPUT_DIR}/%n.err -Lasm=${HC12_LST_OUTPUT_DIR}/%n.lst <SOURCE>")
-SET (CMAKE_CXX_COMPILE_OBJECT 			"\"${HC12_PIPER}\" \"${CMAKE_CXX_COMPILER}\" <DEFINES> <FLAGS> -ObjN=<OBJECT> -EnvERRORFILE=${HC12_ERR_OUTPUT_DIR}/%n.err -Lasm=${HC12_LST_OUTPUT_DIR}/%n.lst <SOURCE>")
+SET (CMAKE_C_COMPILE_OBJECT 			"${HC12_PIPER} ${CMAKE_C_COMPILER} <DEFINES> <FLAGS> -ObjN=<OBJECT> -EnvERRORFILE=${HC12_ERR_OUTPUT_DIR}/%n.err -Lasm=${HC12_LST_OUTPUT_DIR}/%n.lst <SOURCE>")
+SET (CMAKE_CXX_COMPILE_OBJECT 			"${HC12_PIPER} ${CMAKE_CXX_COMPILER} <DEFINES> <FLAGS> -ObjN=<OBJECT> -EnvERRORFILE=${HC12_ERR_OUTPUT_DIR}/%n.err -Lasm=${HC12_LST_OUTPUT_DIR}/%n.lst <SOURCE>")

 #
 # Librarian invocation.
 #
-SET (CMAKE_C_CREATE_STATIC_LIBRARY 		"\"${HC12_PIPER}\" \"${CMAKE_AR}\" -ViewHidden -WmsgNu=abcde -NoBeep -WOutFileOn -EnvERRORFILE=${HC12_ERR_OUTPUT_DIR}/%n_lib.err -Mar{<TARGET> <OBJECTS>}")
+SET (CMAKE_C_CREATE_STATIC_LIBRARY 		"${HC12_PIPER} ${CMAKE_AR} -ViewHidden -WmsgNu=abcde -NoBeep -WOutFileOn -EnvERRORFILE=${HC12_ERR_OUTPUT_DIR}/%n_lib.err -Mar{<TARGET> <OBJECTS>}")
 SET (CMAKE_CXX_CREATE_STATIC_LIBRARY 	"${CMAKE_C_CREATE_STATIC_LIBRARY}")

 #
@@ -189,7 +189,7 @@
 #
 # Link invocation.
 #
-SET (CMAKE_C_LINK_EXECUTABLE "\"${HC12_PIPER}\" \"<CMAKE_LINKER>\" -Add{<OBJECTS>} -Add{${HC12_START12}} -Add{${HC12_RTL_LIBS}} <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -O<TARGET> -EnvERRORFILE=${HC12_ERR_OUTPUT_DIR}/link.err ${HC12_LINK_PRM_FILE}")
+SET (CMAKE_C_LINK_EXECUTABLE "${HC12_PIPER} <CMAKE_LINKER> -Add{<OBJECTS>} -Add{${HC12_START12}} -Add{${HC12_RTL_LIBS}} <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -O<TARGET> -EnvERRORFILE=${HC12_ERR_OUTPUT_DIR}/link.err ${HC12_LINK_PRM_FILE}")

 #
 # Create custom output directories.


BUG: 267978 - Tries to find package "QUIET"

--- player/cmake/FindLibAttica.cmake
+++ player/cmake/FindLibAttica.cmake
@@ -18,7 +18,7 @@
    # use pkg-config to get the directories and then use these values
    # in the FIND_PATH() and FIND_LIBRARY() calls
    FIND_PACKAGE(PkgConfig)
-   PKG_CHECK_MODULES(PC_LIBATTICA QUIET libattica)
+   PKG_CHECK_MODULES(PC_LIBATTICA libattica)
    SET(LIBATTICA_DEFINITIONS ${PC_ATTICA_CFLAGS_OTHER})
 ENDIF (NOT WIN32)


Add source files for GUITexture objects to IrrIMGUI.

--- CMake/SourceFiles.cmake
+++ CMake/SourceFiles.cmake
@@ -13,12 +13,14 @@
 	includes/IrrIMGUI/IncludeIrrlicht.h
 	includes/IrrIMGUI/IncludeIMGUI.h
 	includes/IrrIMGUI/IrrIMGUIConfig.h
+	includes/IrrIMGUI/IGUITexture.h
 )

 SET (IRRIMGUI_PRIVATE_HEADER_FILES
 	source/COpenGLIMGUIDriver.h
 	source/IIMGUIDriver.h
 	source/IrrIMGUIDebug_priv.h
+	source/CGUITexture.h
 )

 SET (IRRIMGUI_SOURCE_FILES
@@ -28,4 +30,5 @@
 	source/CIMGUIHandle.cpp
 	source/COpenGLIMGUIDriver.cpp
 	source/IIMGUIDriver.cpp
+	source/CGUITexture.cpp
 )


Add -fno-builtin -ffreestanding -nostdlib options to wasm compiler

--- CMakeModules/wasm.cmake
+++ CMakeModules/wasm.cmake
@@ -39,7 +39,7 @@

     add_custom_command(OUTPUT ${outfile}.bc
       DEPENDS ${infile}
-      COMMAND ${WASM_CLANG} -emit-llvm -O3 --std=c++14 --target=wasm32 -I ${INCLUDE_FOLDERS} -fno-threadsafe-statics -fno-rtti -fno-exceptions -c ${infile} -o ${outfile}.bc
+      COMMAND ${WASM_CLANG} -emit-llvm -O3 --std=c++14 --target=wasm32 -fno-builtin -ffreestanding -nostdlib -I ${INCLUDE_FOLDERS} -fno-threadsafe-statics -fno-rtti -fno-exceptions -c ${infile} -o ${outfile}.bc
       IMPLICIT_DEPENDS CXX ${infile}
       COMMENT "Building LLVM bitcode ${outfile}.bc"
       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}


Add code insight for contracts to Clion via EXCLUDE_FROM_ALL target.

--- CMakeModules/wasm.cmake
+++ CMakeModules/wasm.cmake
@@ -190,6 +190,14 @@

   set(extra_target_dependency)

+  # For CLion code insight
+  include_directories(..)
+  if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${target}.hpp)
+    set(HEADER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${target}.hpp)
+  endif()
+  file(GLOB HEADER_FILES ${ARG_INCLUDE_FOLDERS}/*.hpp ${SYSTEM_INCLUDE_FOLDERS}/*.hpp)
+  add_executable(${target}.tmp EXCLUDE_FROM_ALL ${SOURCE_FILES} ${HEADER_FILE} ${HEADER_FILES})
+
   add_test(NAME "validate_${target}_abi"
            COMMAND ${CMAKE_BINARY_DIR}/scripts/abi_is_json.py ${ABI_FILES})


Use correct CMake cross compiling indicator

Replace use of "CROSS_COMPILING" with "CMAKE_CROSS_COMPILING"
to detect whether project is being cross compiled.

--- Modules/CheckCXX11Features.cmake
+++ Modules/CheckCXX11Features.cmake
@@ -122,7 +122,7 @@
     set(_SRCFILE_FAIL "${_SRCFILE_BASE}_fail.cpp")
     set(_SRCFILE_FAIL_COMPILE "${_SRCFILE_BASE}_fail_compile.cpp")

-    if(CROSS_COMPILING)
+    if(CMAKE_CROSSCOMPILING)
       try_compile(${RESULT_VAR} "${_bindir}" "${_SRCFILE}"
         COMPILE_DEFINITIONS "${CXX11_COMPILER_FLAGS}")
       if(${RESULT_VAR} AND EXISTS ${_SRCFILE_FAIL})


COMP: update wcslib tag

COMP: update wcslib tag

--- SuperBuild/External_wcslib.cmake
+++ SuperBuild/External_wcslib.cmake
@@ -33,7 +33,7 @@
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY "${git_protocol}://github.com/punzo/wcslib"
-    GIT_TAG "b7c2801bb6e22bfb30bd8a73d3ceed8421c65e69"
+    GIT_TAG "5a430c02b8901b1d88a4186aee6369533e3dc950"
     SOURCE_DIR ${${proj}_SOURCE_DIR}
     BINARY_DIR ${${proj}_BINARY_DIR}
     CMAKE_CACHE_ARGS


From Torben Dannhauer, added search for new libcurl and libtiff names

--- CMakeModules/Find3rdPartyDependencies.cmake
+++ CMakeModules/Find3rdPartyDependencies.cmake
@@ -64,7 +64,7 @@
 ################################################################################################

 MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
-        FIND_DEPENDENCY(TIFF tiff.h libtiff ${OSG_3RDPARTY_BIN} "D" "_i")
+        FIND_DEPENDENCY(TIFF tiff.h "libtiff;tiff" ${OSG_3RDPARTY_BIN} "D" "")
         FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype2311MT;freetype234;freetype234MT;freetype235;freetype237;freetype238;freetype244;freetype250;freetype27;" ${OSG_3RDPARTY_BIN} "d" "")
         IF(FREETYPE_FOUND)
             #forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
@@ -73,7 +73,7 @@
             MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
             SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
         ENDIF(FREETYPE_FOUND)
-        FIND_DEPENDENCY(CURL curl/curl.h "libcurl;curllib" ${OSG_3RDPARTY_BIN} "D" "")
+        FIND_DEPENDENCY(CURL curl/curl.h "libcurl;curllib;libcurl_imp" ${OSG_3RDPARTY_BIN} "D" "")
         FIND_DEPENDENCY(JPEG jpeglib.h "libjpeg;jpeg" ${OSG_3RDPARTY_BIN} "D" "")
         FIND_DEPENDENCY(GDAL gdal.h "gdal;gdal16" ${OSG_3RDPARTY_BIN} "d" "_i")
         FIND_DEPENDENCY(GLUT GL/glut.h glut32 ${OSG_3RDPARTY_BIN} "D" "")


Updating external-gmock to download from github

Even though it says it's buildign gmock, it is in fact only building
gtest at this point in time.

In the future, we can update the external-project to download
gtest 1.8 which once again includes gmock.

--- cmake/ExternalGmock.cmake
+++ cmake/ExternalGmock.cmake
@@ -25,7 +25,7 @@
 if( DEFINED ENV{GMOCK_URL} )
   set( ext.gMock_URL "$ENV{GMOCK_URL}" CACHE STRING "URL to download gMock from" )
 else( )
-  set( ext.gMock_URL "https://googlemock.googlecode.com/files/gmock-${ext.gMock_Version}.zip" CACHE STRING "URL to download gMock from" )
+  set( ext.gMock_URL "https://github.com/google/googletest/archive/release-${ext.gMock_Version}.zip" CACHE STRING "URL to download gMock from" )
 endif( )
 mark_as_advanced( ext.gMock_URL )

@@ -91,7 +91,7 @@
 ExternalProject_Add(
   gMock
   URL ${ext.gMock_URL}
-  URL_MD5 073b984d8798ea1594f5e44d85b20d66
+  URL_MD5 ef5e700c8a0f3ee123e2e0209b8b4961
   CMAKE_ARGS ${ext.gMock.cmake_args} -DCMAKE_DEBUG_POSTFIX=d
   BUILD_COMMAND ${ext.gMock.Make}
   INSTALL_COMMAND ""


Tundra install step: Never recursively clean out install dir on other systems than windows. This might to horrible things to the system if CMAKE_INSTALL_PREFIX is manually set to /usr or similar, instead of the default ./build folder. Thanks for mardok45 for reporting this after almost sweeping his whole system in /usr, sorry dude :)

--- cmake/TundraInstall.cmake
+++ cmake/TundraInstall.cmake
@@ -5,8 +5,12 @@
 # NOTE: This macro needs to be called before any other install macros or cmake install(...) calls are done, so its the first step!
 #
 macro (setup_clean_install_step)
-    install (CODE "message(STATUS \"Cleaning install directory: \" ${CMAKE_INSTALL_PREFIX})")
-    install (CODE "file (REMOVE_RECURSE ${CMAKE_INSTALL_PREFIX})")
+    # Never do the recursive remove to the install dir on other systems than windows.
+    # This might do horrible things if you set CMAKE_INSTALL_PREFIX to /usr or similar.
+    if (WIN32)
+        install (CODE "message(STATUS \"Cleaning install directory: \" ${CMAKE_INSTALL_PREFIX})")
+        install (CODE "file (REMOVE_RECURSE ${CMAKE_INSTALL_PREFIX})")
+    endif()
 endmacro ()

 # Macro for installing a directory into the install prefix.


Teach the `clean` target to remove the generated `.bc` and `.yml` files.

--- cmake/add_benchmark.cmake
+++ cmake/add_benchmark.cmake
@@ -58,6 +58,11 @@
         COMMENT "Running ${WLLVM_EXTRACT_BC_TOOL} on ${benchmark_target}"
         ${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG}
       )
+      # Make sure the output file gets removed when the `clean` target is invoked
+      set_property(DIRECTORY
+        APPEND
+        PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "$<TARGET_FILE:${benchmark_target}>.bc"
+      )
     endif()

     if (EMIT_AUGMENTED_BENCHMARK_SPECIFICATION_FILES)
@@ -74,6 +79,11 @@
           ${_extract_bc_arg}
         COMMENT "Generating augmented benchmark specification file for ${benchmark_target}"
       )
+      # Make sure the output file gets removed when the `clean` target is invoked
+      set_property(DIRECTORY
+        APPEND
+        PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "$<TARGET_FILE:${benchmark_target}>.yml"
+      )
     endif()
   endforeach()
   unset(_extract_bc_arg)


Add an option for ITK-4.

Add an option for ITK-4.

--- cmake/externals/ITK.cmake
+++ cmake/externals/ITK.cmake
@@ -4,16 +4,23 @@
         message(FATAL_ERROR "ITK_DIR variable is defined but corresponds to non-existing directory")
     endif()

-    ParseProjectArguments(ITK itkp "" "GIT" ${ARGN})
+    ParseProjectArguments(ITK itkp "" "" ${ARGN})
+
+    option(BUILD_WITH_ITK4    "Build medinria with ITK 4" OFF)
+    option(BUILD_WITH_ITK_GIT "Build medinria with git version of ITK" OFF)

     set(MD5_CHECK)
-    if (${itkp_GIT})
+    if (BUILD_WITH_ITK_GIT)
         set(location_args GIT_REPOSITORY "${git_protocol}://itk.org/ITK.git")
         if (NOT "${revision}" STREQUAL "")
-            set(location_args ${location_args} GIT_TAG ${revision})
+           set(location_args ${location_args} GIT_TAG ${revision})
         endif()
     else()
         set(revision 3.20.1)
+        if (BUILD_WITH_ITK4)
+            set(revision 4.3.1)
+        endif()
+
         if (NOT "${itkp_REVISION}" STREQUAL "")
             set(revision ${itkp_REVISION})
         endif()


do not redefine CPACK_PACKAGE_FILE_NAME, if it is already given

--- cmake/mysql_version.cmake
+++ cmake/mysql_version.cmake
@@ -98,7 +98,9 @@

 INCLUDE(package_name)
-GET_PACKAGE_FILE_NAME(CPACK_PACKAGE_FILE_NAME)
+IF(NOT CPACK_PACKAGE_FILE_NAME)
+  GET_PACKAGE_FILE_NAME(CPACK_PACKAGE_FILE_NAME)
+ENDIF()

 IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME)
   SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mysql-${VERSION}")


ignore proctor and gpu_kinfo when configuring PCLConfig.cmake

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@2901 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_pclconfig.cmake
+++ cmake/pcl_pclconfig.cmake
@@ -1,6 +1,6 @@

 set(PCL_SUBSYSTEMS_MODULES ${PCL_SUBSYSTEMS})
-list(REMOVE_ITEM PCL_SUBSYSTEMS_MODULES tools cuda_apps global_tests)
+list(REMOVE_ITEM PCL_SUBSYSTEMS_MODULES tools cuda_apps global_tests proctor gpu_kinfu)

 set(PCLCONFIG_AVAILABLE_COMPONENTS)
 set(PCLCONFIG_AVAILABLE_COMPONENTS_LIST)


Made the jni path prefix optional so the dependencies project can skip it.

--- generators/android/android-generator.cmake
+++ generators/android/android-generator.cmake
@@ -58,7 +58,7 @@
     ${CMAKE_BINARY_DIR}/jni/${target_relative_path}/Android.mk
   )

-  set(android_includes "${android_includes}\ninclude jni/${target_relative_path}/Android.mk")
+  set(android_includes "${android_includes}\ninclude ${JNI_PATH}${target_relative_path}/Android.mk")

   #    message("${target} ${${target}_resources_dir}")
   if (NOT "${${target}_resources_dir}" STREQUAL "")


COMP: Fix ctkFunctionCheckCompilerFlags - Now relying on CHECK_CXX_ACCEPTS_FLAG build-in cmake macro

--- CMake/ctkFunctionCheckCompilerFlags.cmake
+++ CMake/ctkFunctionCheckCompilerFlags.cmake
@@ -24,30 +24,19 @@
 #    2-myflags: -fprofile-arcs
 #    3-myflags: -fprofile-arcs -Wall

-FUNCTION(ctkFunctionCheckCompilerFlags CXX_FLAGS_TO_TEST RESULT_VAR)
+INCLUDE(TestCXXAcceptsFlag)
+
+FUNCTION(ctkFunctionCheckCompilerFlags CXX_FLAG_TO_TEST RESULT_VAR)

-  IF(CXX_FLAGS_TO_TEST STREQUAL "")
-    MESSAGE(FATAL_ERROR "CXX_FLAGS_TO_TEST shouldn't be empty")
+  IF(CXX_FLAG_TO_TEST STREQUAL "")
+    MESSAGE(FATAL_ERROR "CXX_FLAG_TO_TEST shouldn't be empty")
   ENDIF()

-  SET(bindir ${CMAKE_BINARY_DIR})
-  SET(srcfile ${bindir}/ctkFunctionCheckCompilerFlags.cpp)
-
-  FILE(WRITE ${srcfile} "
-#include <iostream>
-int main(int, char**) { std::cout << \"Rock climbing is awesome\" << std::endl;}
-")
-
-  SET(is_valid 0)
-  TRY_COMPILE(
-    is_valid ${bindir} ${srcfile}
-    CMAKE_FLAGS "-DCMAKE_CXX_FLAGS:STRING=${CXX_FLAGS_TO_TEST}"
-    )
-
-  IF(is_valid)
-    SET(${RESULT_VAR} "${${RESULT_VAR}} ${CXX_FLAGS_TO_TEST}" PARENT_SCOPE)
+  CHECK_CXX_ACCEPTS_FLAG(${CXX_FLAG_TO_TEST} HAS_FLAG)
+
+  IF(HAS_FLAG)
+    SET(${RESULT_VAR} "${${RESULT_VAR}} ${CXX_FLAG_TO_TEST}" PARENT_SCOPE)
   ENDIF()
-
-  MESSAGE(STATUS "Compiler Flags [${CXX_FLAGS_TO_TEST}] supported")
+
 ENDFUNCTION()


RPM_SPEC_PREPARE %description: extra newline is not required

--- Modules/ManageRPM.cmake
+++ Modules/ManageRPM.cmake
@@ -333,7 +333,6 @@
 	    IF(_lang STREQUAL "")
 		SET(_lang "${_sT}")
 	    ELSE(_lang STREQUAL "")
-		RPM_SPEC_STRING_ADD(RPM_SPEC_DESCRIPTION_OUTPUT "\n")
 		RPM_SPEC_STRING_ADD_DIRECTIVE(RPM_SPEC_DESCRIPTION_OUTPUT
 		    "description" "-l ${_lang}" "${_sT}" "\n"
 		)


cmake: added some missing quotes

cmake: added some missing quotes

--- config/VigraAddTest.cmake
+++ config/VigraAddTest.cmake
@@ -34,12 +34,15 @@
         endif()
     endforeach(i)

-    FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/testsuccess.cxx
+    FILE(GLOB TESTSUCCESS_FOUND ${CMAKE_CURRENT_BINARY_DIR}/testsuccess.cxx)
+    IF(NOT TESTSUCCESS_FOUND)
+        FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/testsuccess.cxx
          "// auto-generated dummy file to force re-execution of failed tests
 ")
+    ENDIF()
     SET(SOURCES ${SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/testsuccess.cxx)

-    # configure the target
+    # configure the target
     IF(AUTOBUILD_TESTS)
         ADD_EXECUTABLE(${target} ${SOURCES})
     ELSE()
@@ -53,7 +56,7 @@
     # find the test executable
     GET_TARGET_PROPERTY(${target}_executable ${target} LOCATION)
     IF(MINGW)
-        STRING(REGEX REPLACE "/" "\\\\" ${target}_executable ${${target}_executable})
+        STRING(REGEX REPLACE "/" "\\\\" ${target}_executable "${${target}_executable}")
     ELSE()
         file(TO_NATIVE_PATH ${${target}_executable} ${target}_executable)
     ENDIF()
@@ -65,12 +68,12 @@
             GET_TARGET_PROPERTY(p ${lib} LOCATION)
             STRING(REGEX REPLACE "/[^/]*$" "" p ${p}) # get path prefix
             IF(MINGW)
-                STRING(REGEX REPLACE "/" "\\\\" p ${p})
+                STRING(REGEX REPLACE "/" "\\\\" p "${p}")
             ELSE()
                 file(TO_NATIVE_PATH ${p} p)
             ENDIF()
             if(NOT ${p} MATCHES "NOTFOUND")
-                set(path  ${path} ${p})
+                set(path  "${path}" "${p}")
 #                set_tests_properties(${target} PROPERTIES ENVIRONMENT "PATH=${path}:$PATH")
             endif()
         ENDFOREACH(lib)
@@ -88,7 +91,7 @@
     IF(CYGWIN)
         ADD_TEST(${target} ${VIGRA_RUN_TEST} ${${target}_executable} ${path})
     ELSEIF(MINGW)
-        STRING(REGEX REPLACE "\\\\" "\\\\\\\\" ${target}_executable ${${target}_executable})
+        STRING(REGEX REPLACE "\\\\" "\\\\\\\\" ${target}_executable "${${target}_executable}")
         STRING(REGEX REPLACE "\\\\" "\\\\\\\\" path "${path}")
         ADD_TEST(${target} ${VIGRA_RUN_TEST} ${${target}_executable} ${path})
     ELSE()


BUG: Add EXCLUDE_FROM_ALL to ThirdParty/MINC.

Since MINCIO is currently in EXCLUDE_FROM_ALL, this should also
be set.

Change-Id: Id80316b1323c719361cdb6a4a69fa55582d932ae

--- Modules/ThirdParty/MINC/itk-module.cmake
+++ Modules/ThirdParty/MINC/itk-module.cmake
@@ -10,4 +10,5 @@
     ITKJPEG
   DESCRIPTION
     "${DOCUMENTATION}"
+  EXCLUDE_FROM_ALL
 )


BUG: MUnit KIDS file has a typo in the name.

--- Scripts/runDashboardBuildWithMUnit.cmake
+++ Scripts/runDashboardBuildWithMUnit.cmake
@@ -7,7 +7,7 @@
 VISTA_ROUTINE_DIR:PATH=$ENV{VistARoutines}
 AUTOMATED_UNIT_TESTING:BOOL=ON
 INSTALL_MUNIT:BOOL=ON
-MUNIT_KIDS_FILE:FILEPATH="$ENV{HOME}/OSEHRA/Dashboards/M-Tools/XT_7-3_81.KID"
+MUNIT_KIDS_FILE:FILEPATH="$ENV{HOME}/OSEHRA/Dashboards/M-Tools/XT_7-3_81_TESTVER9.KID"
 MUNIT_PACKAGE_INSTALL_NAME:STRING=XT*7.3*81
 CLEAN_DATABASE:BOOL=ON
 USE_XINDEX_WARNINGS_AS_FAILURES:BOOL=ON


BUG: ICU is always compiled statically

BUG: ICU is always compiled statically

Change-Id: I10ab1f4a14cd08f99552882180c6f21298419b99

--- Modules/ThirdParty/DCMTK/itk-module-init.cmake
+++ Modules/ThirdParty/DCMTK/itk-module-init.cmake
@@ -84,17 +84,17 @@
             string(TOUPPER "${c}" C)
             set(debug_suffix)
             if("${C}" STREQUAL "DEBUG")
-              set(lib_path ${ITKDCMTK_PREREQS}/${c}/lib/${lib_prefix}icu${lib_name}d${lib_suffix})
+              set(lib_path ${ITKDCMTK_PREREQS}/${c}/lib/${lib_prefix}icu${lib_name}d${CMAKE_STATIC_LIBRARY_SUFFIX})
             else()  # For all non-debug, use release
-              set(lib_path ${ITKDCMTK_PREREQS}/Release/lib/${lib_prefix}icu${lib_name}${lib_suffix})
+              set(lib_path ${ITKDCMTK_PREREQS}/Release/lib/${lib_prefix}icu${lib_name}${CMAKE_STATIC_LIBRARY_SUFFIX})
             endif()
             set_property(TARGET ${lib} PROPERTY IMPORTED_LOCATION_${C} ${lib_path})
           endforeach()
         else()
-          set(lib_path ${ITKDCMTK_PREREQS}/lib/${lib_prefix}icu${lib_name}${lib_suffix})
+          set(lib_path ${ITKDCMTK_PREREQS}/lib/${lib_prefix}icu${lib_name}${CMAKE_STATIC_LIBRARY_SUFFIX})
           set_property(TARGET ${lib} PROPERTY IMPORTED_LOCATION ${lib_path})
         endif()
-    list(APPEND ICU_BYPRODUCTS "${lib_path}")
+        list(APPEND ICU_BYPRODUCTS "${lib_path}")
       endforeach()
     endif()
   endif()


Fix for daqDA-<det>.exe

Fix for daqDA-<det>.exe

--- cmake/CMakeDA.cmake
+++ cmake/CMakeDA.cmake
@@ -443,7 +443,7 @@

 add_custom_target(${DAEXE}
 COMMAND echo "***** Making executable ${DAEXE} *****"
-COMMAND g++ ${LDFLAGS} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${DALIB}.a ${EXTRAROOTLIB} ${ROOTSYS}/lib/libRoot.a ${ROOTSYS}/lib/libfreetype.a ${ROOTSYS}/lib/libpcre.a ${SYSLIBS} ${DAQDALIB} ${AMOREDALIBS} ${MONITORLIBS} -o ${DAEXE}
+COMMAND g++ ${LDFLAGS} ${DAOBJ} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${DALIB}.a ${EXTRAROOTLIB} ${ROOTSYS}/lib/libRoot.a ${ROOTSYS}/lib/libfreetype.a ${ROOTSYS}/lib/libpcre.a ${SYSLIBS} ${DAQDALIB} ${AMOREDALIBS} ${MONITORLIBS} -o ${DAEXE}
 WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
 )


- Looking for FAM in lib64 as well

- Looking for FAM in lib64 as well

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

--- cmake/FindFAM.cmake
+++ cmake/FindFAM.cmake
@@ -8,7 +8,9 @@
 FIND_PATH(FAM_INCLUDE_DIR fam.h PATHS /usr/include /usr/local/include )
 FIND_LIBRARY(FAM_LIBRARIES NAMES fam )

-FIND_LIBRARY(GAMIN_LIBRARIES NAMES gamin gamin-1 PATH /usr/lib /usr/local/lib)
+FIND_LIBRARY(GAMIN_LIBRARIES
+	NAMES gamin gamin-1
+	PATH /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64 )

 IF (NOT GAMIN_LIBRARIES AND FAM_LIBRARIES)
   message (STATUS "Please use Gamin instead of FAM if possible")


typo fix

typo fix

--- cmake/FindLua.cmake
+++ cmake/FindLua.cmake
@@ -17,6 +17,6 @@
 ENDIF(LUA_LIBRARY)

 INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua51 DEFAULT_MSG  LUA_LIBRARIES LUA_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua DEFAULT_MSG  LUA_LIBRARIES LUA_INCLUDE_DIR)
 MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)


cmake: headers: expose path for auto-generated CMmetrics headers

Signed-off-by: Eduardo Silva <81f705dc2ce1a61a2621e0e4b442a9474e1d0c70@calyptia.com>

--- cmake/headers.cmake
+++ cmake/headers.cmake
@@ -22,6 +22,7 @@
   ${FLB_PATH_ROOT_SOURCE}/${FLB_PATH_LIB_CARES}/include
   ${CMAKE_CURRENT_BINARY_DIR}/${FLB_PATH_LIB_CARES}
   ${CMAKE_CURRENT_BINARY_DIR}/${FLB_PATH_LIB_JANSSON}/include
+  ${CMAKE_CURRENT_BINARY_DIR}/lib/cmetrics
   ${CMAKE_CURRENT_BINARY_DIR}/include
   )


r10642/sofa : CUDA: compile CUDA host code with debug flag for a debug solution

Former-commit-id: d38f2da1768b50048d8b1cb71897513c574ffe23

--- cmake/options.cmake
+++ cmake/options.cmake
@@ -443,9 +443,11 @@
 # GPU architecture for which CUDA code will be compiled.
 sofa_option(SOFA-CUDA_SM STRING "20" "GPU architecture; it will translate to the following option for nvcc: -arch sm_<value>")

-set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -arch sm_${SOFA-CUDA_SM} -Xcompiler -O2 -DNDEBUG)
+set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -arch sm_${SOFA-CUDA_SM})
 if(NOT WIN32)
-	set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fPIC)
+    set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fPIC)
+else()
+    set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler)
 endif()

 # TODO   activate it automatically
@@ -461,6 +463,12 @@
     set(CUDA_HOST_COMPILER "gcc" CACHE STRING "Host side compiler used by NVCC" FORCE)
 endif()

+# in debug mode, enforce cuda to compile host code in debug (the same could be done for device code with -G)
+if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+    set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -g)
+else()
+    set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -O2 -DNDEBUG)
+endif()

 # plugins (auto-search)