Fixed arabica implicit header dependency to libxml

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -135,6 +135,15 @@
       list(APPEND third_party.${NAME} ${${LIB}})
     endif ()
   endforeach ()
+endmacro()
+
+macro(add_include_dependencies NAME)
+  get_include_directories(third_party.${NAME} INCLUDES)
+  foreach (LIB ${ARGN})
+    get_include_directories(${LIB} LIB_INCLUDES)
+    list(APPEND INCLUDES ${LIB_INCLUDES})
+  endforeach ()
+  set_include_directories(${NAME} ${INCLUDES})
 endmacro()

 function(add_external_project NAME)
@@ -511,6 +520,43 @@
 set(EIGEN_INCLUDE_PATH ${EIGEN_PREFIX}/include/eigen3)

+# Include directories.
+set_include_directories(
+    arabica ${ARABICA_PREFIX}/include ${ARABICA_PREFIX}/include/arabica)
+set_include_directories(boost ${BOOST_PREFIX}/include)
+set_include_directories(clang ${CLANG_PREFIX}/include)
+set_include_directories(curl-asio ${CURL_ASIO_PREFIX}/include)
+set_include_directories(dlib ${DLIB_PREFIX}/include)
+set_include_directories(eigen ${EIGEN_INCLUDE_PATH})
+set_include_directories(flex ${FLEX_PREFIX}/include)
+set_include_directories(g2log ${G2LOG_PREFIX}/include)
+set_include_directories(gflags ${GFLAGS_PREFIX}/include)
+set_include_directories(gmock ${GMOCK_PREFIX}/include)
+set_include_directories(gmp ${GMP_PREFIX}/include)
+set_include_directories(gtest ${GTEST_PREFIX}/include)
+set_include_directories(jsoncpp ${JSONCPP_PREFIX}/include)
+set_include_directories(libcurl ${LIBCURL_PREFIX}/include)
+set_include_directories(
+    libxml ${LIBXML_PREFIX}/include ${LIBXML_PREFIX}/include/libxml2)
+set_include_directories(marisa_trie ${MARISA_TRIE_PREFIX}/include)
+set_include_directories(mili ${MILI_PREFIX}/include)
+set_include_directories(mpc ${MPC_PREFIX}/include)
+set_include_directories(mpfr ${MPFR_PREFIX}/include)
+set_include_directories(mysql ${MYSQL_PREFIX}/include)
+set_include_directories(mysqlcppconn ${MYSQLCPPCONN_PREFIX}/include)
+set_include_directories(opencv ${OPENCV_PREFIX}/include)
+set_include_directories(openmp ${OPENMP_PREFIX}/include)
+set_include_directories(openssl ${OPENSSL_PREFIX}/include)
+set_include_directories(protobuf ${PROTOBUF_PREFIX}/include)
+set_include_directories(readline ${READLINE_PREFIX}/include)
+set_include_directories(shark ${SHARK_PREFIX}/include)
+set_include_directories(tbb ${TBB_PREFIX}/include)
+
+# Fixing implicit header dependencies. Again we must be careful to define a DAG.
+add_include_dependencies(arabica third_party.libxml)
+
+
+# 3rd-party executables.
 set(GNUGREP ${GNUGREP_PREFIX}/bin/grep)
 set(GNUTAR ${GNUTAR_PREFIX}/bin/tar)
 set(MVN ${MAVEN_PREFIX}/bin/mvn)
@@ -591,8 +637,6 @@
   DEPENDEES install
   DEPENDS ${SET_INSTALL_NAMES}
   WORKING_DIRECTORY ${ARABICA_PREFIX}/lib)
-set_include_directories(
-    arabica ${ARABICA_PREFIX}/include ${ARABICA_PREFIX}/include/arabica)
 add_dependencies(${ARABICA_TARGET} ${BOOST_TARGET})
 add_dependencies(${ARABICA_TARGET} ${LIBXML_TARGET})

@@ -697,7 +741,6 @@
   set(BOOST_PREFIX ${BOOST_ROOT})
   add_custom_target(${BOOST_TARGET})
 endif ()
-set_include_directories(boost ${BOOST_PREFIX}/include)

 ################################################################################
 # bsdiff.
@@ -766,7 +809,6 @@
   DEPENDEES install
   DEPENDS ${SET_INSTALL_NAMES}
   WORKING_DIRECTORY ${CLANG_PREFIX}/lib)
-set_include_directories(clang ${CLANG_PREFIX}/include)

 ################################################################################
 # Clang/OpenMP - OpenMP compatible clang compiler.
@@ -824,7 +866,6 @@
   DEPENDEES install
   DEPENDS ${SET_INSTALL_NAMES}
   WORKING_DIRECTORY ${CURL_ASIO_PREFIX}/lib)
-set_include_directories(curl-asio ${CURL_ASIO_PREFIX}/include)
 add_dependencies(${CURL_ASIO_TARGET} ${BOOST_TARGET})
 add_dependencies(${CURL_ASIO_TARGET} ${LIBCURL_TARGET})

@@ -859,7 +900,6 @@
       cd <SOURCE_DIR> &&
       find . -name "*.h" |
       cpio -dp <INSTALL_DIR>/include/dlib)
-set_include_directories(dlib ${DLIB_PREFIX}/include)

 ################################################################################
 # Eigen.
@@ -884,7 +924,6 @@
       -DGMP_LIBRARIES=${GMP_PREFIX}/lib
       -DMPFR_INCLUDES=${MPFR_PREFIX}/include
       -DMPFR_LIBRARIES=${MPFR_PREFIX}/lib)
-set_include_directories(eigen ${EIGEN_INCLUDE_PATH})
 add_dependencies(${EIGEN_TARGET} ${GMP_TARGET})
 add_dependencies(${EIGEN_TARGET} ${MPFR_TARGET})

@@ -903,7 +942,6 @@
           ${FLEX_PREFIX}/download/flex-2.5.37.tar.bz2
   CONFIGURE_COMMAND ./configure --prefix=${FLEX_PREFIX} ${HOST}
   BUILD_IN_SOURCE 1)
-set_include_directories(flex ${FLEX_PREFIX}/include)
 set(FLEX_EXECUTABLE ${FLEX_PREFIX}/bin/flex++)

 ################################################################################
@@ -954,7 +992,6 @@
       cd <SOURCE_DIR>/src &&
       find . -name "*.h" |
       cpio -dp <INSTALL_DIR>/include/g2log)
-set_include_directories(g2log ${G2LOG_PREFIX}/include)

 ################################################################################
 # GNU GCC compiler.
@@ -1002,7 +1039,6 @@
           CXXFLAGS=${CMAKE_CXX_FLAGS_WITH_ARCHS}
           LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}
           ${CONFIGURE_LIB_TYPE})
-set_include_directories(gflags ${GFLAGS_PREFIX}/include)

 ################################################################################
 # gmock.
@@ -1028,7 +1064,6 @@
       find . -name "*${CMAKE_STATIC_LIBRARY_SUFFIX}" | cpio -dp <INSTALL_DIR>/lib &&
       cd <SOURCE_DIR>/include &&
       find . -name "*.h" | cpio -dp <INSTALL_DIR>/include)
-set_include_directories(gmock ${GMOCK_PREFIX}/include)

 ################################################################################
 # GMP.
@@ -1055,7 +1090,6 @@
           ${GMP_PREFIX}/download/gmp-5.1.3.tar.bz2
   CONFIGURE_COMMAND ${CONFIGURE_COMMAND}
   BUILD_IN_SOURCE 1)
-set_include_directories(gmp ${GMP_PREFIX}/include)
 add_dependencies(${GMP_TARGET} ${GNUTAR_TARGET})

 ################################################################################
@@ -1141,7 +1175,6 @@
     find . -name "*${CMAKE_STATIC_LIBRARY_SUFFIX}" | cpio -dp <INSTALL_DIR>/lib &&
     cd <SOURCE_DIR>/include &&
     find . -name "*.h" | cpio -dp <INSTALL_DIR>/include)
-set_include_directories(gtest ${GTEST_PREFIX}/include)

 ################################################################################
 # HAProxy. TODO(qfiard): Make portable.
@@ -1254,7 +1287,6 @@
       -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
       -DCMAKE_OSX_ARCHITECTURES=${ARCHS}
       -DCMAKE_INSTALL_PREFIX=${JSONCPP_PREFIX})
-set_include_directories(jsoncpp ${JSONCPP_PREFIX}/include)

 ################################################################################
 # LDAP.
@@ -1328,7 +1360,6 @@
       CXXFLAGS=${CMAKE_CXX_FLAGS_WITH_ARCHS}
       LDFLAGS=${LIBCURL_LINKER_FLAGS}
       ${CONFIGURE_LIB_TYPE})
-set_include_directories(libcurl ${LIBCURL_PREFIX}/include)
 add_dependencies(${LIBCURL_TARGET} ${OPENSSL_TARGET})
 add_dependencies(${LIBCURL_TARGET} ${ZLIB_TARGET})

@@ -1499,8 +1530,6 @@
           LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}
           ${WITH_PYTHON}
           ${CONFIGURE_LIB_TYPE})
-set_include_directories(
-    libxml ${LIBXML_PREFIX}/include ${LIBXML_PREFIX}/include/libxml2)
 add_dependencies(${LIBXML_TARGET} ${XZ_TARGET})
 add_dependencies(${LIBXML_TARGET} ${ZLIB_TARGET})

@@ -1524,7 +1553,6 @@
           CXXFLAGS=${CMAKE_CXX_FLAGS_WITH_ARCHS}
           LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}
           ${CONFIGURE_LIB_TYPE})
-set_include_directories(marisa_trie ${MARISA_TRIE_PREFIX}/include)

 ################################################################################
 # Maven.
@@ -1610,7 +1638,6 @@
   BUILD_COMMAND echo ""
   INSTALL_COMMAND find mili | cpio -dp <INSTALL_DIR>/include
   BUILD_IN_SOURCE 1)
-set_include_directories(mili ${MILI_PREFIX}/include)

 ################################################################################
 # MPC.
@@ -1634,7 +1661,6 @@
           CXXFLAGS=${CMAKE_CXX_FLAGS_WITH_ARCHS}
           LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}
           ${CONFIGURE_LIB_TYPE})
-set_include_directories(mpc ${MPC_PREFIX}/include)
 add_dependencies(${MPC_TARGET} ${GMP_TARGET})
 add_dependencies(${MPC_TARGET} ${MPFR_TARGET})

@@ -1659,7 +1685,6 @@
           CXXFLAGS=${CMAKE_CXX_FLAGS_WITH_ARCHS}
           LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}
           ${CONFIGURE_LIB_TYPE})
-set_include_directories(mpfr ${MPFR_PREFIX}/include)
 add_dependencies(${MPFR_TARGET} ${GMP_TARGET})

 ################################################################################
@@ -1691,7 +1716,6 @@
       -DWITH_ZLIB=test
       -DZLIB_ROOT=${ZLIB_PREFIX}
       -DWITH_SSL_PATH=${OPENSSL_PREFIX})
-set_include_directories(mysql ${MYSQL_PREFIX}/include)
 add_dependencies(${MYSQL_TARGET} ${OPENSSL_TARGET})
 add_dependencies(${MYSQL_TARGET} ${ZLIB_TARGET})

@@ -1728,8 +1752,7 @@
     DEPENDEES install
     DEPENDS ${SET_INSTALL_NAMES}
     WORKING_DIRECTORY ${MYSQLCPPCONN_PREFIX}/lib)
-  set_include_directories(mysqlcppconn ${MYSQLCPPCONN_PREFIX}/include)
-endif ()
+  endif ()

 ################################################################################
 # Nginx.
@@ -1831,7 +1854,6 @@
   DEPENDEES install
   DEPENDS ${SET_INSTALL_NAMES}
   WORKING_DIRECTORY ${OPENCV_PREFIX}/lib)
-set_include_directories(opencv ${OPENCV_PREFIX}/include)
 add_dependencies(${OPENCV_TARGET} ${EIGEN_TARGET})
 # add_dependencies(${OPENCV_TARGET} ${GCC_TARGET})
 add_dependencies(${OPENCV_TARGET} ${TBB_PREFIX})
@@ -1866,7 +1888,6 @@
   DEPENDEES install
   DEPENDS ${SET_INSTALL_NAMES}
   WORKING_DIRECTORY ${OPENMP_PREFIX}/lib)
-set_include_directories(openmp ${OPENMP_PREFIX}/include)
 set(OPENMP_COMPILE_FLAG "-fopenmp")
 add_dependencies(${OPENMP_TARGET} ${GCC_TARGET})
 # add_dependencies(${OPENMP_TARGET} ${CLANG_OMP_TARGET})
@@ -1971,7 +1992,6 @@
     CONFIGURE_COMMAND ${CONFIGURE_COMMAND}
     BUILD_IN_SOURCE 1)
 endif ()
-set_include_directories(openssl ${OPENSSL_PREFIX}/include)
 add_dependencies(${OPENSSL_TARGET} ${GMP_TARGET})

 ################################################################################
@@ -2111,7 +2131,6 @@
     WORKING_DIRECTORY <SOURCE_DIR>/python)
   add_dependencies(${PROTOBUF_TARGET} ${VIRTUALENV_TARGET})
 endif ()
-set_include_directories(protobuf ${PROTOBUF_PREFIX}/include)

 ################################################################################
 # protoc - Google's Protocol Buffers compiler.
@@ -2149,7 +2168,6 @@
       CXXFLAGS=${CMAKE_CXX_FLAGS_WITH_ARCHS}
       LDFLAGS=${LDFLAGS_WITH_ARCHS}
       ${CONFIGURE_LIB_TYPE})
-set_include_directories(readline ${READLINE_PREFIX}/include)

 ################################################################################
 # Shark.
@@ -2184,7 +2202,6 @@
   DEPENDS ${SET_INSTALL_NAMES}
   WORKING_DIRECTORY ${SHARK_PREFIX}/lib
 )
-set_include_directories(shark ${SHARK_PREFIX}/include)
 add_definitions(-DSHARK_USE_OPENMP)

 # Adds dependencies.
@@ -2228,7 +2245,6 @@
   DEPENDEES install_libs
   DEPENDS ${SET_INSTALL_NAMES}
   WORKING_DIRECTORY ${TBB_PREFIX}/lib)
-set_include_directories(tbb ${TBB_PREFIX}/include)

 ################################################################################
 # virtualenv.


Convert Cmake list to command string

Convert Cmake list to command string


Added compiler flag to ignore missing initializers for CUDA Thrust.

--- cmake/oskar_compiler_options.cmake
+++ cmake/oskar_compiler_options.cmake
@@ -81,6 +81,8 @@
         #list(APPEND CUDA_NVCC_FLAGS --compiler-options;-pedantic;)
         list(APPEND CUDA_NVCC_FLAGS --compiler-options;-Wno-variadic-macros;)
         list(APPEND CUDA_NVCC_FLAGS --compiler-options;-Wno-long-long;)
+        # Disable warning about missing initializers (for CUDA Thrust).
+        list(APPEND CUDA_NVCC_FLAGS --compiler-options;-Wno-missing-field-initializers;)
     endif ()

     # Build mode specific flags.


Fix typos on cmake application configuration function

--- cmake/radium_setup_functions.cmake
+++ cmake/radium_setup_functions.cmake
@@ -75,16 +75,15 @@
     )
     # TODO, this Windows only bundle fix might be adapted to Linux also ... perhaps with the same code ?
     if (MSVC OR MSVC_IDE OR MINGW)
-        # Construciton of the  dependency paths
+        # Construction of the  dependency paths
         set(FIX_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}")
         # Add the Qt bin dir ...
         list(APPEND FIX_LIBRARY_DIR "${QtDlls_location}")
         # Fix the bundled directory
-        install(CODE "
-                        message(STATUS \"Fixing application with Qt base direcory at ${FIX_LIBRARY_DIR} !!\")
-            include(BundleUtilities)
-                        fixup_bundle( ${CMAKE_INSTALL_PREFIX}/bin/${ARGS_NAME}.exe \"\" \"${FIX_LIBRARY_DIR}\")
-            "
+        install(CODE " message(STATUS \"Fixing application with Qt base direcory at ${FIX_LIBRARY_DIR} !!\")
+                       include(BundleUtilities)
+                       fixup_bundle( ${CMAKE_INSTALL_PREFIX}/bin/${ARGS_NAME}.exe \"\" \"${FIX_LIBRARY_DIR}\")
+                     "
             )
         if (CMAKE_BUILD_TYPE STREQUAL "Debug")
             install(FILES $<TARGET_PDB_FILE:${ARGS_NAME}> DESTINATION bin)


BUG fixed if conditional == 1 should be EQUAL 1.

--- DashboardScripts/tubetk_run_continuous.cmake
+++ DashboardScripts/tubetk_run_continuous.cmake
@@ -16,7 +16,7 @@
     ctest_run_script(
       "${SITE_SCRIPT_DIR}/tubetk_build_test.cmake" )

-    if( $ENV{TUBETK_CONTINUOUS_UPDATE} == 1 )
+    if( $ENV{TUBETK_CONTINUOUS_UPDATE} EQUAL 1 )

       if( SITE_CONTINUOUS_STYLE )
         ctest_run_script(
@@ -33,7 +33,7 @@
           "${SCRIPT_DIR}/tubetk_memory.cmake" )
       endif( SITE_CONTINUOUS_MEMORY )

-    endif( $ENV{TUBETK_CONTINUOUS_UPDATE} == 1 )
+    endif( $ENV{TUBETK_CONTINUOUS_UPDATE} EQUAL 1 )

   endif( SITE_CONTINUOUS_BUILD_TEST )


Move _chsize_s and _Unwind_Backtrace to the correct position.

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -295,23 +295,26 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H}

+/* Define to 1 if the system has the type `u_int64_t'. */
+#cmakedefine HAVE_U_INT64_T ${HAVE_U_INT64_T}
+
+/* Define to 1 if you have the <valgrind/valgrind.h> header file. */
+#cmakedefine HAVE_VALGRIND_VALGRIND_H ${HAVE_VALGRIND_VALGRIND_H}
+
+/* Define to 1 if you have the `writev' function. */
+#cmakedefine HAVE_WRITEV ${HAVE_WRITEV}
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#cmakedefine HAVE_ZLIB_H ${HAVE_ZLIB_H}
+
+/* Have host's _alloca */
+#cmakedefine HAVE__ALLOCA ${HAVE__ALLOCA}
+
+/* Define to 1 if you have the `_chsize_s' function. */
+#cmakedefine HAVE__CHSIZE_S ${HAVE__CHSIZE_S}
+
 /* Define to 1 if you have the `_Unwind_Backtrace' function. */
 #cmakedefine HAVE__UNWIND_BACKTRACE ${HAVE__UNWIND_BACKTRACE}
-
-/* Define to 1 if the system has the type `u_int64_t'. */
-#cmakedefine HAVE_U_INT64_T ${HAVE_U_INT64_T}
-
-/* Define to 1 if you have the <valgrind/valgrind.h> header file. */
-#cmakedefine HAVE_VALGRIND_VALGRIND_H ${HAVE_VALGRIND_VALGRIND_H}
-
-/* Define to 1 if you have the `writev' function. */
-#cmakedefine HAVE_WRITEV ${HAVE_WRITEV}
-
-/* Define to 1 if you have the <zlib.h> header file. */
-#cmakedefine HAVE_ZLIB_H ${HAVE_ZLIB_H}
-
-/* Have host's _alloca */
-#cmakedefine HAVE__ALLOCA ${HAVE__ALLOCA}

 /* Have host's __alloca */
 #cmakedefine HAVE___ALLOCA ${HAVE___ALLOCA}
@@ -537,7 +540,4 @@
 /* Define to a function implementing strdup */
 #cmakedefine strdup ${strdup}

-/* Define to 1 if you have the `_chsize_s' function. */
-#cmakedefine HAVE__CHSIZE_S ${HAVE__CHSIZE_S}
-
 #endif


Dos2Unix Line endings

Dos2Unix Line endings

--- indra/cmake/Copy3rdPartyLibs.cmake
+++ indra/cmake/Copy3rdPartyLibs.cmake
@@ -1,377 +1,377 @@
-# -*- cmake -*-
-
-# The copy_win_libs folder contains file lists and a script used to
-# copy dlls, exes and such needed to run the SecondLife from within
-# VisualStudio.
-
-include(CMakeCopyIfDifferent)
-include(Linking)
-
-###################################################################
-# set up platform specific lists of files that need to be copied
-###################################################################
-if(WINDOWS)
-    set(SHARED_LIB_STAGING_DIR_DEBUG            "${SHARED_LIB_STAGING_DIR}/Debug")
-    set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO   "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo")
-    set(SHARED_LIB_STAGING_DIR_RELEASE          "${SHARED_LIB_STAGING_DIR}/Release")
-
-    #*******************************
-    # VIVOX - *NOTE: no debug version
-    set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
-    set(vivox_files
-        SLVoice.exe
-        libsndfile-1.dll
-        vivoxplatform.dll
-        vivoxsdk.dll
-        ortp.dll
-        zlib1.dll
-        vivoxoal.dll
-        )
-
-    #*******************************
-    # Misc shared libs
-
-    set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
-    set(debug_files
-        openjpegd.dll
-        libapr-1.dll
-        libaprutil-1.dll
-        libapriconv-1.dll
-        ssleay32.dll
-        libeay32.dll
-        libcollada14dom22-d.dll
-        glod.dll
-        libhunspell.dll
-        )
-
-    set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
-    set(release_files
-        openjpeg.dll
-        libapr-1.dll
-        libaprutil-1.dll
-        libapriconv-1.dll
-        ssleay32.dll
-        libeay32.dll
-        libcollada14dom22.dll
-        glod.dll
-        libhunspell.dll
-        )
-
-    if(USE_TCMALLOC)
-      set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll)
-      set(release_files ${release_files} libtcmalloc_minimal.dll)
-    endif(USE_TCMALLOC)
-
-    if (FMODEX)
-      set(debug_files ${debug_files} fmodexL.dll)
-      set(release_files ${release_files} fmodex.dll)
-    endif (FMODEX)
-
-#*******************************
-# Copy MS C runtime dlls, required for packaging.
-# *TODO - Adapt this to support VC9
-if (MSVC80)
-    FIND_PATH(debug_msvc8_redist_path msvcr80d.dll
-        PATHS
-        ${MSVC_DEBUG_REDIST_PATH}
-         [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT
-        NO_DEFAULT_PATH
-        NO_DEFAULT_PATH
-        )
-
-    if(EXISTS ${debug_msvc8_redist_path})
-        set(debug_msvc8_files
-            msvcr80d.dll
-            msvcp80d.dll
-            Microsoft.VC80.DebugCRT.manifest
-            )
-
-        copy_if_different(
-            ${debug_msvc8_redist_path}
-            "${SHARED_LIB_STAGING_DIR_DEBUG}"
-            out_targets
-            ${debug_msvc8_files}
-            )
-        set(third_party_targets ${third_party_targets} ${out_targets})
-
-    endif (EXISTS ${debug_msvc8_redist_path})
-
-    FIND_PATH(release_msvc8_redist_path msvcr80.dll
-        PATHS
-        ${MSVC_REDIST_PATH}
-         [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT
-        NO_DEFAULT_PATH
-        NO_DEFAULT_PATH
-        )
-
-    if(EXISTS ${release_msvc8_redist_path})
-        set(release_msvc8_files
-            msvcr80.dll
-            msvcp80.dll
-            Microsoft.VC80.CRT.manifest
-            )
-
-        copy_if_different(
-            ${release_msvc8_redist_path}
-            "${SHARED_LIB_STAGING_DIR_RELEASE}"
-            out_targets
-            ${release_msvc8_files}
-            )
-        set(third_party_targets ${third_party_targets} ${out_targets})
-
-        copy_if_different(
-            ${release_msvc8_redist_path}
-            "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
-            out_targets
-            ${release_msvc8_files}
-            )
-        set(third_party_targets ${third_party_targets} ${out_targets})
-
-    endif (EXISTS ${release_msvc8_redist_path})
-elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010
-    FIND_PATH(debug_msvc10_redist_path msvcr100d.dll
-        PATHS
-        ${MSVC_DEBUG_REDIST_PATH}
-         [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC100.DebugCRT
-        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64
-        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32
-        NO_DEFAULT_PATH
-        )
-
-    if(EXISTS ${debug_msvc10_redist_path})
-        set(debug_msvc10_files
-            msvcr100d.dll
-            msvcp100d.dll
-            )
-
-        copy_if_different(
-            ${debug_msvc10_redist_path}
-            "${SHARED_LIB_STAGING_DIR_DEBUG}"
-            out_targets
-            ${debug_msvc10_files}
-            )
-        set(third_party_targets ${third_party_targets} ${out_targets})
-
-    endif ()
-
-    FIND_PATH(release_msvc10_redist_path msvcr100.dll
-        PATHS
-        ${MSVC_REDIST_PATH}
-         [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC100.CRT
-        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64
-        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32
-        NO_DEFAULT_PATH
-        )
-
-    if(EXISTS ${release_msvc10_redist_path})
-        set(release_msvc10_files
-            msvcr100.dll
-            msvcp100.dll
-            )
-
-        copy_if_different(
-            ${release_msvc10_redist_path}
-            "${SHARED_LIB_STAGING_DIR_RELEASE}"
-            out_targets
-            ${release_msvc10_files}
-            )
-        set(third_party_targets ${third_party_targets} ${out_targets})
-
-        copy_if_different(
-            ${release_msvc10_redist_path}
-            "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
-            out_targets
-            ${release_msvc10_files}
-            )
-        set(third_party_targets ${third_party_targets} ${out_targets})
-
-    endif ()
-endif (MSVC80)
-
-elseif(DARWIN)
-    set(SHARED_LIB_STAGING_DIR_DEBUG            "${SHARED_LIB_STAGING_DIR}/Debug/Resources")
-    set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO   "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Resources")
-    set(SHARED_LIB_STAGING_DIR_RELEASE          "${SHARED_LIB_STAGING_DIR}/Release/Resources")
-
-    set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
-    set(vivox_files
-        SLVoice
-        libsndfile.dylib
-        libvivoxoal.dylib
-        libortp.dylib
-        libvivoxplatform.dylib
-        libvivoxsdk.dylib
-       )
-    set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
-    set(debug_files
-       )
-    set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
-    set(release_files
-        libapr-1.0.dylib
-        libapr-1.dylib
-        libaprutil-1.0.dylib
-        libaprutil-1.dylib
-        libexpat.1.5.2.dylib
-        libexpat.dylib
-        libGLOD.dylib
-        libllqtwebkit.dylib
-        libminizip.a
-        libndofdev.dylib
-        libhunspell-1.3.0.dylib
-        libexception_handler.dylib
-        libcollada14dom.dylib
-       )
-
-    if (FMODEX)
-      #set(debug_files ${debug_files} libfmodexL.dylib)
-      set(release_files ${release_files} libfmodex.dylib)
-    endif (FMODEX)
-
-elseif(LINUX)
-    # linux is weird, multiple side by side configurations aren't supported
-    # and we don't seem to have any debug shared libs built yet anyways...
-    set(SHARED_LIB_STAGING_DIR_DEBUG            "${SHARED_LIB_STAGING_DIR}")
-    set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO   "${SHARED_LIB_STAGING_DIR}")
-    set(SHARED_LIB_STAGING_DIR_RELEASE          "${SHARED_LIB_STAGING_DIR}")
-
-    set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
-    set(vivox_files
-        libsndfile.so.1
-        libortp.so
-        libvivoxoal.so.1
-        libvivoxplatform.so
-        libvivoxsdk.so
-        SLVoice
-       )
-    # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
-    # or ARCH_PREBUILT_DIRS
-    set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
-    set(debug_files
-       )
-    # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
-    # or ARCH_PREBUILT_DIRS
-    set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
-    # *FIX - figure out what to do with duplicate libalut.so here -brad
-    set(release_files
-        libapr-1.so.0
-        libaprutil-1.so.0
-        libatk-1.0.so
-        libboost_program_options-mt.so.${BOOST_VERSION}.0
-        libboost_regex-mt.so.${BOOST_VERSION}.0
-        libboost_thread-mt.so.${BOOST_VERSION}.0
-        libboost_filesystem-mt.so.${BOOST_VERSION}.0
-        libboost_signals-mt.so.${BOOST_VERSION}.0
-        libboost_system-mt.so.${BOOST_VERSION}.0
-        libbreakpad_client.so.0
-        libcollada14dom.so
-        libcrypto.so.1.0.0
-        libdb-5.1.so
-        libexpat.so
-        libexpat.so.1
-        libglod.so
-        libgmock_main.so
-        libgmock.so.0
-        libgmodule-2.0.so
-        libgobject-2.0.so
-        libgtest_main.so
-        libgtest.so.0
-        libhunspell-1.3.so.0.0.0
-        libminizip.so
-        libopenal.so
-        libopenjpeg.so
-        libssl.so
-        libuuid.so.16
-        libuuid.so.16.0.22
-        libssl.so.1.0.0
-        libfontconfig.so.1.4.4
-       )
-
-    if (USE_TCMALLOC)
-      set(release_files ${release_files} "libtcmalloc_minimal.so")
-    endif (USE_TCMALLOC)
-
-    if (FMODEX)
-      set(release_file ${release_files} "libfmodex-4.44.so")
-    endif (FMODEX)
-
-else(WINDOWS)
-    message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
-    set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")
-    set(vivox_files "")
-    # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
-    # or ARCH_PREBUILT_DIRS
-    set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug")
-    set(debug_files "")
-    # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
-    # or ARCH_PREBUILT_DIRS
-    set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release")
-    set(release_files "")
-
-    set(debug_llkdu_src "")
-    set(debug_llkdu_dst "")
-    set(release_llkdu_src "")
-    set(release_llkdu_dst "")
-    set(relwithdebinfo_llkdu_dst "")
-endif(WINDOWS)
-
-
-################################################################
-# Done building the file lists, now set up the copy commands.
-################################################################
-
-copy_if_different(
-    ${vivox_src_dir}
-    "${SHARED_LIB_STAGING_DIR_DEBUG}"
-    out_targets
-    ${vivox_files}
-    )
-set(third_party_targets ${third_party_targets} ${out_targets})
-
-copy_if_different(
-    ${vivox_src_dir}
-    "${SHARED_LIB_STAGING_DIR_RELEASE}"
-    out_targets
-    ${vivox_files}
-    )
-set(third_party_targets ${third_party_targets} ${out_targets})
-
-copy_if_different(
-    ${vivox_src_dir}
-    "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
-    out_targets
-    ${vivox_files}
-    )
-set(third_party_targets ${third_party_targets} ${out_targets})
-
-
-
-copy_if_different(
-    ${debug_src_dir}
-    "${SHARED_LIB_STAGING_DIR_DEBUG}"
-    out_targets
-    ${debug_files}
-    )
-set(third_party_targets ${third_party_targets} ${out_targets})
-
-copy_if_different(
-    ${release_src_dir}
-    "${SHARED_LIB_STAGING_DIR_RELEASE}"
-    out_targets
-    ${release_files}
-    )
-set(third_party_targets ${third_party_targets} ${out_targets})
-
-copy_if_different(
-    ${release_src_dir}
-    "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
-    out_targets
-    ${release_files}
-    )
-set(third_party_targets ${third_party_targets} ${out_targets})
-
-if(NOT STANDALONE)
-  add_custom_target(
-      stage_third_party_libs ALL
-      DEPENDS ${third_party_targets}
-      )
-endif(NOT STANDALONE)
+# -*- cmake -*-
+
+# The copy_win_libs folder contains file lists and a script used to
+# copy dlls, exes and such needed to run the SecondLife from within
+# VisualStudio.
+
+include(CMakeCopyIfDifferent)
+include(Linking)
+
+###################################################################
+# set up platform specific lists of files that need to be copied
+###################################################################
+if(WINDOWS)
+    set(SHARED_LIB_STAGING_DIR_DEBUG            "${SHARED_LIB_STAGING_DIR}/Debug")
+    set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO   "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo")
+    set(SHARED_LIB_STAGING_DIR_RELEASE          "${SHARED_LIB_STAGING_DIR}/Release")
+
+    #*******************************
+    # VIVOX - *NOTE: no debug version
+    set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
+    set(vivox_files
+        SLVoice.exe
+        libsndfile-1.dll
+        vivoxplatform.dll
+        vivoxsdk.dll
+        ortp.dll
+        zlib1.dll
+        vivoxoal.dll
+        )
+
+    #*******************************
+    # Misc shared libs
+
+    set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
+    set(debug_files
+        openjpegd.dll
+        libapr-1.dll
+        libaprutil-1.dll
+        libapriconv-1.dll
+        ssleay32.dll
+        libeay32.dll
+        libcollada14dom22-d.dll
+        glod.dll
+        libhunspell.dll
+        )
+
+    set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
+    set(release_files
+        openjpeg.dll
+        libapr-1.dll
+        libaprutil-1.dll
+        libapriconv-1.dll
+        ssleay32.dll
+        libeay32.dll
+        libcollada14dom22.dll
+        glod.dll
+        libhunspell.dll
+        )
+
+    if(USE_TCMALLOC)
+      set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll)
+      set(release_files ${release_files} libtcmalloc_minimal.dll)
+    endif(USE_TCMALLOC)
+
+    if (FMODEX)
+      set(debug_files ${debug_files} fmodexL.dll)
+      set(release_files ${release_files} fmodex.dll)
+    endif (FMODEX)
+
+#*******************************
+# Copy MS C runtime dlls, required for packaging.
+# *TODO - Adapt this to support VC9
+if (MSVC80)
+    FIND_PATH(debug_msvc8_redist_path msvcr80d.dll
+        PATHS
+        ${MSVC_DEBUG_REDIST_PATH}
+         [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT
+        NO_DEFAULT_PATH
+        NO_DEFAULT_PATH
+        )
+
+    if(EXISTS ${debug_msvc8_redist_path})
+        set(debug_msvc8_files
+            msvcr80d.dll
+            msvcp80d.dll
+            Microsoft.VC80.DebugCRT.manifest
+            )
+
+        copy_if_different(
+            ${debug_msvc8_redist_path}
+            "${SHARED_LIB_STAGING_DIR_DEBUG}"
+            out_targets
+            ${debug_msvc8_files}
+            )
+        set(third_party_targets ${third_party_targets} ${out_targets})
+
+    endif (EXISTS ${debug_msvc8_redist_path})
+
+    FIND_PATH(release_msvc8_redist_path msvcr80.dll
+        PATHS
+        ${MSVC_REDIST_PATH}
+         [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT
+        NO_DEFAULT_PATH
+        NO_DEFAULT_PATH
+        )
+
+    if(EXISTS ${release_msvc8_redist_path})
+        set(release_msvc8_files
+            msvcr80.dll
+            msvcp80.dll
+            Microsoft.VC80.CRT.manifest
+            )
+
+        copy_if_different(
+            ${release_msvc8_redist_path}
+            "${SHARED_LIB_STAGING_DIR_RELEASE}"
+            out_targets
+            ${release_msvc8_files}
+            )
+        set(third_party_targets ${third_party_targets} ${out_targets})
+
+        copy_if_different(
+            ${release_msvc8_redist_path}
+            "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
+            out_targets
+            ${release_msvc8_files}
+            )
+        set(third_party_targets ${third_party_targets} ${out_targets})
+
+    endif (EXISTS ${release_msvc8_redist_path})
+elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010
+    FIND_PATH(debug_msvc10_redist_path msvcr100d.dll
+        PATHS
+        ${MSVC_DEBUG_REDIST_PATH}
+         [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC100.DebugCRT
+        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64
+        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32
+        NO_DEFAULT_PATH
+        )
+
+    if(EXISTS ${debug_msvc10_redist_path})
+        set(debug_msvc10_files
+            msvcr100d.dll
+            msvcp100d.dll
+            )
+
+        copy_if_different(
+            ${debug_msvc10_redist_path}
+            "${SHARED_LIB_STAGING_DIR_DEBUG}"
+            out_targets
+            ${debug_msvc10_files}
+            )
+        set(third_party_targets ${third_party_targets} ${out_targets})
+
+    endif ()
+
+    FIND_PATH(release_msvc10_redist_path msvcr100.dll
+        PATHS
+        ${MSVC_REDIST_PATH}
+         [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC100.CRT
+        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64
+        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32
+        NO_DEFAULT_PATH
+        )
+
+    if(EXISTS ${release_msvc10_redist_path})
+        set(release_msvc10_files
+            msvcr100.dll
+            msvcp100.dll
+            )
+
+        copy_if_different(
+            ${release_msvc10_redist_path}
+            "${SHARED_LIB_STAGING_DIR_RELEASE}"
+            out_targets
+            ${release_msvc10_files}
+            )
+        set(third_party_targets ${third_party_targets} ${out_targets})
+
+        copy_if_different(
+            ${release_msvc10_redist_path}
+            "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
+            out_targets
+            ${release_msvc10_files}
+            )
+        set(third_party_targets ${third_party_targets} ${out_targets})
+
+    endif ()
+endif (MSVC80)
+
+elseif(DARWIN)
+    set(SHARED_LIB_STAGING_DIR_DEBUG            "${SHARED_LIB_STAGING_DIR}/Debug/Resources")
+    set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO   "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Resources")
+    set(SHARED_LIB_STAGING_DIR_RELEASE          "${SHARED_LIB_STAGING_DIR}/Release/Resources")
+
+    set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
+    set(vivox_files
+        SLVoice
+        libsndfile.dylib
+        libvivoxoal.dylib
+        libortp.dylib
+        libvivoxplatform.dylib
+        libvivoxsdk.dylib
+       )
+    set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
+    set(debug_files
+       )
+    set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
+    set(release_files
+        libapr-1.0.dylib
+        libapr-1.dylib
+        libaprutil-1.0.dylib
+        libaprutil-1.dylib
+        libexpat.1.5.2.dylib
+        libexpat.dylib
+        libGLOD.dylib
+        libllqtwebkit.dylib
+        libminizip.a
+        libndofdev.dylib
+        libhunspell-1.3.0.dylib
+        libexception_handler.dylib
+        libcollada14dom.dylib
+       )
+
+    if (FMODEX)
+      #set(debug_files ${debug_files} libfmodexL.dylib)
+      set(release_files ${release_files} libfmodex.dylib)
+    endif (FMODEX)
+
+elseif(LINUX)
+    # linux is weird, multiple side by side configurations aren't supported
+    # and we don't seem to have any debug shared libs built yet anyways...
+    set(SHARED_LIB_STAGING_DIR_DEBUG            "${SHARED_LIB_STAGING_DIR}")
+    set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO   "${SHARED_LIB_STAGING_DIR}")
+    set(SHARED_LIB_STAGING_DIR_RELEASE          "${SHARED_LIB_STAGING_DIR}")
+
+    set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
+    set(vivox_files
+        libsndfile.so.1
+        libortp.so
+        libvivoxoal.so.1
+        libvivoxplatform.so
+        libvivoxsdk.so
+        SLVoice
+       )
+    # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+    # or ARCH_PREBUILT_DIRS
+    set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
+    set(debug_files
+       )
+    # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+    # or ARCH_PREBUILT_DIRS
+    set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
+    # *FIX - figure out what to do with duplicate libalut.so here -brad
+    set(release_files
+        libapr-1.so.0
+        libaprutil-1.so.0
+        libatk-1.0.so
+        libboost_program_options-mt.so.${BOOST_VERSION}.0
+        libboost_regex-mt.so.${BOOST_VERSION}.0
+        libboost_thread-mt.so.${BOOST_VERSION}.0
+        libboost_filesystem-mt.so.${BOOST_VERSION}.0
+        libboost_signals-mt.so.${BOOST_VERSION}.0
+        libboost_system-mt.so.${BOOST_VERSION}.0
+        libbreakpad_client.so.0
+        libcollada14dom.so
+        libcrypto.so.1.0.0
+        libdb-5.1.so
+        libexpat.so
+        libexpat.so.1
+        libglod.so
+        libgmock_main.so
+        libgmock.so.0
+        libgmodule-2.0.so
+        libgobject-2.0.so
+        libgtest_main.so
+        libgtest.so.0
+        libhunspell-1.3.so.0.0.0
+        libminizip.so
+        libopenal.so
+        libopenjpeg.so
+        libssl.so
+        libuuid.so.16
+        libuuid.so.16.0.22
+        libssl.so.1.0.0
+        libfontconfig.so.1.4.4
+       )
+
+    if (USE_TCMALLOC)
+      set(release_files ${release_files} "libtcmalloc_minimal.so")
+    endif (USE_TCMALLOC)
+
+    if (FMODEX)
+      set(release_file ${release_files} "libfmodex-4.44.so")
+    endif (FMODEX)
+
+else(WINDOWS)
+    message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
+    set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")
+    set(vivox_files "")
+    # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+    # or ARCH_PREBUILT_DIRS
+    set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug")
+    set(debug_files "")
+    # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+    # or ARCH_PREBUILT_DIRS
+    set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release")
+    set(release_files "")
+
+    set(debug_llkdu_src "")
+    set(debug_llkdu_dst "")
+    set(release_llkdu_src "")
+    set(release_llkdu_dst "")
+    set(relwithdebinfo_llkdu_dst "")
+endif(WINDOWS)
+
+
+################################################################
+# Done building the file lists, now set up the copy commands.
+################################################################
+
+copy_if_different(
+    ${vivox_src_dir}
+    "${SHARED_LIB_STAGING_DIR_DEBUG}"
+    out_targets
+    ${vivox_files}
+    )
+set(third_party_targets ${third_party_targets} ${out_targets})
+
+copy_if_different(
+    ${vivox_src_dir}
+    "${SHARED_LIB_STAGING_DIR_RELEASE}"
+    out_targets
+    ${vivox_files}
+    )
+set(third_party_targets ${third_party_targets} ${out_targets})
+
+copy_if_different(
+    ${vivox_src_dir}
+    "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
+    out_targets
+    ${vivox_files}
+    )
+set(third_party_targets ${third_party_targets} ${out_targets})
+
+
+
+copy_if_different(
+    ${debug_src_dir}
+    "${SHARED_LIB_STAGING_DIR_DEBUG}"
+    out_targets
+    ${debug_files}
+    )
+set(third_party_targets ${third_party_targets} ${out_targets})
+
+copy_if_different(
+    ${release_src_dir}
+    "${SHARED_LIB_STAGING_DIR_RELEASE}"
+    out_targets
+    ${release_files}
+    )
+set(third_party_targets ${third_party_targets} ${out_targets})
+
+copy_if_different(
+    ${release_src_dir}
+    "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
+    out_targets
+    ${release_files}
+    )
+set(third_party_targets ${third_party_targets} ${out_targets})
+
+if(NOT STANDALONE)
+  add_custom_target(
+      stage_third_party_libs ALL
+      DEPENDS ${third_party_targets}
+      )
+endif(NOT STANDALONE)


SVN_SILENT made messages (.desktop file)

--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -19,6 +19,7 @@
 Comment[sv]=Användargränssnitt för anpassad kontoinställning av konton som använder anslutningshanteraren Sipe.
 Comment[uk]=Інтерфейс користувача для нетипового налаштовування облікового запису за допомогою керування з’єднаннями sipe.
 Comment[x-test]=xxCustom account configuration user interface for accounts using the sipe connection manager.xx
+Comment[zh_TW]=對使用 sipe 連線管理員的帳號自訂帳號設定使用者介面。
 Icon=blockdevice
 Name=Sipe Account Configuration User Interface
 Name[cs]=Uživatelské rozhraní nastavení účtu Sipe
@@ -39,6 +40,7 @@
 Name[sv]=Användargränssnitt för inställning av Sipe-konton
 Name[uk]=Інтерфейс користувача для налаштовування sipe
 Name[x-test]=xxSipe Account Configuration User Interfacexx
+Name[zh_TW]=Sipe 帳號設定使用者介面
 Type=Service
 ServiceTypes=KTpAccountsKCM/AccountUiPlugin


--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -15,6 +15,7 @@
 Comment[pt]=Interface de utilizador de configuração de contas personalizadas com o gestor de ligações Sipe.
 Comment[pt_BR]=Interface de configuração de contas personalizadas usando o gerenciador de conexões Sipe.
 Comment[sk]=Vlastné používateľské rozhranie konfigurácie účtu pre účty používajúce správcu pripojení Sipe.
+Comment[sl]=Uporabniški vmesnik za prilagoditev računov, ki uporabljajo upravljalnik povezav Sipe.
 Comment[sv]=Användargränssnitt för anpassad kontoinställning av konton som använder anslutningshanteraren Sipe.
 Comment[uk]=Інтерфейс користувача для нетипового налаштовування облікового запису за допомогою керування з’єднаннями sipe.
 Comment[x-test]=xxCustom account configuration user interface for accounts using the sipe connection manager.xx
@@ -34,6 +35,7 @@
 Name[pt]=Interface de Configuração de Contas do Sipe
 Name[pt_BR]=Interface de configuração de contas do Sipe
 Name[sk]=Používateľské rozhranie konfigurácie účtu Sipe
+Name[sl]=Uporabniški vmesnik za nastavitev računov Sipe
 Name[sv]=Användargränssnitt för inställning av Sipe-konton
 Name[uk]=Інтерфейс користувача для налаштовування sipe
 Name[x-test]=xxSipe Account Configuration User Interfacexx


Ability to cache external builds

Ability to cache external builds

In lookup_package, it is now possible to set the CHECK_EXTERNAL option in conjunction with the
DOWNLOAD_BY_DEFAULT option. In that case, it is first checked whether the packages exist in (and
strictly in) the EXTERNAL_ROOT directory. This makes it possible to cache external builds between
build directories and/or codebases.

--- scripts/PackageLookup.cmake
+++ scripts/PackageLookup.cmake
@@ -58,9 +58,31 @@
 macro(_get_sane_name name OUTVAR)
     string(REGEX REPLACE "\\-" "_" ${OUTVAR} "${name}")
 endmacro()
+
+# Changes/unchanges the root path
+# Makes it possible to look for packages stricly inside the root
+macro(_set_root_path PATH TYPE)
+    foreach(save MODE_PACKAGE MODE_INCLUDE MODE_PROGRAM MODE_LIBRARY)
+        set(_save_root_path_${save} ${CMAKE_FIND_ROOT_PATH_${save}})
+        set(CMAKE_FIND_ROOT_PATH_${save} ${TYPE})
+    endforeach()
+    set(_save_root_path "${CMAKE_FIND_ROOT_PATH}")
+    set(CMAKE_FIND_ROOT_PATH "${PATH}")
+    foreach(save MODE_PACKAGE MODE_INCLUDE MODE_PROGRAM MODE_LIBRARY)
+    endforeach()
+endmacro()
+
+# Unchanges the root path
+macro(_unset_root_path)
+    foreach(save MODE_PACKAGE MODE_INCLUDE MODE_PROGRAM MODE_LIBRARY)
+        set(CMAKE_FIND_ROOT_PATH_${save} ${_save_root_path_${save}})
+    endforeach()
+    set(CMAKE_FIND_ROOT_PATH "${_save_root_path}")
+endmacro()
+
 # Looks for a lookup package file and includes it.
 macro(lookup_package package)
-    set(solitos "DOWNLOAD_BY_DEFAULT;REQUIRED;QUIET;KEEP;NOFIND")
+    set(solitos "DOWNLOAD_BY_DEFAULT;REQUIRED;QUIET;KEEP;NOFIND;CHECK_EXTERNAL")
     set(multiplos "ARGUMENTS;COMPONENTS")
     cmake_parse_arguments(${package} "${solitos}" "" "${multiplos}" ${ARGN})

@@ -81,7 +103,11 @@
     # First try and find package (unless downloading by default)
     set(dolook TRUE)
     if(${package}_DOWNLOAD_BY_DEFAULT AND NOT recursive)
-        set(dolook FALSE)
+        if(${package}_CHECK_EXTERNAL)
+            set(do_rootchange TRUE)
+        else()
+            set(dolook FALSE)
+        endif()
     endif()
     if(${package}_NOFIND)
         set(dolook FALSE)
@@ -94,13 +120,20 @@
     set(quiet "")
     if(${package}_QIET)
         set(quiet QUIET)
-    elseif(NOT recursive)
+    elseif(NOT recursive AND NOT do_rootchange)
         set(quiet QUIET)
     endif()
     if(dolook)
+        if(do_rootchange)
+            _set_root_path("${EXTERNAL_ROOT}" ONLY)
+        endif()
         find_package(${package} ${${package}_UNPARSED_ARGUMENTS}
             ${required} ${quiet}
         )
+        if(do_rootchange)
+            _unset_root_path()
+            unset(do_rootchange)
+        endif()
     endif()
     # Sets lower and upper case versions.
     # Otherwise some package will be registered as not found.


Some tweaks to the iOS toolchain file

Some tweaks to the iOS toolchain file

--- cmake-toolchains/ios.toolchain.cmake
+++ cmake-toolchains/ios.toolchain.cmake
@@ -11,9 +11,20 @@
 set(FIPS_OSX 1)
 set(FIPS_POSIX 1)

+# NOTE I'm not sure if those 2 are necessary, it worked for me
+# without, but not for others
+# See:
+# - https://github.com/floooh/fips/pull/112
+# - https://cmake.org/Bug/view.php?id=15329
+set(CMAKE_MACOSX_BUNDLE YES)
+set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
+
+set(CMAKE_SYSTEM_NAME Darwin)
 include(CMakeForceCompiler)
-CMAKE_FORCE_C_COMPILER(gcc GNU)
-CMAKE_FORCE_CXX_COMPILER(g++ GNU)
+CMAKE_FORCE_C_COMPILER(/usr/bin/clang Clang)
+CMAKE_FORCE_CXX_COMPILER(/usr/bin/clang++ Clang)
+set(CMAKE_CXX_COMPILER_WORKS TRUE)
+set(CMAKE_C_COMPILER_WORKS TRUE)

 set(CMAKE_OSX_ARCHITECTURES "arm64")
 set(CMAKE_OSX_SYSROOT "iphoneos")


Fix GCC version detection in GCC 7

Fix GCC version detection in GCC 7

(Closes #473)

--- cmakemodules/script_detect_gcc.cmake
+++ cmakemodules/script_detect_gcc.cmake
@@ -5,6 +5,13 @@
 	execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
 		          OUTPUT_VARIABLE CMAKE_MRPT_GCC_VERSION_FULL
 		          OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+	string(FIND ${CMAKE_MRPT_GCC_VERSION_FULL} "." MRPT_GCC_HAS_DOT)
+	if (${MRPT_GCC_HAS_DOT} EQUAL -1)
+		execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpfullversion
+	                OUTPUT_VARIABLE CMAKE_MRPT_GCC_VERSION_FULL
+	                OUTPUT_STRIP_TRAILING_WHITESPACE)
+	endif()

 	# Output in CMAKE_MRPT_GCC_VERSION_FULL: "X.Y"
 	#  Look for the version number


Massage the SNOW-606 fix to try to make everything (incl. our build machine...) happy.

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

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


ENH: Now include the MetaIO reader paths

--- itkCMakeOptions.cmake
+++ itkCMakeOptions.cmake
@@ -15,12 +15,14 @@
 ${ITK_SOURCE_DIR}/Code/Numerics/vxl/vcl
 ${ITK_SOURCE_DIR}/Utilities/png
 ${ITK_SOURCE_DIR}/Utilities/zlib
+${ITK_SOURCE_DIR}/Utilities/MetaIO
 )

 # set link libraries
 LINK_DIRECTORIES(
 ${ITK_BINARY_DIR}/Utilities/zlib
 ${ITK_BINARY_DIR}/Utilities/png
+${ITK_BINARY_DIR}/Utilities/MetaIO
 ${ITK_BINARY_DIR}/Code/Common
 ${ITK_BINARY_DIR}/Code/IO
 ${ITK_BINARY_DIR}/Code/Numerics/vxl )


COMP: the variable to be used for gdal includes is GDAL_INCLUDE_DIRS not GDAL_INCLUDE_DIR

--- CMake/otbIncludeDirectories.cmake
+++ CMake/otbIncludeDirectories.cmake
@@ -302,7 +302,7 @@

 #For GDAL header file
 SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
-  		${GDAL_INCLUDE_DIR} )
+  		${GDAL_INCLUDE_DIRS} )

 #For EXPAT header file
 IF(OTB_USE_EXTERNAL_EXPAT)


Only add visibility flags if compiling with gcc

--HG--
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/trunk%40601

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -38,10 +38,12 @@
   if (OGRE_STATIC)
     # add static prefix, if compiling static version
     set_target_properties(${LIBNAME} PROPERTIES OUTPUT_NAME ${LIBNAME}Static)
-  else ()
-    # add GCC visibility flags to shared library build
-    set_target_properties(${LIBNAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
-  endif ()
+  else (OGRE_STATIC)
+    if (CMAKE_COMPILER_IS_GNUCXX)
+      # add GCC visibility flags to shared library build
+      set_target_properties(${LIBNAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
+	endif (CMAKE_COMPILER_IS_GNUCXX)
+  endif (OGRE_STATIC)
   install(TARGETS ${LIBNAME}
     RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}"
       CONFIGURATIONS Release MinSizeRel RelWithDebInfo None


Fix ninja builds on Windows.

Fix ninja builds on Windows.

--- CMake/Utils/PrecompiledHeader.cmake
+++ CMake/Utils/PrecompiledHeader.cmake
@@ -17,7 +17,7 @@
   get_filename_component(HEADER ${HEADER_FILE} NAME)

   # Use MSVC_IDE to exclude NMake from using PCHs
-  if (MSVC AND NOT NMAKE AND NOT OGRE_UNITY_BUILD)
+  if (MSVC AND NOT NMAKE AND NOT OGRE_UNITY_BUILD AND NOT ${CMAKE_GENERATOR} MATCHES Ninja)
 	add_definitions(/Yu"${HEADER}")
     set_source_files_properties(${SRC_FILE}
       PPROPERTIES COMPILE_FLAGS /Yc"${HEADER}"


make sure libs get installed on windows too

git-svn-id: 931ab4487dc05a11552de95f7d42b8249ade56b7@1444 a5045d30-4826-4484-9c7f-6e55a06ddc77

--- Code/cmake/Modules/RDKitUtils.cmake
+++ Code/cmake/Modules/RDKitUtils.cmake
@@ -9,6 +9,8 @@
   CDR(RDKLIB_SOURCES ${RDKLIB_DEFAULT_ARGS})
   if(MSVC)
     add_library(${RDKLIB_NAME} ${RDKLIB_SOURCES})
+    INSTALL(TARGETS ${RDKLIB_NAME}
+            DESTINATION ${RDKit_LibDir}/${RDKLIB_DEST})
   else(MSVC)
     # we're going to always build in shared mode since we
     # need exceptions to be (correctly) catchable across


ERR: one moe -lm after CMake upgrade.

ERR: one moe -lm after CMake upgrade.

--- itkCMakeOptions.cmake
+++ itkCMakeOptions.cmake
@@ -33,5 +33,5 @@

 # set link libraries for project
 IF(UNIX)
-  LINK_LIBRARIES(${CMAKE_THREAD_LIBS} ${CMAKE_DL_LIBS})
+  LINK_LIBRARIES(${CMAKE_THREAD_LIBS} ${CMAKE_DL_LIBS} -lm)
 ENDIF(UNIX)


Dependency comment.

Dependency comment.

It is thinking about this comment that I realized that all of CPM will
necessarily need to be subdirectory oriented. I don't like the
super-build approach (see:
http://www.cmake.org/pipermail/cmake/2011-October/046677.html), as it
appears very decentralized. I don't care about the IDE, but it does seem
very inconvienent in this day and age.

--- CPM.cmake
+++ CPM.cmake
@@ -1,5 +1,9 @@
 # CPM - CMake Package Manager
 #
+# TODO: We might need to create a file with all of the static libraries
+#       dependencies in it so that we can link against those at the executable
+#       level. This will be an issue when we have CPM builds relying on other
+#       CPM builds (I don't know if this is already done for external projects).
 # TODO: Add include prefixes. Since we know that all public includes will be
 #       located in ./include, we can copy that directory to a new location
 #       and prefix it with something. This is so we can fix include issues


Move comments to the lines they're commenting.

--- indra/cmake/PNG.cmake
+++ indra/cmake/PNG.cmake
@@ -1,13 +1,11 @@
 # -*- cmake -*-

+if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND ${CMAKE_PATCH_VERSION} GREATER 3)
 # Silence warning about overriding findZLIB.cmake with our own copy.
-
-if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND ${CMAKE_PATCH_VERSION} GREATER 3)
  cmake_policy(SET CMP0017 OLD)
+# Silence warning about using policies to silence warnings about using policies.
  cmake_policy(SET CMP0011 NEW)
 endif(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND ${CMAKE_PATCH_VERSION} GREATER 3)
-
-# Silence warning about using policies to silence warnings about using policies.

 include(Prebuilt)


Use lib prefix for boost libraries on Windows.

--- src/CMake/BoostConfig.cmake
+++ src/CMake/BoostConfig.cmake
@@ -127,9 +127,7 @@
   ENDIF()

   IF(WIN32)
-    # See cmake-2.8/Modules/FindBoost.cmake
-    #SET(boost_LIB_PREFIX "lib")
-    SET(boost_LIB_PREFIX "")
+    SET(boost_LIB_PREFIX "lib")
   ELSE()
     SET(boost_LIB_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX})
   ENDIF()


Don't use hidden visibility with Clang.

Don't use hidden visibility with Clang.

--- CMake/mitkFunctionCreateModule.cmake
+++ CMake/mitkFunctionCreateModule.cmake
@@ -323,7 +323,11 @@
         set(module_cxx_flags_debug )
         set(module_cxx_flags_release )

-        if(MODULE_GCC_DEFAULT_VISIBILITY)
+        if(MODULE_GCC_DEFAULT_VISIBILITY OR NOT CMAKE_COMPILER_IS_GNUCXX)
+          # We only support hidden visibility for gcc for now. Clang still has troubles with
+          # correctly marking template declarations and explicit template instantiations as exported.
+          # See http://comments.gmane.org/gmane.comp.compilers.clang.scm/50028
+          # and http://llvm.org/bugs/show_bug.cgi?id=10113
           set(CMAKE_CXX_VISIBILITY_PRESET default)
           set(CMAKE_VISIBILITY_INLINES_HIDDEN 0)
         else()


Hardcode OpenAL include path on MSVC.

Hardcode OpenAL include path on MSVC.

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@2012 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -280,6 +280,10 @@
         NAMES OpenAL openal
         COMPONENTS al OpenAL32
         PREFIXES ${ENV_NAALI_DEP_PATH}/OpenAL ${ENV_NAALI_DEP_PATH}/OpenAL/libs/Win32)
+        # Force include dir on MSVC
+        if (MSVC)
+  		   set (OPENAL_INCLUDE_DIRS ${ENV_NAALI_DEP_PATH}/OpenAL/include)
+        endif ()
     sagase_configure_report (OPENAL)
 endmacro (configure_openal)


Find Prosilica GigE SDK on Mac. Allow environment variable overrides.

--- CMakeModules/FindProsilicaGigE.cmake
+++ CMakeModules/FindProsilicaGigE.cmake
@@ -1,20 +1,64 @@
+# Get default values for PROSILICA_ROOT and PROSILICA_LAYOUT
+
 IF(WIN32)
-  SET(PROSILICA_TEST_INCLUDE_PATHS
-     "C:\\Program Files\\Prosilica\\GigESDK\\inc-pc"
-     )
-  SET(PROSILICA_TEST_LIB_PATHS
-     "C:\\Program Files\\Prosilica\\GigESDK\\lib-pc"
-     )
+  SET(PROSILICA_ROOT "C:\\Program Files\\Prosilica\\GigESDK")
 ELSE(WIN32)
-  SET(PROSILICA_TEST_INCLUDE_PATHS
-     /usr/local/include
-     /usr/include
-     )
-  SET(PROSILICA_TEST_LIB_PATHS
-      /usr/local/lib
-      /usr/lib
-     )
+  IF(APPLE)
+    SET(PROSILICA_ROOT "/Prosilica GigE SDK")
+  ELSE(APPLE)
+    # Assume headers and libraries are installed in FHS locations
+    SET(PROSILICA_ROOT "/usr")
+  ENDIF(APPLE)
 ENDIF(WIN32)
+
+# defaults for PROSILICA_LAYOUT
+IF(WIN32)
+  SET(PROSILICA_LAYOUT "prosilica")
+ELSE(WIN32)
+  IF(APPLE)
+    SET(PROSILICA_LAYOUT "prosilica")
+  ELSE(APPLE)
+    # Assume headers and libraries are installed in FHS locations
+    SET(PROSILICA_LAYOUT "FHS")
+  ENDIF(APPLE)
+ENDIF(WIN32)
+
+#############################################
+# Environment variable overrides
+
+SET(PROSILICA_TEST_INCLUDE_PATHS "$ENV{PROSILICA_TEST_INCLUDE_PATHS}")
+IF(PROSILICA_TEST_INCLUDE_PATHS STREQUAL "")
+  # not set with env var, use defaults
+  IF(PROSILICA_LAYOUT STREQUAL "prosilica")
+    SET(PROSILICA_TEST_INCLUDE_PATHS ${PROSILICA_ROOT}/inc-pc)
+  ELSE(PROSILICA_LAYOUT STREQUAL "prosilica")
+    IF(NOT PROSILICA_LAYOUT STREQUAL "FHS")
+      MESSAGE(FATAL_ERROR "unknown PROSILICA_LAYOUT " ${PROSILICA_LAYOUT})
+    ENDIF(NOT PROSILICA_LAYOUT STREQUAL "FHS")
+    SET(PROSILICA_TEST_INCLUDE_PATHS ${PROSILICA_ROOT}/include)
+  ENDIF(PROSILICA_LAYOUT STREQUAL "prosilica")
+ENDIF(PROSILICA_TEST_INCLUDE_PATHS STREQUAL "")
+
+SET(PROSILICA_TEST_LIB_PATHS "$ENV{PROSILICA_TEST_LIB_PATHS}")
+IF(PROSILICA_TEST_LIB_PATHS STREQUAL "")
+  # not set with env var, use defaults
+  IF(PROSILICA_LAYOUT STREQUAL "prosilica")
+    SET(PROSILICA_TEST_LIB_PATHS ${PROSILICA_ROOT}/lib-pc)
+  ELSE(PROSILICA_LAYOUT STREQUAL "prosilica")
+    IF(NOT PROSILICA_LAYOUT STREQUAL "FHS")
+      MESSAGE(FATAL_ERROR "unknown PROSILICA_LAYOUT " ${PROSILICA_LAYOUT})
+    ENDIF(NOT PROSILICA_LAYOUT STREQUAL "FHS")
+    SET(PROSILICA_TEST_LIB_PATHS ${PROSILICA_ROOT}/lib)
+  ENDIF(PROSILICA_LAYOUT STREQUAL "prosilica")
+ENDIF(PROSILICA_TEST_LIB_PATHS STREQUAL "")
+
+#############################################
+# No more environment variable settings
+
+IF(NOT "$ENV{PROSILICA_CMAKE_DEBUG}" STREQUAL "")
+  MESSAGE("PROSILICA_TEST_INCLUDE_PATHS " ${PROSILICA_TEST_INCLUDE_PATHS})
+  MESSAGE("PROSILICA_TEST_LIB_PATHS " ${PROSILICA_TEST_LIB_PATHS})
+ENDIF(NOT "$ENV{PROSILICA_CMAKE_DEBUG}" STREQUAL "")

 FIND_PATH(PROSILICA_GIGE_INCLUDE_PATH PvApi.h
   ${PROSILICA_TEST_INCLUDE_PATHS}
@@ -22,6 +66,13 @@

 FIND_LIBRARY(PROSILICA_GIGE_LIBRARY PvAPI ${PROSILICA_TEST_LIB_PATHS})

+IF(APPLE)
+  SET(PROSILICA_GIGE_LIBRARY
+    ${PROSILICA_GIGE_LIBRARY}
+    "-framework CoreFoundation"
+    )
+ENDIF(APPLE)
+
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROSILICA_GIGE DEFAULT_MSG
                                                  PROSILICA_GIGE_INCLUDE_PATH


BUG: filter out cli and gui script for TestApplication

--- Packaging/prepare_file_list.cmake
+++ Packaging/prepare_file_list.cmake
@@ -1,17 +1,16 @@
 function(prepare_file_list file_list_result)

   set(file_list)
+  set(otbapp_launcher "otbApplicationLauncherCommandLine${EXE_EXT}")
   #This must exist in any OTB Installation. minimal or full
-  if(NOT EXISTS "${SUPERBUILD_INSTALL_DIR}/bin/otbApplicationLauncherCommandLine${EXE_EXT}")
+  if(NOT EXISTS "${SUPERBUILD_INSTALL_DIR}/bin/${otbapp_launcher}")
     message(
       FATAL_ERROR
-      "${SUPERBUILD_INSTALL_DIR}/bin/otbApplicationLauncherCommandLine${EXE_EXT} not found."
-      )
-
+      "${SUPERBUILD_INSTALL_DIR}/bin/${otbapp_launcher} not found.")
     return()
   endif()

-  set(file_list "otbApplicationLauncherCommandLine${EXE_EXT}")
+  set(file_list "${otbapp_launcher}")

   if(HAVE_QT4)
     list(APPEND file_list "otbApplicationLauncherQt${EXE_EXT}")
@@ -51,9 +50,16 @@
      "${SUPERBUILD_INSTALL_DIR}/bin/gdal*${EXE_EXT}"
      "${OTB_BINARY_DIR}/bin/*[T|t]est*${EXE_EXT}"
      )
-
-   list(REMOVE_ITEM otb_test_exe_list "${SUPERBUILD_INSTALL_DIR}/bin/gdal-config")

+  #special items to be removed!
+   list(REMOVE_ITEM otb_test_exe_list
+     "${SUPERBUILD_INSTALL_DIR}/bin/gdal-config"
+     )
+   list(REMOVE_ITEM otb_test_exe_list
+     "${OTB_BINARY_DIR}/bin/otbcli_TestApplication")
+
+   list(REMOVE_ITEM otb_test_exe_list
+     "${OTB_BINARY_DIR}/bin/otbgui_TestApplication")

    foreach(otb_test_exe   ${otb_test_exe_list})
      get_filename_component(otb_test_exe_name ${otb_test_exe} NAME)


STYLE: update SCIFIO module name

STYLE: update SCIFIO module name

As SCIFIO is a remote module, to follow the policies for remote module
naming it should not start with "ITK...".

Thus, the name in the itk_fetch_module() check was changed from
"ITKIOSCIFIO" to "SCIFIO".

The commit hash was also updated to the latest changeset, which makes
the same naming changes to scifio-imageio's itk-module.cmake (so the two
names are still consistent).

Change-Id: Ibaac978152d3d15d26442881c3fb273e81ee6ae9

--- Modules/Remote/SCIFIO.remote.cmake
+++ Modules/Remote/SCIFIO.remote.cmake
@@ -1,5 +1,5 @@
-itk_fetch_module(ITKIOSCIFIO
+itk_fetch_module(SCIFIO
   "SCIFIO (Bioformats) ImageIO plugin for ITK"
   GIT_REPOSITORY https://github.com/scifio/scifio-imageio.git
-  GIT_TAG 9cb93a368e2d431ee5b03e061ed210a07adb98a7
+  GIT_TAG 67be5138c10769e2d9b09e96e2656ccf1d8c7a79
   )


Macro now takes 2 parameters with a optional 3rd.  Fixes linux prefix and part design install path.

--- cMake/FreeCadMacros.cmake
+++ cMake/FreeCadMacros.cmake
@@ -204,36 +204,34 @@
   ENDIF(MSVC)
 ENDMACRO(GET_MSVC_PRECOMPILED_SOURCE)

-# Macro to replace all the binary output locations
-MACRO(SET_BIN_DIR ProjectName OutputName OutputDir)
+# Macro to replace all the binary output locations.  {ARGVN} is zero based so
+# the 3rd element is ${ARGV2}.  When the 3rd element is empty, Runtime and Lib
+# directories default to /bin and /lib.  When present, the 3rd element specifies
+# both Runtime and Lib directories.
+MACRO(SET_BIN_DIR ProjectName OutputName)
     set_target_properties(${ProjectName} PROPERTIES OUTPUT_NAME ${OutputName})
+    if(${ARGC} STREQUAL 3)
+        set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}${ARGV2})
+        set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG   ${CMAKE_BINARY_DIR}${ARGV2})
+        set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY         ${CMAKE_BINARY_DIR}${ARGV2})
+    else(${ARGC} STREQUAL 3)
+        set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
+        set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG   ${CMAKE_BINARY_DIR}/bin)
+        set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY         ${CMAKE_BINARY_DIR}/lib)
+    endif(${ARGC} STREQUAL 3)
+
     if(WIN32)
-        set_target_properties(${ProjectName} PROPERTIES DEBUG_OUTPUT_NAME "${OutputName}_d")
-        set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}${OutputDir})
+        set_target_properties(${ProjectName} PROPERTIES DEBUG_OUTPUT_NAME ${OutputName}_d)
     else(WIN32)
-        SET(COND_IS_FREECAD_BIN ${OutputName} STREQUAL "FreeCADMain" OR
-                                ${OutputName} STREQUAL "FreeCADMainCmd")
-        SET(COND_IS_FREECAD_LIB ${OutputName} STREQUAL "FreeCADApp"    OR
-                                ${OutputName} STREQUAL "FreeCADBase"   OR
-                                ${OutputName} STREQUAL "FreeCADGui"    OR
-                                ${OutputName} STREQUAL "FreeCADMainPy" OR
-                                ${OutputName} STREQUAL "FreeCADGuiPy")
-
-        IF(${COND_IS_FREECAD_BIN})
-            set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}${OutputDir})
-        ELSEIF(${COND_IS_FREECAD_LIB})
-            set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
-        ELSE(${COND_IS_FREECAD_BIN})
-            set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}${OutputDir})
-        ENDIF(${COND_IS_FREECAD_BIN})
+        set_target_properties(${ProjectName} PROPERTIES PREFIX "")

-        set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${INSTALL_RPATH})
-        UNSET(COND_IS_FREECAD_BIN)
-        UNSET(COND_IS_FREECAD_LIB)
+        SET(COND_IS_PART_DESIGN ${ProjectName} STREQUAL PartDesign OR
+                                ${ProjectName} STREQUAL PartDesignGui)
+        if(${COND_IS_PART_DESIGN})
+            set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV2})
+        else(${COND_IS_PART_DESIGN})
+            set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${INSTALL_RPATH})
+        endif(${COND_IS_PART_DESIGN})
+        UNSET(COND_IS_PART_DESIGN)
     endif(WIN32)
-
-    if(MSVC_IDE)
-        # dirty hack to avoid Debug/Release subdirectory
-        set_target_properties(${ProjectName} PROPERTIES PREFIX "../")
-    endif(MSVC_IDE)
 ENDMACRO(SET_BIN_DIR)


Revert "i#1569 AArch64: Add AArch64 cross-compilation to test suite."

This reverts commit 05346edfbe023833ab584b1103a0ca4501a4fed4 due to the
revert of its dependent commit c2ecca24db224f9d5fe2a5193dacfa6af826b9d0.

Review-URL: https://codereview.appspot.com/283610043

--- suite/runsuite.cmake
+++ suite/runsuite.cmake
@@ -281,16 +281,6 @@
     INTERNAL:BOOL=OFF
     CMAKE_TOOLCHAIN_FILE:PATH=${CTEST_SOURCE_DIRECTORY}/make/toolchain-arm32.cmake
     " OFF OFF "")
-  testbuild_ex("arm-debug-internal-64" OFF "
-    DEBUG:BOOL=ON
-    INTERNAL:BOOL=ON
-    CMAKE_TOOLCHAIN_FILE:PATH=${CTEST_SOURCE_DIRECTORY}/make/toolchain-arm64.cmake
-    " OFF OFF "")
-  testbuild_ex("arm-release-external-64" OFF "
-    DEBUG:BOOL=OFF
-    INTERNAL:BOOL=OFF
-    CMAKE_TOOLCHAIN_FILE:PATH=${CTEST_SOURCE_DIRECTORY}/make/toolchain-arm64.cmake
-    " OFF OFF "")

   # Android cross-compilation and running of tests using "adb shell"
   find_program(ADB adb DOC "adb Android utility")


FIX: Do not version the loadable modules.

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -185,7 +185,7 @@

     include_directories("${CMAKE_SOURCE_DIR}/${_REL_INC_DIR}")

-    if (_IS_MODULE)
+    if (${_IS_MODULE})
         set (_LIB_TYPE MODULE)
     else()
         set (_LIB_TYPE SHARED)
@@ -203,6 +203,7 @@
     #                       SHARED LIBRARY SET UP
     ###########################################################################
     add_library(${_LIB_NAME} ${_LIB_TYPE} ${${_SOURCE_FILES_VAR}} ${${_HEADER_FILES_VAR}})
+    set_target_properties(${_LIB_NAME} PROPERTIES DEFINE_SYMBOL ${_CEGUI_EXPORT_DEFINE}_EXPORTS)

     if (NOT CEGUI_BUILD_SHARED_LIBS_WITH_STATIC_DEPENDENCIES)
         set_target_properties(${_LIB_NAME} PROPERTIES
@@ -221,12 +222,16 @@
         )
     endif()

-    if (NOT APPLE OR CEGUI_APPLE_DYLIB_SET_VERSION_INFO)
-        set_target_properties(${_LIB_NAME} PROPERTIES
-            VERSION ${CEGUI_ABI_VERSION}
-            SOVERSION ${CEGUI_ABI_CURRENT}
-            DEFINE_SYMBOL ${_CEGUI_EXPORT_DEFINE}_EXPORTS
-        )
+    # Do not version modules, since we dlopen these directly and need to know
+    # the name is what we think it will be (and not rely on symlinks which will
+    # not be installed always, but usually only as part of *-dev packages).
+    if (NOT ${_IS_MODULE})
+        if (NOT APPLE OR CEGUI_APPLE_DYLIB_SET_VERSION_INFO)
+            set_target_properties(${_LIB_NAME} PROPERTIES
+                VERSION ${CEGUI_ABI_VERSION}
+                SOVERSION ${CEGUI_ABI_CURRENT}
+            )
+        endif()
     endif()

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


Work around bug with generator expression in compile_definitions in gcc/clang precompiled header generation.

--- cmake/DaemonFlags.cmake
+++ cmake/DaemonFlags.cmake
@@ -340,4 +340,9 @@
 endif()

 # Configuration specific definitions
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Debug>:DEBUG_BUILD>)
+
+# This stupid trick to define THIS_IS_NOT_A_DEBUG_BUILD (rather than nothing) in the non-debug case
+# is so that it doesn't break the hacky gcc/clang PCH code which reads all the definitions
+# and prefixes "-D" to them.
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
+             $<$<NOT:$<CONFIG:Debug>>:THIS_IS_NOT_A_>DEBUG_BUILD)


Do not "try" MSVC flags with non-MSVC

Do not "try" MSVC flags with non-MSVC

--- cmake/DaemonFlags.cmake
+++ cmake/DaemonFlags.cmake
@@ -54,10 +54,12 @@

 function(try_flag LIST FLAG)
     string(REGEX REPLACE "[/=-]" "_" TEST ${FLAG})
-    if (MSVC) # check_CXX_compiler_flag apparently always fails for MSVC.
-              # MSVC ignores unknown options, so just check if it begins with '/'.
-        string(SUBSTRING "${FLAG}" 0 1 FLAG_FIRST_CHAR)
-        if ("${FLAG_FIRST_CHAR}" STREQUAL "/")
+    # Check if the flag begins with '/', meaning it is for MSVC.
+    # check_CXX_compiler_flag apparently always fails for MSVC, so accept it without testing.
+    # Other compilers might interpret it as a filename so reject without testing.
+    string(SUBSTRING "${FLAG}" 0 1 FLAG_FIRST_CHAR)
+    if ("${FLAG_FIRST_CHAR}" STREQUAL "/")
+        if (MSVC)
             set(${TEST} 1)
         else()
             set(${TEST} 0)


Better SndFile cmake search

Better SndFile cmake search

--- cmake/FindSndFile.cmake
+++ cmake/FindSndFile.cmake
@@ -7,35 +7,43 @@
 #   Phil Garner, December 2013
 #
 # ...but basically copied from the examples on the web, so it's not
-# clear it's really copyright me.  This one is from
+# clear it's really copyright me.  This one is basically from
 # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries, with libXml2
 # replaced by sndfile.
 #

-# - Try to find SndFile
+#
+# Try to find SndFile
 # Once done this will define
-#  SNDFILE_FOUND - System has SndFile
-#  SNDFILE_INCLUDE_DIRS - The SndFile include directories
-#  SNDFILE_LIBRARIES - The libraries needed to use SndFile
-#  SNDFILE_DEFINITIONS - Compiler switches required for using SndFile
+#  SNDFILE_FOUND          - System has SndFile
+#  SNDFILE_INCLUDE_DIR    - The SndFile include directories
+#  SNDFILE_LIBRARIES      - The libraries needed to use SndFile
+#  SNDFILE_DEFINITIONS    - Compiler switches required for using SndFile
+#  SNDFILE_VERSION_STRING - the version of SndFile found
+#

 find_package(PkgConfig)
 pkg_check_modules(PC_SNDFILE QUIET sndfile)
+
 set(SNDFILE_DEFINITIONS ${PC_SNDFILE_CFLAGS_OTHER})
+set(SNDFILE_VERSION_STRING ${PC_SNDFILE_VERSION})

-find_path(SNDFILE_INCLUDE_DIR sndfile.h
+find_path(
+  SNDFILE_INCLUDE_DIR sndfile.h
   HINTS ${PC_SNDFILE_INCLUDEDIR} ${PC_SNDFILE_INCLUDE_DIRS}
-  PATH_SUFFIXES sndfile)
+  PATH_SUFFIXES sndfile
+)

-find_library(SNDFILE_LIBRARY NAMES sndfile
-  HINTS ${PC_SNDFILE_LIBDIR} ${PC_SNDFILE_LIBRARY_DIRS})
-
-set(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY})
-set(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR})
+find_library(
+  SNDFILE_LIBRARIES NAMES sndfile
+  HINTS ${PC_SNDFILE_LIBDIR} ${PC_SNDFILE_LIBRARY_DIRS}
+)

 include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(
+  SndFile
+  REQUIRED_VARS SNDFILE_LIBRARIES SNDFILE_INCLUDE_DIR
+  VERSION_VAR SNDFILE_VERSION_STRING
+)

-find_package_handle_standard_args(SndFile DEFAULT_MSG
-  SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
-
-mark_as_advanced(SNDFILE_INCLUDE_DIR SNDFILE_LIBRARY)
+mark_as_advanced(SNDFILE_INCLUDE_DIR SNDFILE_LIBRARIES)


CMake logic fix; turn OFF variable created by the option command in properly
cached way.

svn path=/trunk/; revision=8015

--- cmake/modules/gcw.cmake
+++ cmake/modules/gcw.cmake
@@ -219,6 +219,6 @@
     message(STATUS "WARNING: pygtk-2.0 not found.  "
     "Setting ENABLE_pygcw to OFF"
     )
-    set(ENABLE_pygcw OFF)
+    set(ENABLE_pygcw OFF CACHE BOOL "Enable Python Gnome2 bindings" FORCE)
   endif(linkflags)
 endif(ENABLE_pygcw)


cmake: add functions for handling global and persistent variables

Change-Id: Ice07806e6eb079272a4c830b379742568ddf0522

--- cmake/qibuild/set.cmake
+++ cmake/qibuild/set.cmake
@@ -1,6 +1,68 @@
 ## Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
 ## Use of this source code is governed by a BSD-style license that can be
 ## found in the COPYING file.
+
+#WARNING you should always call qi_global_get to get a global variable
+macro(qi_global_set name)
+  set_property(GLOBAL PROPERTY "${name}" ${ARGN})
+endmacro()
+
+macro(qi_global_get OUT_var name)
+  #macro so no need for PARENT_SCOPE
+  get_property("${OUT_var}" GLOBAL PROPERTY "${name}")
+endmacro()
+
+macro(qi_global_is_set OUT_var name)
+  #macro so no need for PARENT_SCOPE
+  get_property("${OUT_var}" GLOBAL PROPERTY "${name}" SET)
+endmacro()
+
+
+#persistent across run
+macro(qi_persistent_set _name)
+  set("${_name}" ${ARGN} CACHE INTERNAL "" FORCE)
+endmacro()
+
+macro(qi_persistent_get OUT_var name)
+  #macro so no need for PARENT_SCOPE
+  get_property("${OUT_var}" CACHE PROPERTY "${name}")
+endmacro()
+
+macro(qi_persistent_is_set OUT_var name)
+  #macro so no need for PARENT_SCOPE
+  get_property("${OUT_var}" CACHE PROPERTY "${name}" SET)
+endmacro()
+
+macro(qi_persistent_append _name)
+  list(APPEND "${_name}" ${ARGN})
+  set("${_name}" "${${_name}}" CACHE INTERNAL "" FORCE)
+endmacro()
+
+macro(qi_persistent_prepend _name)
+  list(INSERT "${_name}" 0 ${ARGN})
+  set("${_name}" "${${_name}}" CACHE INTERNAL "" FORCE)
+endmacro()
+
+function(qi_persistent_append_uniq _name)
+  foreach(_value ${ARGN})
+    list(FIND "${_name}" ${_value} _found)
+    if (_found STREQUAL "-1")
+      qi_persistent_append("${_name}" ${_value})
+    endif()
+  endforeach()
+endfunction()
+
+function(qi_persistent_prepend_uniq _name)
+  foreach(_value ${ARGN})
+    list(FIND "${_name}" ${_value} _found)
+    if (_found STREQUAL "-1")
+      qi_persistent_prepend("${_name}" ${_value})
+    endif()
+  endforeach()
+endfunction()
+
+## DEPRECATED ##
+

 # write the variable into cache, variable wont be visible
 macro(qi_set_global name)


Disable Paraview ThickenLayeredCells plugin

--- Superbuild/Projects/paraview.cmake
+++ Superbuild/Projects/paraview.cmake
@@ -38,6 +38,7 @@
     -DPARAVIEW_BUILD_PLUGIN_StreamingParticles:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_SierraPlotTools:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_SurfaceLIC:BOOL=FALSE
+    -DPARAVIEW_BUILD_PLUGIN_ThickenLayeredCells:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_UncertaintyRendering:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_VRPlugin:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_VaporPlugin:BOOL=FALSE


build: Fix cmake warning

build: Fix cmake warning

--- Superbuild/Projects/getdate.cmake
+++ Superbuild/Projects/getdate.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.2)
+cmake_minimum_required(VERSION 2.8)

 macro(GET_DATE)
   #


Parse requirements.txt in CMake

Parse requirements.txt in CMake

--- tools/cmake/app.cmake
+++ tools/cmake/app.cmake
@@ -26,13 +26,39 @@

 # Find Python and needed packages
 find_package(Python3)
+# Find Python
+find_package(Python3 COMPONENTS Interpreter)
 include(${CMAKE_CURRENT_LIST_DIR}/CheckPythonPackage.cmake)
-check_python_package(intelhex HAVE_INTELHEX)
-check_python_package(prettytable HAVE_PRETTYTABLE)

-if(Python3_FOUND AND HAVE_INTELHEX AND HAVE_PRETTYTABLE)
+# Check python packages from requirements.txt
+file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/requirements.txt PYTHON_REQUIREMENTS)
+foreach(REQUIREMENT ${PYTHON_REQUIREMENTS})
+
+	# Look for a string from the start of each line that does not contain "<", ">", "=", or " ".
+	if(REQUIREMENT MATCHES "^([^<>= ]+)")
+
+		set(PACKAGE_NAME ${CMAKE_MATCH_1})
+		string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UCASE) # Ucase name needed for CMake variable
+		string(TOLOWER ${PACKAGE_NAME} PACKAGE_NAME_LCASE) # Lcase name needed for import statement
+
+		check_python_package(${PACKAGE_NAME_LCASE} HAVE_PYTHON_${PACKAGE_NAME_UCASE})
+		if(NOT HAVE_PYTHON_${PACKAGE_NAME_UCASE})
+			message(WARNING "Missing Python dependency ${PACKAGE_NAME}")
+		endif()
+
+	else()
+
+		message(FATAL_ERROR "Cannot parse line \"${REQUIREMENT}\" in requirements.txt")
+
+	endif()
+
+endforeach()
+
+# Check deps for memap
+if(Python3_FOUND AND HAVE_PYTHON_INTELHEX AND HAVE_PYTHON_PRETTYTABLE)
 	set(HAVE_MEMAP_DEPS TRUE)
 else()
 	set(HAVE_MEMAP_DEPS FALSE)
 	message(STATUS "Missing Python dependencies (python3, intelhex, prettytable) so the memory map cannot be printed")
-endif()+endif()
+


Fix ispc.cmake for Windows

Fix ispc.cmake for Windows

--- common/cmake/ispc.cmake
+++ common/cmake/ispc.cmake
@@ -91,7 +91,7 @@
     SET(ISPC_INCLUDE_DIR_PARMS "-I" ${ISPC_INCLUDE_DIR_PARMS})
   ENDIF()

-  IF (${CMAKE_BUILD_TYPE} STREQUAL "Release")
+  IF (WIN32 OR "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
     SET(ISPC_OPT_FLAGS -O3)
   ELSE()
     SET(ISPC_OPT_FLAGS -O2 -g)
@@ -103,13 +103,8 @@
     GET_FILENAME_COMPONENT(fname ${src} NAME_WE)
     GET_FILENAME_COMPONENT(dir ${src} PATH)

-    IF ("${dir}" MATCHES "^/|([A-Z]:)") # global path name to input
-      STRING(REGEX REPLACE "^/|([A-Z]:)" "${ISPC_TARGET_DIR}/rebased/" outdir "${dir}")
-      SET(input ${src})
-    ELSE() # local path name to input
-      SET(outdir "${ISPC_TARGET_DIR}/local_${dir}")
-      SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${src})
-    ENDIF()
+    SET(outdir "${ISPC_TARGET_DIR}/${dir}")
+    SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${src})

     SET(deps "")
     IF (EXISTS ${outdir}/${fname}.dev.idep)


compilation also works when testing repo not present and testing disabled

--- common/cmake/test.cmake
+++ common/cmake/test.cmake
@@ -107,21 +107,23 @@
 ENDMACRO()

 MACRO (ADD_EMBREE_MODELS_TEST model_list_file name reference executable)
+  IF (BUILD_TESTING)

-  SET(full_model_list_file ${EMBREE_TESTING_MODEL_DIR}/${model_list_file})
+    SET(full_model_list_file ${EMBREE_TESTING_MODEL_DIR}/${model_list_file})

-  IF(NOT EXISTS "${full_model_list_file}")
-    MESSAGE(FATAL_ERROR "File ${EMBREE_TESTING_MODEL_DIR}/${model_list_file} does not exist!")
+    IF(NOT EXISTS "${full_model_list_file}")
+      MESSAGE(FATAL_ERROR "File ${EMBREE_TESTING_MODEL_DIR}/${model_list_file} does not exist!")
+    ENDIF()
+
+    FILE(READ "${full_model_list_file}" models)
+    STRING(REGEX REPLACE "\n" ";" models "${models}")
+
+    FOREACH (model ${models})
+      STRING(REGEX REPLACE "/" "_" modelname "${model}")
+      STRING(REGEX REPLACE ".ecs" "" modelname "${modelname}")
+      ADD_EMBREE_MODEL_TEST(${name}_${modelname} ${reference}_${modelname} ${executable} "${ARGN}" ${model})
+    ENDFOREACH()
   ENDIF()
-
-  FILE(READ "${full_model_list_file}" models)
-  STRING(REGEX REPLACE "\n" ";" models "${models}")
-
-  FOREACH (model ${models})
-    STRING(REGEX REPLACE "/" "_" modelname "${model}")
-    STRING(REGEX REPLACE ".ecs" "" modelname "${modelname}")
-    ADD_EMBREE_MODEL_TEST(${name}_${modelname} ${reference}_${modelname} ${executable} "${ARGN}" ${model})
-  ENDFOREACH()
 ENDMACRO()

 # add klocwork test


SuperBuild: STYLE: C-x h M-x indent-region

--- SuperBuild/CMake/External_qt4.cmake
+++ SuperBuild/CMake/External_qt4.cmake
@@ -1,91 +1,91 @@
 INCLUDE_ONCE_MACRO(QT4)

-    SETUP_SUPERBUILD(PROJECT QT4)
-    message(STATUS "  Using Qt4 SuperBuild version")
-    if(UNIX AND NOT APPLE)
-      message(STATUS "  SuperBuild may fail to compile Qt4. If so, you should install it via package manager.")
-    endif()
+SETUP_SUPERBUILD(PROJECT QT4)
+message(STATUS "  Using Qt4 SuperBuild version")
+if(UNIX AND NOT APPLE)
+  message(STATUS "  SuperBuild may fail to compile Qt4. If so, you should install it via package manager.")
+endif()

-    if(NOT DEFINED git_protocol)
-      set(git_protocol "git")
-    endif()
+if(NOT DEFINED git_protocol)
+  set(git_protocol "git")
+endif()

-    #NOTE: make sure your superbuild install directory does not contain any
-    #Qt files from previous install of superbuild QT.
-    # declare dependencies
-    ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(QT4 ZLIB SQLITE FREETYPE)
+#NOTE: make sure your superbuild install directory does not contain any
+#Qt files from previous install of superbuild QT.
+# declare dependencies
+ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(QT4 ZLIB SQLITE FREETYPE)

-    #use system libs always for Qt4 as we build them from source or have already in system
-    set(QT4_SB_CONFIG)
-    #RK: building faling on mac. png include is in a macframework
-    if(USE_SYSTEM_PNG)
-      set(QT4_SB_CONFIG "-I ${PNG_PNG_INCLUDE_DIR}")
-    endif()
+#use system libs always for Qt4 as we build them from source or have already in system
+set(QT4_SB_CONFIG)
+#RK: building faling on mac. png include is in a macframework
+if(USE_SYSTEM_PNG)
+  set(QT4_SB_CONFIG "-I ${PNG_PNG_INCLUDE_DIR}")
+endif()

-    if(UNIX)
-      set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -no-openssl")
-      if(APPLE)
-        set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -no-framework")
-      else() #Linux
-        set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -no-sm -no-xrender -no-fontconfig -no-gtkstyle -no-glib")
-      endif()
-    endif()
-    STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${SB_INSTALL_PREFIX})
-    STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})
+if(UNIX)
+  set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -no-openssl")
+  if(APPLE)
+    set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -no-framework")
+  else() #Linux
+    set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -no-sm -no-xrender -no-fontconfig -no-gtkstyle -no-glib")
+  endif()
+endif()
+STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${SB_INSTALL_PREFIX})
+STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})

-    if(MSVC)
-      configure_file(
-        ${CMAKE_SOURCE_DIR}/patches/QT4/configure_qt4.bat.in
-        ${CMAKE_BINARY_DIR}/configure_qt4.bat
-        @ONLY)
+if(MSVC)
+  configure_file(
+    ${CMAKE_SOURCE_DIR}/patches/QT4/configure_qt4.bat.in
+    ${CMAKE_BINARY_DIR}/configure_qt4.bat
+    @ONLY)

-      ExternalProject_Add(QT4
-        PREFIX QT4
-        URL "http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz"
-        URL_MD5 d990ee66bf7ab0c785589776f35ba6ad
-        BINARY_DIR ${QT4_SB_SRC}
-        INSTALL_DIR ${SB_INSTALL_PREFIX}
-        DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
-        PATCH_COMMAND ${CMAKE_COMMAND} -E copy
-        ${CMAKE_BINARY_DIR}/configure_qt4.bat
-        ${QT4_SB_SRC}
-        CONFIGURE_COMMAND
-        configure_qt4.bat
-        DEPENDS ${QT4_DEPENDENCIES} )
+  ExternalProject_Add(QT4
+    PREFIX QT4
+    URL "http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz"
+    URL_MD5 d990ee66bf7ab0c785589776f35ba6ad
+    BINARY_DIR ${QT4_SB_SRC}
+    INSTALL_DIR ${SB_INSTALL_PREFIX}
+    DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
+    PATCH_COMMAND ${CMAKE_COMMAND} -E copy
+    ${CMAKE_BINARY_DIR}/configure_qt4.bat
+    ${QT4_SB_SRC}
+    CONFIGURE_COMMAND
+    configure_qt4.bat
+    DEPENDS ${QT4_DEPENDENCIES} )

-      ExternalProject_Add_Step(QT4 _jpeg_lib_name
-        COMMAND
-        ${CMAKE_COMMAND} -E copy
-        ${CMAKE_SOURCE_DIR}/patches/QT4/qjpeghandler.pri
-        ${QT4_SB_SRC}/src/gui/image/
-        DEPENDEES patch update
-        DEPENDERS configure  )
+  ExternalProject_Add_Step(QT4 _jpeg_lib_name
+    COMMAND
+    ${CMAKE_COMMAND} -E copy
+    ${CMAKE_SOURCE_DIR}/patches/QT4/qjpeghandler.pri
+    ${QT4_SB_SRC}/src/gui/image/
+    DEPENDEES patch update
+    DEPENDERS configure  )

-    else()
-      configure_file(
-        ${CMAKE_SOURCE_DIR}/patches/QT4/configure_qt4.sh.in
-        ${CMAKE_BINARY_DIR}/configure_qt4.sh
-        @ONLY)
+else()
+  configure_file(
+    ${CMAKE_SOURCE_DIR}/patches/QT4/configure_qt4.sh.in
+    ${CMAKE_BINARY_DIR}/configure_qt4.sh
+    @ONLY)

-      ExternalProject_Add(QT4
-        PREFIX QT4
-        URL "http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz"
-        URL_MD5 d990ee66bf7ab0c785589776f35ba6ad
-        BINARY_DIR ${QT4_SB_SRC}
-        INSTALL_DIR ${SB_INSTALL_PREFIX}
-        DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
-        PATCH_COMMAND
-        ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/configure_qt4.sh
-        ${QT4_SB_SRC}
-        CONFIGURE_COMMAND
-        ${CMAKE_BINARY_DIR}/configure_qt4.sh
-        DEPENDS ${QT4_DEPENDENCIES}
-        )
+  ExternalProject_Add(QT4
+    PREFIX QT4
+    URL "http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz"
+    URL_MD5 d990ee66bf7ab0c785589776f35ba6ad
+    BINARY_DIR ${QT4_SB_SRC}
+    INSTALL_DIR ${SB_INSTALL_PREFIX}
+    DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
+    PATCH_COMMAND
+    ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/configure_qt4.sh
+    ${QT4_SB_SRC}
+    CONFIGURE_COMMAND
+    ${CMAKE_BINARY_DIR}/configure_qt4.sh
+    DEPENDS ${QT4_DEPENDENCIES}
+    )

-    endif()
+endif()

-    if(APPLE)
-      SUPERBUILD_PATCH_SOURCE(QT4)
-    endif()
+if(APPLE)
+  SUPERBUILD_PATCH_SOURCE(QT4)
+endif()

-    set(_SB_QT_QMAKE_EXECUTABLE ${SB_INSTALL_PREFIX}/bin/qmake)
+set(_SB_QT_QMAKE_EXECUTABLE ${SB_INSTALL_PREFIX}/bin/qmake)


set Qt5_DIR in cmake to make sure correct cmake file is used

--- cmake/Depdendencies.cmake
+++ cmake/Depdendencies.cmake
@@ -43,6 +43,7 @@
             # Rename it to moc(.exe)
             file(RENAME ${PROJECT_BINARY_DIR}/bin/cmake${CMAKE_EXECUTABLE_SUFFIX} ${PROJECT_BINARY_DIR}/bin/moc${CMAKE_EXECUTABLE_SUFFIX})
         endif()
+        set(Qt5_DIR ${PROJECT_SOURCE_DIR}/cmake/Qt5/)
         find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets OpenGL Multimedia MultimediaWidgets PATHS ${PROJECT_SOURCE_DIR}/cmake/)
         list(APPEND LIBRARIES ${Qt5Core_LIBRARY})
         list(APPEND LIBRARIES ${Qt5Gui_LIBRARY})


Put nvcc-check in CUDA_FOUND part

Put nvcc-check in CUDA_FOUND part

--- cmake/FindCUDA_wrap.cmake
+++ cmake/FindCUDA_wrap.cmake
@@ -17,20 +17,18 @@
       set (CUDA_NVCC_FLAGS --compiler-options ${CMAKE_C_FLAGS})
     endif ()
   endif ()
+
+  # JAS 08.25.2010
+  #   Check to make sure nvcc has gcc-4.3 for compiling.
+  #   This script will modify CUDA_NVCC_FLAGS if system default is not gcc-4.3
+  include (nvcc-check)
 endif ()

 set (CUDA_FOUND ${CUDA_FOUND} CACHE BOOL "Did we find cuda?")

 if (CUDA_FOUND)
-  cuda_include_directories (
-    ${CMAKE_CURRENT_SOURCE_DIR}
-    )
+  cuda_include_directories (${CMAKE_CURRENT_SOURCE_DIR})
 endif ()
-
-# JAS 08.25.2010
-#   Check to make sure nvcc has gcc-4.3 for compiling.
-#   This script will modify CUDA_NVCC_FLAGS if system default is not gcc-4.3
-include (nvcc-check)

 message (STATUS "CUDA Build Level: ALL Compute Capabilities")
 set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}


Update FindMyPackage.cmake

Update FindMyPackage.cmake

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

 # Done!


fix debug file renaming sheme

fix debug file renaming sheme

--- cmake/InstallMacros.cmake
+++ cmake/InstallMacros.cmake
@@ -186,6 +186,7 @@
       string(SUBSTRING ${FILE_CHECKSUM} 0 2 SUB_DIR)
       string(SUBSTRING ${FILE_CHECKSUM} 2 -1 STRIP_FILE)
       set(SUB_DEBINFO_DIR .build-id/${SUB_DIR})
+      set(STRIP_FILE "${STRIP_FILE}.debug")
     endif()
     execute_process(COMMAND ${CMAKE_OBJCOPY} --only-keep-debug ${FILE} ${STRIP_DIR}/${STRIP_FILE})
     set(FILE ${STRIP_DIR}/${STRIP_FILE})


Set build-target to Linux as Generic is not recognised by Conan

Signed-off-by: Magnus Skjegstad <9f4ca770b638615ac5c3e0d2da16b77c80c2f2c6@skjegstad.com>

--- cmake/elf-toolchain.cmake
+++ cmake/elf-toolchain.cmake
@@ -15,7 +15,7 @@
   set(ENV{INCLUDEOS_PREFIX} /usr/local)
 endif()

-set(CMAKE_SYSTEM_NAME "Generic")
+set(CMAKE_SYSTEM_NAME "Linux")
 set(CMAKE_SYSTEM_PROCESSOR ${ARCH})

 # Bin directory


CMake: Remove support for LLVM and Clang packages

--- cmake/external_llvm.cmake
+++ cmake/external_llvm.cmake
@@ -13,82 +13,42 @@

 include(ExternalProject)

-find_package(LLVM CONFIG)
+if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND
+    (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows"))
+    message(STATUS "Fetching LLVM from llvm.org")
+    set(LLVM_RELEASE_URL http://releases.llvm.org/5.0.0/clang+llvm-5.0.0-linux-x86_64-ubuntu16.04.tar.xz)

-set(LLVM_PACKAGED FALSE)
+    # Override default LLVM binaries
+    if(PREBUILT_LLVM)
+        set(LLVM_RELEASE_URL ${PREBUILT_LLVM})
+    endif()

-if(LLVM_FOUND)
-    if(${LLVM_PACKAGE_VERSION} VERSION_GREATER "4.0")
-        message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
-        set(LLVM_PACKAGED TRUE)
+    # The 'BUILD_BYPRODUCTS' argument was introduced in CMake 3.2.
+    if(${CMAKE_VERSION} VERSION_LESS 3.2)
+        ExternalProject_Add(
+            ext_llvm
+            URL ${LLVM_RELEASE_URL}
+            CONFIGURE_COMMAND ""
+            BUILD_COMMAND ""
+            INSTALL_COMMAND ""
+            UPDATE_COMMAND ""
+            )
     else()
-        message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION} but need atleast 4.0")
-        set(LLVM_FOUND FALSE)
+        ExternalProject_Add(
+            ext_llvm
+            URL ${LLVM_RELEASE_URL}
+            CONFIGURE_COMMAND ""
+            BUILD_COMMAND ""
+            INSTALL_COMMAND ""
+            UPDATE_COMMAND ""
+            BUILD_BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/ext_llvm-prefix/src/ext_llvm/lib/libLLVMCore.a"
+            )
     endif()
+
+    ExternalProject_Get_Property(ext_llvm source_dir)
+    set(LLVM_INCLUDE_DIR "${source_dir}/include" PARENT_SCOPE)
+    set(LLVM_LIB_DIR "${source_dir}/lib" PARENT_SCOPE)
+
+    set(LLVM_LINK_LIBS clangTooling clangFrontendTool clangFrontend clangDriver clangSerialization clangCodeGen clangParse clangSema clangStaticAnalyzerFrontend clangStaticAnalyzerCheckers clangStaticAnalyzerCore clangAnalysis clangARCMigrate clangRewriteFrontend clangEdit clangAST clangLex clangBasic LLVMLTO LLVMPasses LLVMObjCARCOpts LLVMSymbolize LLVMDebugInfoPDB LLVMDebugInfoDWARF LLVMMIRParser LLVMCoverage LLVMTableGen LLVMDlltoolDriver LLVMOrcJIT LLVMXCoreDisassembler LLVMXCoreCodeGen LLVMXCoreDesc LLVMXCoreInfo LLVMXCoreAsmPrinter LLVMSystemZDisassembler LLVMSystemZCodeGen LLVMSystemZAsmParser LLVMSystemZDesc LLVMSystemZInfo LLVMSystemZAsmPrinter LLVMSparcDisassembler LLVMSparcCodeGen LLVMSparcAsmParser LLVMSparcDesc LLVMSparcInfo LLVMSparcAsmPrinter LLVMPowerPCDisassembler LLVMPowerPCCodeGen LLVMPowerPCAsmParser LLVMPowerPCDesc LLVMPowerPCInfo LLVMPowerPCAsmPrinter LLVMNVPTXCodeGen LLVMNVPTXDesc LLVMNVPTXInfo LLVMNVPTXAsmPrinter LLVMMSP430CodeGen LLVMMSP430Desc LLVMMSP430Info LLVMMSP430AsmPrinter LLVMMipsDisassembler LLVMMipsCodeGen LLVMMipsAsmParser LLVMMipsDesc LLVMMipsInfo LLVMMipsAsmPrinter LLVMLanaiDisassembler LLVMLanaiCodeGen LLVMLanaiAsmParser LLVMLanaiDesc LLVMLanaiAsmPrinter LLVMLanaiInfo LLVMHexagonDisassembler LLVMHexagonCodeGen LLVMHexagonAsmParser LLVMHexagonDesc LLVMHexagonInfo LLVMBPFDisassembler LLVMBPFCodeGen LLVMBPFDesc LLVMBPFInfo LLVMBPFAsmPrinter LLVMARMDisassembler LLVMARMCodeGen LLVMARMAsmParser LLVMARMDesc LLVMARMInfo LLVMARMAsmPrinter LLVMAMDGPUDisassembler LLVMAMDGPUCodeGen LLVMAMDGPUAsmParser LLVMAMDGPUDesc LLVMAMDGPUInfo LLVMAMDGPUAsmPrinter LLVMAMDGPUUtils LLVMAArch64Disassembler LLVMAArch64CodeGen LLVMAArch64AsmParser LLVMAArch64Desc LLVMAArch64Info LLVMAArch64AsmPrinter LLVMAArch64Utils LLVMObjectYAML LLVMLibDriver LLVMOption LLVMX86Disassembler LLVMX86AsmParser LLVMX86CodeGen LLVMGlobalISel LLVMSelectionDAG LLVMAsmPrinter LLVMDebugInfoCodeView LLVMDebugInfoMSF LLVMX86Desc LLVMMCDisassembler LLVMX86Info LLVMX86AsmPrinter LLVMX86Utils LLVMMCJIT LLVMLineEditor LLVMInterpreter LLVMExecutionEngine LLVMRuntimeDyld LLVMCodeGen LLVMTarget LLVMCoroutines LLVMipo LLVMInstrumentation LLVMVectorize LLVMScalarOpts LLVMLinker LLVMIRReader LLVMAsmParser LLVMInstCombine LLVMTransformUtils LLVMBitWriter LLVMAnalysis LLVMProfileData LLVMObject LLVMMCParser LLVMMC LLVMBitReader LLVMCore LLVMBinaryFormat LLVMSupport LLVMDemangle tinfo z m PARENT_SCOPE)
+
 endif()
-
-if(NOT LLVM_FOUND)
-    if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND
-       (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows"))
-        message(STATUS "Fetching LLVM from llvm.org")
-        set(LLVM_RELEASE_URL http://releases.llvm.org/5.0.0/clang+llvm-5.0.0-linux-x86_64-ubuntu16.04.tar.xz)
-
-        # Override default LLVM binaries
-        if(PREBUILT_LLVM)
-            set(LLVM_RELEASE_URL ${PREBUILT_LLVM})
-        endif()
-
-        # The 'BUILD_BYPRODUCTS' argument was introduced in CMake 3.2.
-        if(${CMAKE_VERSION} VERSION_LESS 3.2)
-            ExternalProject_Add(
-                ext_llvm
-                URL ${LLVM_RELEASE_URL}
-                CONFIGURE_COMMAND ""
-                BUILD_COMMAND ""
-                INSTALL_COMMAND ""
-                UPDATE_COMMAND ""
-                )
-        else()
-            ExternalProject_Add(
-                ext_llvm
-                URL ${LLVM_RELEASE_URL}
-                CONFIGURE_COMMAND ""
-                BUILD_COMMAND ""
-                INSTALL_COMMAND ""
-                UPDATE_COMMAND ""
-                BUILD_BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/ext_llvm-prefix/src/ext_llvm/lib/libLLVMCore.a"
-                )
-        endif()
-
-        ExternalProject_Get_Property(ext_llvm source_dir)
-        set(LLVM_INCLUDE_DIR "${source_dir}/include")
-        set(LLVM_LIB_DIR "${source_dir}/lib")
-
-        set(LLVM_LINK_LIBS clangTooling clangFrontendTool clangFrontend clangDriver clangSerialization clangCodeGen clangParse clangSema clangStaticAnalyzerFrontend clangStaticAnalyzerCheckers clangStaticAnalyzerCore clangAnalysis clangARCMigrate clangRewriteFrontend clangEdit clangAST clangLex clangBasic LLVMLTO LLVMPasses LLVMObjCARCOpts LLVMSymbolize LLVMDebugInfoPDB LLVMDebugInfoDWARF LLVMMIRParser LLVMCoverage LLVMTableGen LLVMDlltoolDriver LLVMOrcJIT LLVMXCoreDisassembler LLVMXCoreCodeGen LLVMXCoreDesc LLVMXCoreInfo LLVMXCoreAsmPrinter LLVMSystemZDisassembler LLVMSystemZCodeGen LLVMSystemZAsmParser LLVMSystemZDesc LLVMSystemZInfo LLVMSystemZAsmPrinter LLVMSparcDisassembler LLVMSparcCodeGen LLVMSparcAsmParser LLVMSparcDesc LLVMSparcInfo LLVMSparcAsmPrinter LLVMPowerPCDisassembler LLVMPowerPCCodeGen LLVMPowerPCAsmParser LLVMPowerPCDesc LLVMPowerPCInfo LLVMPowerPCAsmPrinter LLVMNVPTXCodeGen LLVMNVPTXDesc LLVMNVPTXInfo LLVMNVPTXAsmPrinter LLVMMSP430CodeGen LLVMMSP430Desc LLVMMSP430Info LLVMMSP430AsmPrinter LLVMMipsDisassembler LLVMMipsCodeGen LLVMMipsAsmParser LLVMMipsDesc LLVMMipsInfo LLVMMipsAsmPrinter LLVMLanaiDisassembler LLVMLanaiCodeGen LLVMLanaiAsmParser LLVMLanaiDesc LLVMLanaiAsmPrinter LLVMLanaiInfo LLVMHexagonDisassembler LLVMHexagonCodeGen LLVMHexagonAsmParser LLVMHexagonDesc LLVMHexagonInfo LLVMBPFDisassembler LLVMBPFCodeGen LLVMBPFDesc LLVMBPFInfo LLVMBPFAsmPrinter LLVMARMDisassembler LLVMARMCodeGen LLVMARMAsmParser LLVMARMDesc LLVMARMInfo LLVMARMAsmPrinter LLVMAMDGPUDisassembler LLVMAMDGPUCodeGen LLVMAMDGPUAsmParser LLVMAMDGPUDesc LLVMAMDGPUInfo LLVMAMDGPUAsmPrinter LLVMAMDGPUUtils LLVMAArch64Disassembler LLVMAArch64CodeGen LLVMAArch64AsmParser LLVMAArch64Desc LLVMAArch64Info LLVMAArch64AsmPrinter LLVMAArch64Utils LLVMObjectYAML LLVMLibDriver LLVMOption LLVMX86Disassembler LLVMX86AsmParser LLVMX86CodeGen LLVMGlobalISel LLVMSelectionDAG LLVMAsmPrinter LLVMDebugInfoCodeView LLVMDebugInfoMSF LLVMX86Desc LLVMMCDisassembler LLVMX86Info LLVMX86AsmPrinter LLVMX86Utils LLVMMCJIT LLVMLineEditor LLVMInterpreter LLVMExecutionEngine LLVMRuntimeDyld LLVMCodeGen LLVMTarget LLVMCoroutines LLVMipo LLVMInstrumentation LLVMVectorize LLVMScalarOpts LLVMLinker LLVMIRReader LLVMAsmParser LLVMInstCombine LLVMTransformUtils LLVMBitWriter LLVMAnalysis LLVMProfileData LLVMObject LLVMMCParser LLVMMC LLVMBitReader LLVMCore LLVMBinaryFormat LLVMSupport LLVMDemangle tinfo z m)
-        set(LLVM_FOUND TRUE)
-        set(Clang_FOUND TRUE)
-    endif()
-endif()
-
-if(LLVM_FOUND AND NOT Clang_FOUND)
-    find_package(Clang CONFIG)
-endif()
-
-# TODO: Figure out if this terminates the build or do we allow interpretation-only builds
-#if(NOT LLVM_FOUND OR NOT Clang_FOUND)
-#endif()
-
-# Populate header and library paths from package-exported info
-# if we found system-level LLVM and Clang packages
-if(LLVM_FOUND AND NOT LLVM_INCLUDE_DIR)
-    set(LLVM_INCLUDE_DIR ${LLVM_INCLUDE_DIRS})
-    set(LLVM_LIB_DIR ${LLVM_LIBRARY_DIRS})
-    llvm_map_components_to_libnames(llvm_libs support core engine)
-    set(LLVM_LINK_LIBS ${llvm_libs})
-endif()
-
-# Export all necessary info
-set(LLVM_INCLUDE_DIR ${LLVM_INCLUDE_DIR} PARENT_SCOPE)
-set(LLVM_LIB_DIR ${LLVM_LIB_DIR} PARENT_SCOPE)
-set(LLVM_LINK_LIBS ${LLVM_LINK_LIBS} PARENT_SCOPE)
-set(LLVM_PACKAGED ${LLVM_PACKAGED} PARENT_SCOPE)


build: enable out_null on Windows (#1124)

Since out_null is already Windows-compatible without any modifications,
this patch enables the compilation on Windows.

I confirmed it works fine on my Windows machine.

Signed-off-by: Fujimoto Seiji <ef879192bb1e41d519c82cf76440dc8e9a530806@clear-code.com>

--- cmake/windows-setup.cmake
+++ cmake/windows-setup.cmake
@@ -57,7 +57,7 @@
 set(FLB_OUT_STACKDRIVER        No)
 set(FLB_OUT_STDOUT            Yes)
 set(FLB_OUT_LIB                No)
-set(FLB_OUT_NULL               No)
+set(FLB_OUT_NULL              Yes)
 set(FLB_OUT_FLOWCOUNTER       Yes)
 set(FLB_OUT_KAFKA              No)
 set(FLB_OUT_KAFKA_REST         No)


windows: enabled firehose, kinesis streams, and aws filter for Windows

Presently, the Windows build does not include-
- Kinesis Firehose output plugin
- Kinesis Streams output plugin
- AWS Filter

We are adding the same to the cmake config for Windows.

Signed-off-by: Harsh Rawat <d1a8025d48317ac3926de18b7e21f64e289e292c@amazon.com>

--- cmake/windows-setup.cmake
+++ cmake/windows-setup.cmake
@@ -75,7 +75,8 @@
   set(FLB_OUT_KAFKA_REST         No)
   set(FLB_OUT_CLOUDWATCH_LOGS   Yes)
   set(FLB_OUT_S3                Yes)
-  set(FLB_OUT_KINESIS_FIREHOSE   No)
+  set(FLB_OUT_KINESIS_FIREHOSE   Yes)
+  set(FLB_OUT_KINESIS_STREAMS   Yes)

   # FILTER plugins
   # ==============
@@ -91,6 +92,7 @@
   set(FLB_FILTER_RECORD_MODIFIER Yes)
   set(FLB_FILTER_REWRITE_TAG    Yes)
   set(FLB_FILTER_GEOIP2         Yes)
+  set(FLB_FILTER_AWS         Yes)
 endif()

 # Search bison and flex executables


build: enable OUT_FORWARD on Windows

build: enable OUT_FORWARD on Windows

The out_forward plugin can be compiled and linked on Windows by now.
Just enable it.

Signed-off-by: Fujimoto Seiji <ef879192bb1e41d519c82cf76440dc8e9a530806@clear-code.com>

--- cmake/windows-setup.cmake
+++ cmake/windows-setup.cmake
@@ -45,7 +45,7 @@
 set(FLB_OUT_COUNTER           Yes)
 set(FLB_OUT_ES                Yes)
 set(FLB_OUT_EXIT               No)
-set(FLB_OUT_FORWARD            No)
+set(FLB_OUT_FORWARD           Yes)
 set(FLB_OUT_GELF               No)
 set(FLB_OUT_HTTP              Yes)
 set(FLB_OUT_INFLUXDB           No)


make possible to override projects on the cmake line

--- kitchen/kitchen.cmake
+++ kitchen/kitchen.cmake
@@ -24,10 +24,10 @@

   setup_virtualenv(${PROJECT_NAME})

-  set(KITCHEN_PROJECTS "ecto;${ARGN}")
   if (NOT KITCHEN_PROJECTS)
-    message(FATAL_ERROR no kitchen projects found?!?)
+    set(KITCHEN_PROJECTS "ecto;${ARGN}")
   endif()
+
   string(REPLACE ";" " " KITCHEN_PROJECTS_STR "${KITCHEN_PROJECTS}")
   message(STATUS "Initializing kitchen with projects ${KITCHEN_PROJECTS_STR}")


Typo.

Typo.

--- runtime/hipacc_cu.hpp.cmake
+++ runtime/hipacc_cu.hpp.cmake
@@ -513,7 +513,7 @@
         offset += offset % size;
     }
     cudaError_t err = cudaSetupArgument(arg, size, offset);
-    checkErr(err, "clSetKernelArg()");
+    checkErr(err, "cudaSetupArgument()");
     offset += size;
 }


CUDA runtime requires at least CUDA 7.0

CUDA runtime requires at least CUDA 7.0

--- runtime/hipacc_cu.hpp.cmake
+++ runtime/hipacc_cu.hpp.cmake
@@ -29,8 +29,8 @@

 #include <cuda.h>

-#if CUDA_VERSION < 6050
-    #error "CUDA 6.5 or higher required!"
+#if CUDA_VERSION < 7000
+    #error "CUDA 7.0 or higher required!"
 #endif

 #cmakedefine NVML_FOUND