py/mkrules.cmake: Rename QSTR_DEFS variables to QSTRDEFS.

And also MICROPY_PY_QSTRDEFS to MICROPY_QSTRDEFS_PY.  These variables are
all related.

Signed-off-by: Damien George <99e6b749acbfbe2a596df99e91d24d6e1fdbee00@micropython.org>

--- py/mkrules.cmake
+++ py/mkrules.cmake
@@ -1,14 +1,14 @@
 # CMake fragment for MicroPython rules

-set(MICROPY_PY_QSTRDEFS "${MICROPY_PY_DIR}/qstrdefs.h")
 set(MICROPY_GENHDR_DIR "${CMAKE_BINARY_DIR}/genhdr")
 set(MICROPY_MPVERSION "${MICROPY_GENHDR_DIR}/mpversion.h")
 set(MICROPY_MODULEDEFS "${MICROPY_GENHDR_DIR}/moduledefs.h")
-set(MICROPY_QSTR_DEFS_LAST "${MICROPY_GENHDR_DIR}/qstr.i.last")
-set(MICROPY_QSTR_DEFS_SPLIT "${MICROPY_GENHDR_DIR}/qstr.split")
-set(MICROPY_QSTR_DEFS_COLLECTED "${MICROPY_GENHDR_DIR}/qstrdefs.collected.h")
-set(MICROPY_QSTR_DEFS_PREPROCESSED "${MICROPY_GENHDR_DIR}/qstrdefs.preprocessed.h")
-set(MICROPY_QSTR_DEFS_GENERATED "${MICROPY_GENHDR_DIR}/qstrdefs.generated.h")
+set(MICROPY_QSTRDEFS_PY "${MICROPY_PY_DIR}/qstrdefs.h")
+set(MICROPY_QSTRDEFS_LAST "${MICROPY_GENHDR_DIR}/qstr.i.last")
+set(MICROPY_QSTRDEFS_SPLIT "${MICROPY_GENHDR_DIR}/qstr.split")
+set(MICROPY_QSTRDEFS_COLLECTED "${MICROPY_GENHDR_DIR}/qstrdefs.collected.h")
+set(MICROPY_QSTRDEFS_PREPROCESSED "${MICROPY_GENHDR_DIR}/qstrdefs.preprocessed.h")
+set(MICROPY_QSTRDEFS_GENERATED "${MICROPY_GENHDR_DIR}/qstrdefs.generated.h")

 # Provide defaults for preprocessor flags if not already defined
 if(NOT MICROPY_CPP_FLAGS)
@@ -33,7 +33,7 @@

 target_sources(${MICROPY_TARGET} PRIVATE
     ${MICROPY_MPVERSION}
-    ${MICROPY_QSTR_DEFS_GENERATED}
+    ${MICROPY_QSTRDEFS_GENERATED}
 )

 # Command to force the build of another command
@@ -68,7 +68,7 @@
 # It only needs to be passed the list of MICROPY_SOURCE_QSTR files that have changed since
 # it was last run, but it looks like it's not possible to specify that with cmake.
 add_custom_command(
-    OUTPUT ${MICROPY_QSTR_DEFS_LAST}
+    OUTPUT ${MICROPY_QSTRDEFS_LAST}
     COMMAND ${Python3_EXECUTABLE} ${MICROPY_PY_DIR}/makeqstrdefs.py pp ${CMAKE_C_COMPILER} -E output ${MICROPY_GENHDR_DIR}/qstr.i.last cflags ${MICROPY_CPP_FLAGS} -DNO_QSTR sources ${MICROPY_SOURCE_QSTR}
     DEPENDS ${MICROPY_MODULEDEFS}
         ${MICROPY_SOURCE_QSTR}
@@ -77,34 +77,34 @@
 )

 add_custom_command(
-    OUTPUT ${MICROPY_QSTR_DEFS_SPLIT}
+    OUTPUT ${MICROPY_QSTRDEFS_SPLIT}
     COMMAND ${Python3_EXECUTABLE} ${MICROPY_PY_DIR}/makeqstrdefs.py split qstr ${MICROPY_GENHDR_DIR}/qstr.i.last ${MICROPY_GENHDR_DIR}/qstr _
-    COMMAND touch ${MICROPY_QSTR_DEFS_SPLIT}
-    DEPENDS ${MICROPY_QSTR_DEFS_LAST}
+    COMMAND touch ${MICROPY_QSTRDEFS_SPLIT}
+    DEPENDS ${MICROPY_QSTRDEFS_LAST}
     VERBATIM
     COMMAND_EXPAND_LISTS
 )

 add_custom_command(
-    OUTPUT ${MICROPY_QSTR_DEFS_COLLECTED}
-    COMMAND ${Python3_EXECUTABLE} ${MICROPY_PY_DIR}/makeqstrdefs.py cat qstr _ ${MICROPY_GENHDR_DIR}/qstr ${MICROPY_QSTR_DEFS_COLLECTED}
-    DEPENDS ${MICROPY_QSTR_DEFS_SPLIT}
+    OUTPUT ${MICROPY_QSTRDEFS_COLLECTED}
+    COMMAND ${Python3_EXECUTABLE} ${MICROPY_PY_DIR}/makeqstrdefs.py cat qstr _ ${MICROPY_GENHDR_DIR}/qstr ${MICROPY_QSTRDEFS_COLLECTED}
+    DEPENDS ${MICROPY_QSTRDEFS_SPLIT}
     VERBATIM
     COMMAND_EXPAND_LISTS
 )

 add_custom_command(
-    OUTPUT ${MICROPY_QSTR_DEFS_PREPROCESSED}
-    COMMAND cat ${MICROPY_PY_QSTRDEFS} ${MICROPY_QSTR_DEFS_COLLECTED} | sed "s/^Q(.*)/\"&\"/" | ${CMAKE_C_COMPILER} -E ${MICROPY_CPP_FLAGS} - | sed "s/^\\\"\\(Q(.*)\\)\\\"/\\1/" > ${MICROPY_QSTR_DEFS_PREPROCESSED}
-    DEPENDS ${MICROPY_QSTR_DEFS_COLLECTED}
+    OUTPUT ${MICROPY_QSTRDEFS_PREPROCESSED}
+    COMMAND cat ${MICROPY_QSTRDEFS_PY} ${MICROPY_QSTRDEFS_COLLECTED} | sed "s/^Q(.*)/\"&\"/" | ${CMAKE_C_COMPILER} -E ${MICROPY_CPP_FLAGS} - | sed "s/^\\\"\\(Q(.*)\\)\\\"/\\1/" > ${MICROPY_QSTRDEFS_PREPROCESSED}
+    DEPENDS ${MICROPY_QSTRDEFS_COLLECTED}
     VERBATIM
     COMMAND_EXPAND_LISTS
 )

 add_custom_command(
-    OUTPUT ${MICROPY_QSTR_DEFS_GENERATED}
-    COMMAND ${Python3_EXECUTABLE} ${MICROPY_PY_DIR}/makeqstrdata.py ${MICROPY_QSTR_DEFS_PREPROCESSED} > ${MICROPY_QSTR_DEFS_GENERATED}
-    DEPENDS ${MICROPY_QSTR_DEFS_PREPROCESSED}
+    OUTPUT ${MICROPY_QSTRDEFS_GENERATED}
+    COMMAND ${Python3_EXECUTABLE} ${MICROPY_PY_DIR}/makeqstrdata.py ${MICROPY_QSTRDEFS_PREPROCESSED} > ${MICROPY_QSTRDEFS_GENERATED}
+    DEPENDS ${MICROPY_QSTRDEFS_PREPROCESSED}
     VERBATIM
     COMMAND_EXPAND_LISTS
 )
@@ -127,7 +127,7 @@
         OUTPUT ${MICROPY_FROZEN_CONTENT}
         COMMAND ${Python3_EXECUTABLE} ${MICROPY_DIR}/tools/makemanifest.py -o ${MICROPY_FROZEN_CONTENT} -v "MPY_DIR=${MICROPY_DIR}" -v "PORT_DIR=${MICROPY_PORT_DIR}" -b "${CMAKE_BINARY_DIR}" -f${MICROPY_CROSS_FLAGS} ${MICROPY_FROZEN_MANIFEST}
         DEPENDS MICROPY_FORCE_BUILD
-            ${MICROPY_QSTR_DEFS_GENERATED}
+            ${MICROPY_QSTRDEFS_GENERATED}
         VERBATIM
     )
 endif()


several cmake -> compilation failure on mac

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@1069 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/LibraryProjectSetup.cmake
+++ Numerics/cmake/LibraryProjectSetup.cmake
@@ -102,8 +102,22 @@

   INCLUDE_DIRECTORIES(${_ALL_DIRS})

+  IF(APPLE)
+    SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -Wl,-search_paths_first")
+    IF(FORTRAN_COMPILER_LIB_DIRECTORIES)
+      REMEMBER_LINK_DIRECTORIES("${FORTRAN_COMPILER_LIB_DIRECTORIES}")
+    ENDIF(FORTRAN_COMPILER_LIB_DIRECTORIES)
+  ENDIF(APPLE)
+
   ADD_LIBRARY(${PROJECT_NAME}_static  STATIC ${_ALL_FILES})
   ADD_LIBRARY(${PROJECT_NAME}_shared  SHARED ${_ALL_FILES})
+
+  IF(APPLE)
+    IF(FORTRAN_LIBRARIES)
+      TARGET_LINK_LIBRARIES(${PROJECT_NAME}_static ${FORTRAN_LIBRARIES})
+      TARGET_LINK_LIBRARIES(${PROJECT_NAME}_shared ${FORTRAN_LIBRARIES})
+    ENDIF(FORTRAN_LIBRARIES)
+  ENDIF(APPLE)

   SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES
     OUTPUT_NAME "${PROJECT_NAME}"
@@ -120,15 +134,6 @@
   TARGET_LINK_LIBRARIES(${PROJECT_NAME}_static ${${PROJECT_NAME}_LINK_LIBRARIES})
   TARGET_LINK_LIBRARIES(${PROJECT_NAME}_shared ${${PROJECT_NAME}_LINK_LIBRARIES})

-  IF(APPLE)
-    SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -Wl,-search_paths_first")
-    IF(FORTRAN_LIBRARIES)
-      LINK_DIRECTORIES(${FORTRAN_COMPILER_LIB_DIRECTORIES})
-      TARGET_LINK_LIBRARIES(${PROJECT_NAME}_static ${FORTRAN_LIBRARIES})
-      TARGET_LINK_LIBRARIES(${PROJECT_NAME}_shared ${FORTRAN_LIBRARIES})
-    ENDIF(FORTRAN_LIBRARIES)
-  ENDIF(APPLE)
-
   # output in ${PROJECT_NAME}_STATIC|SHARED_LIB the path of the libraries
   GET_TARGET_PROPERTY(${PROJECT_NAME}_STATIC_LIB ${PROJECT_NAME}_static LOCATION)
   GET_TARGET_PROPERTY(${PROJECT_NAME}_SHARED_LIB ${PROJECT_NAME}_shared LOCATION)


Avoid using ExternalProject_Add for tests.

--- CMake/mitkTestProjectTemplate.cmake
+++ CMake/mitkTestProjectTemplate.cmake
@@ -2,46 +2,49 @@

   include(ExternalProject)

-  set(proj MITK-ProjectTemplate)
-  set(MITK-ProjectTemplate_BINARY_DIR "${MITK_BINARY_DIR}/${proj}-build")
+  set(proj PT) # Means ProjectTemplate (use a short name due to Windows limitations)
+  set(MITK-ProjectTemplate_SOURCE_DIR "${MITK_BINARY_DIR}/${proj}")
+  set(MITK-ProjectTemplate_BINARY_DIR "${MITK_BINARY_DIR}/${proj}-bin")
+
+  add_test(NAME mitkProjectTemplateRmSrcTest
+           COMMAND ${CMAKE_COMMAND} -E remove_directory "${MITK-ProjectTemplate_SOURCE_DIR}"
+          )
+  set_tests_properties(mitkProjectTemplateRmSrcTest PROPERTIES
+                       LABELS "MITK;BlueBerry")

-  ExternalProject_Add(${proj}
-    GIT_REPOSITORY http://git.mitk.org/MITK-ProjectTemplate.git
-    GIT_TAG origin/master
-    SOURCE_DIR "${MITK_BINARY_DIR}/${proj}"
-    BINARY_DIR "${MITK-ProjectTemplate_BINARY_DIR}"
-    PREFIX "${proj}-cmake"
-    BUILD_COMMAND ""
-    INSTALL_COMMAND ""
-    CMAKE_GENERATOR "${CMAKE_GENERATOR}"
-    CMAKE_ARGS
-      -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
-      -DMITK_DIR:PATH=${MITK_BINARY_DIR}
-      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-      -DAwesomeProject_BUILD_ALL_PLUGINS:BOOL=ON
-      -DAwesomeProject_BUILD_ALL_APPS:BOOL=ON
-  )
-
-  add_test(NAME mitkProjectTemplateCleanTest
+  add_test(NAME mitkProjectTemplateRmBinTest
            COMMAND ${CMAKE_COMMAND} -E remove_directory "${MITK-ProjectTemplate_BINARY_DIR}"
           )
-  set_tests_properties(mitkProjectTemplateCleanTest PROPERTIES
+  set_tests_properties(mitkProjectTemplateRmBinTest PROPERTIES
                        LABELS "MITK;BlueBerry")

-  add_test(NAME mitkProjectTemplateCleanTest2
+  add_test(NAME mitkProjectTemplateMakeBinTest
            COMMAND ${CMAKE_COMMAND} -E make_directory "${MITK-ProjectTemplate_BINARY_DIR}"
           )
-  set_tests_properties(mitkProjectTemplateCleanTest2 PROPERTIES
-                       DEPENDS mitkProjectTemplateCleanTest
+  set_tests_properties(mitkProjectTemplateMakeBinTest PROPERTIES
+                       DEPENDS mitkProjectTemplateRmBinTest
                        LABELS "MITK;BlueBerry")
-
+
+  add_test(NAME mitkProjectTemplateCloneTest
+           COMMAND ${GIT_EXECUTABLE} clone http://git.mitk.org/MITK-ProjectTemplate.git ${MITK-ProjectTemplate_SOURCE_DIR}
+          )
+  set_tests_properties(mitkProjectTemplateCloneTest PROPERTIES
+                       DEPENDS mitkProjectTemplateRmSrcTest
+                       LABELS "MITK;BlueBerry")

   if(CMAKE_CONFIGURATION_TYPES)
     foreach(config ${CMAKE_CONFIGURATION_TYPES})
       add_test(NAME mitkProjectTemplateConfigureTest-${config} CONFIGURATIONS ${config}
-               COMMAND ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --config ${config} --target ${proj})
+               WORKING_DIRECTORY "${MITK-ProjectTemplate_BINARY_DIR}"
+               COMMAND ${CMAKE_COMMAND} -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
+                                        -DMITK_DIR:PATH=${MITK_BINARY_DIR}
+                                        -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+                                        -DCMAKE_GENERATOR=${CMAKE_GENERATOR}
+                                        -DAwesomeProject_BUILD_ALL_PLUGINS:BOOL=ON
+                                        -DAwesomeProject_BUILD_ALL_APPS:BOOL=ON
+                                        "${MITK-ProjectTemplate_SOURCE_DIR}")
       set_tests_properties(mitkProjectTemplateConfigureTest-${config} PROPERTIES
-                           DEPENDS mitkProjectTemplateCleanTest2
+                           DEPENDS "mitkProjectTemplateCloneTest;mitkProjectTemplateMakeBinTest"
                            LABELS "MITK;BlueBerry")

       add_test(NAME mitkProjectTemplateBuildTest-${config} CONFIGURATIONS ${config}
@@ -52,9 +55,15 @@
     endforeach()
   else()
     add_test(NAME mitkProjectTemplateConfigureTest-${CMAKE_BUILD_TYPE}
-             COMMAND ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --config ${CMAKE_BUILD_TYPE} --target ${proj})
+             WORKING_DIRECTORY "${MITK-ProjectTemplate_BINARY_DIR}"
+             COMMAND ${CMAKE_COMMAND} -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
+                                      -DMITK_DIR:PATH=${MITK_BINARY_DIR}
+                                      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+                                      -DAwesomeProject_BUILD_ALL_PLUGINS:BOOL=ON
+                                      -DAwesomeProject_BUILD_ALL_APPS:BOOL=ON
+                                      "${MITK-ProjectTemplate_SOURCE_DIR}")
     set_tests_properties(mitkProjectTemplateConfigureTest-${CMAKE_BUILD_TYPE} PROPERTIES
-                         DEPENDS mitkProjectTemplateCleanTest2
+                         DEPENDS "mitkProjectTemplateCloneTest;mitkProjectTemplateMakeBinTest"
                          LABELS "MITK;BlueBerry")

     add_test(NAME mitkProjectTemplateBuildTest-${CMAKE_BUILD_TYPE}


Add BlueBerry label to ProjectTemplate tests.

--- CMake/mitkTestProjectTemplate.cmake
+++ CMake/mitkTestProjectTemplate.cmake
@@ -26,7 +26,7 @@
   add_test(mitkProjectTemplateBuildTest
            ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --target MITK-ProjectTemplateBuildTest)
   set_tests_properties(mitkProjectTemplateBuildTest PROPERTIES
-                       LABELS MITK)
+                       LABELS MITK BlueBerry)

   add_custom_target(MITK-ProjectTemplatePackageTest
@@ -43,7 +43,7 @@

   set_tests_properties(mitkProjectTemplatePackageTest PROPERTIES
                        DEPENDS mitkProjectTemplateBuildTest
-                       LABELS MITK)
+                       LABELS MITK BlueBerry)

 endif()


fpta-cmake: more checks for git output.

fpta-cmake: more checks for git output.

--- cmake.fpta/utils.cmake
+++ cmake.fpta/utils.cmake
@@ -51,8 +51,8 @@
       OUTPUT_STRIP_TRAILING_WHITESPACE
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
       RESULT_VARIABLE rc)
-    if(rc)
-      message(FATAL_ERROR "Please install latest version of git ('describe --tags --long --dirty' failed)")
+    if(rc OR "${name}_GIT_DESCRIBE" STREQUAL "")
+      message(FATAL_ERROR "Please fetch tags and/or install latest version of git ('describe --tags --long --dirty' failed)")
     endif()

     execute_process(COMMAND ${GIT} show --no-patch --format=%cI HEAD
@@ -76,7 +76,7 @@
       OUTPUT_STRIP_TRAILING_WHITESPACE
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
       RESULT_VARIABLE rc)
-    if(rc)
+    if(rc OR "${name}_GIT_TREE" STREQUAL "")
       message(FATAL_ERROR "Please install latest version of git ('show --no-patch --format=%T HEAD' failed)")
     endif()

@@ -85,7 +85,7 @@
       OUTPUT_STRIP_TRAILING_WHITESPACE
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
       RESULT_VARIABLE rc)
-    if(rc)
+    if(rc OR "${name}_GIT_COMMIT" STREQUAL "")
       message(FATAL_ERROR "Please install latest version of git ('show --no-patch --format=%H HEAD' failed)")
     endif()

@@ -94,7 +94,7 @@
       OUTPUT_STRIP_TRAILING_WHITESPACE
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
       RESULT_VARIABLE rc)
-    if(rc)
+    if(rc OR "${name}_GIT_REVISION" STREQUAL "")
       message(FATAL_ERROR "Please install latest version of git ('rev-list --count --no-merges HEAD' failed)")
     endif()


first step to support MSVC

first step to support MSVC

--- cmake/EmbedGtest.cmake
+++ cmake/EmbedGtest.cmake
@@ -16,7 +16,7 @@
   URL http://googletest.googlecode.com/files/gtest-1.7.0.zip
   URL_MD5 2d6ec8ccdf5c46b05ba54a9fd1d130d7
   PREFIX "${CMAKE_CURRENT_BINARY_DIR}/gtest"
-  CMAKE_ARGS -Dgtest_disable_pthreads=ON ${GTEST_ADDITIONAL_CMAKE_ARGS}
+  CMAKE_ARGS -Dgtest_disable_pthreads=ON -Dgtest_force_shared_crt=ON ${GTEST_ADDITIONAL_CMAKE_ARGS}
   INSTALL_COMMAND ""
 )

@@ -24,7 +24,14 @@
 ExternalProject_Get_Property(project_gtest BINARY_DIR)

 add_library(gtest STATIC IMPORTED)
-set_property(TARGET gtest PROPERTY IMPORTED_LOCATION "${BINARY_DIR}/libgtest.a")
+
+set_property(TARGET gtest PROPERTY IMPORTED_LOCATION "${BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}")
+# Handling multi configurations for MSVC
+foreach( CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES} )
+  string(TOUPPER ${CONFIG_TYPE} UPPER_CONFIG_TYPE)
+  set_property(TARGET gtest PROPERTY IMPORTED_LOCATION_${UPPER_CONFIG_TYPE} "${BINARY_DIR}/${CONFIG_TYPE}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}")
+endforeach()
+
 add_dependencies(gtest project_gtest)

 set(GTEST_INCLUDE_DIR "${SOURCE_DIR}/include")


LIB64 is not necessarily defined on Windows, prevent CMake errors

--- cmake/FindDCMTK2.cmake
+++ cmake/FindDCMTK2.cmake
@@ -53,10 +53,12 @@

 get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)

-if (${LIB64} STREQUAL "TRUE")
+set(LIBSUFFIX
+)
+if (DEFINED LIB64)
+  if (${LIB64} STREQUAL "TRUE")
     set(LIBSUFFIX 64)
-else()
-    set(LIBSUFFIX "")
+  endif()
 endif()

 FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd


Fix DPMJET CMake warning

Fix DPMJET CMake warning

--- cmake/FindDPMJET.cmake
+++ cmake/FindDPMJET.cmake
@@ -1,4 +1,4 @@
-message(STATUS "looking for DPMJET in \"${DPMJET}"\")
+message(STATUS "looking for DPMJET in \"${DPMJET}\"")

 find_library(DPMJET_LIB NAMES DPMJET PATHS ${DPMJET}/lib NO_DEFAULT_PATH)


cmake: search our preferred paths first

cmake: search our preferred paths first

--- cmake/FindGASNet.cmake
+++ cmake/FindGASNet.cmake
@@ -142,7 +142,10 @@
   endif()

   foreach(L IN LISTS LIBS)
-    find_library(GASNet_${L}_LIBRARY ${L} PATHS ${LDIRS})
+    find_library(GASNet_${L}_LIBRARY ${L} PATHS ${LDIRS} NO_DEFAULT_PATH)
+    if(NOT GASNet_${L}_LIBRARY)
+      find_library(GASNet_${L}_LIBRARY ${L})
+    endif()
     if(GASNet_${L}_LIBRARY)
       list(APPEND COMPONENT_DEPS "${GASNet_${L}_LIBRARY}")
     else()


Updated proton to be required in cmake detection

Signed-off-by: Frank Quinn <b81fea4778f144c02bf8eccb0f2c325a4dc652f4@cascadium.io>

--- cmake/FindProton.cmake
+++ cmake/FindProton.cmake
@@ -24,7 +24,7 @@
     SET(PROTON_LIBRARIES ${PROTON_LIBRARY})
     SET(PROTON_FOUND "YES")
 ELSE ()
-  SET(APR_FOUND "NO")
+    SET(PROTON_FOUND "NO")
 ENDIF ()

@@ -33,9 +33,9 @@
       MESSAGE(STATUS "Found Proton: ${PROTON_LIBRARIES}")
    ENDIF ()
 ELSE ()
-   IF (PROTON_FIND_REQUIRED)
+   IF (Proton_FIND_REQUIRED)
       MESSAGE(FATAL_ERROR "Could not find Proton library")
    ENDIF ()
 ENDIF ()

-FILE(GLOB PROTON_LIBRARY_FILES ${PROTON_LIBRARY}*)+FILE(GLOB PROTON_LIBRARY_FILES ${PROTON_LIBRARY}*)


PAR: adjusted lib order and line breaks

PAR: adjusted lib order and line breaks

--- cmake/GenParFile.cmake
+++ cmake/GenParFile.cmake
@@ -124,7 +124,11 @@
     COMMAND ${CMAKE_COMMAND} -E tar tf ${PARFILE}

     COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Enabling ${PARMODULE} from ROOT"
-    COMMAND env LD_LIBRARY_PATH=${ROOT_LIBDIR}:${CMAKE_INSTALL_PREFIX}/lib:$ENV{LD_LIBRARY_PATH} PATH=${ROOTSYS}/bin:$ENV{PATH} ALICE_ROOT=${CMAKE_INSTALL_PREFIX} root -l -b -q ${PARTESTMACRO}
+    COMMAND env
+      LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${ROOT_LIBDIR}:$ENV{LD_LIBRARY_PATH}
+      PATH=${ROOTSYS}/bin:$ENV{PATH}
+      ALICE_ROOT=${CMAKE_INSTALL_PREFIX}
+      root -l -b -q ${PARTESTMACRO}

     COMMAND ${CMAKE_COMMAND} -E remove_directory ${PARTESTDIR}


remove compilation with openmp

remove compilation with openmp

--- cmake/TaichiCore.cmake
+++ cmake/TaichiCore.cmake
@@ -83,14 +83,6 @@
     target_link_libraries(${LIBRARY_NAME} ${llvm_ptx_libs})
 endif()

-find_package(OpenMP)
-if(OpenMP_CXX_FOUND)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENMP_FOUND -DTLANG_WITH_OPENMP")
-    message("Found OpenMP.")
-else()
-    message("OpenMP not found.")
-endif()
-
 # add_executable(runtime runtime/runtime.cpp)

 # Optional dependencies


fix(cmake): Less specialized defaults

fix(cmake): Less specialized defaults

--- cmake/build/core.cmake
+++ cmake/build/core.cmake
@@ -21,14 +21,9 @@
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections")
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g2")
-
-# Linker flags
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
-set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -s")

 # Check compiler
 if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)


Added new services to build.

Added new services to build.

--- cmake/sdksCommon.cmake
+++ cmake/sdksCommon.cmake
@@ -22,6 +22,7 @@
 list(APPEND C2J_LIST "acm:2015-12-08")
 list(APPEND C2J_LIST "apigateway:2015-07-09")
 list(APPEND C2J_LIST "application-autoscaling:2016-02-06")
+list(APPEND C2J_LIST "AWSMigrationHub:2017-05-31")
 list(APPEND C2J_LIST "appstream:2016-12-01")
 list(APPEND C2J_LIST "athena:2017-05-18")
 list(APPEND C2J_LIST "autoscaling:2011-01-01")
@@ -43,6 +44,7 @@
 list(APPEND C2J_LIST "cognito-idp:2016-04-18")
 list(APPEND C2J_LIST "cognito-sync:2014-06-30")
 list(APPEND C2J_LIST "config:2014-11-12")
+list(APPEND C2J_LIST "cloudhsmv2:2017-04-28")
 list(APPEND C2J_LIST "cur:2017-01-06")
 list(APPEND C2J_LIST "datapipeline:2012-10-29")
 list(APPEND C2J_LIST "dax:2017-04-19")
@@ -72,6 +74,7 @@
 list(APPEND C2J_LIST "firehose:2015-08-04")
 list(APPEND C2J_LIST "gamelift:2015-10-01")
 list(APPEND C2J_LIST "glacier:2012-06-01")
+list(APPEND C2J_LIST "glue:2017-03-31")
 list(APPEND C2J_LIST "greengrass:2017-06-07")
 list(APPEND C2J_LIST "health:2016-08-04")
 list(APPEND C2J_LIST "iam:2010-05-08")


Fixed Java language bindings.

Fixed Java language bindings.

--- copasi/bindings/java/compile-native-files.cmake
+++ copasi/bindings/java/compile-native-files.cmake
@@ -1,4 +1,4 @@
-# Copyright (C) 2017 by Pedro Mendes, Virginia Tech Intellectual
+# Copyright (C) 2017 - 2018 by Pedro Mendes, Virginia Tech Intellectual
 # Properties, Inc., University of Heidelberg, and University of
 # of Connecticut School of Medicine.
 # All rights reserved.
@@ -24,6 +24,12 @@
         "${BIN_DIRECTORY}/java-files/org/COPASI/CModelEntity.java"
         "${BIN_DIRECTORY}/java-files/org/COPASI/CDataArray.java"
         "${BIN_DIRECTORY}/java-files/org/COPASI/CCore.java"
+        "${BIN_DIRECTORY}/java-files/org/COPASI/CModelParameter.java"
+        "${BIN_DIRECTORY}/java-files/org/COPASI/CFunctionParameter.java"
+        "${BIN_DIRECTORY}/java-files/org/COPASI/CCopasiParameter.java"
+        "${BIN_DIRECTORY}/java-files/org/COPASI/CReaction.java"
+        "${BIN_DIRECTORY}/java-files/org/COPASI/CModel.java"
+        "${BIN_DIRECTORY}/java-files/org/COPASI/CUndoData.java"
      )

 foreach(broken_file ${SWIG_ENUM_FIX_FILES})


SVN_SILENT made messages (.desktop file)

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -36,6 +36,7 @@
 Name[pt_BR]=VLC
 Name[ro]=VLC
 Name[ru]=VLC
+Name[sk]=VLC
 Name[sl]=VLC
 Name[sr]=ВЛЦ
 Name[sr@ijekavian]=ВЛЦ
@@ -75,6 +76,7 @@
 Comment[pt_BR]=Infraestrutura do VLC para o Phonon
 Comment[ro]=Suportul VLC pentru Phonon
 Comment[ru]=Механизм VLC для Phonon
+Comment[sk]=Backend Phonon VLC
 Comment[sl]=Zaledje VLC za Phonon
 Comment[sr]=ВЛЦ као позадина Фонона
 Comment[sr@ijekavian]=ВЛЦ као позадина Фонона


add the qtgui include dir as well - needed for QItemDelegate

--- qtsql/config.xml.cmake
+++ qtsql/config.xml.cmake
@@ -6,6 +6,7 @@
     <includeDirs>
         <dir>@QT_HEADERS_DIR@</dir>
         <dir>@QT_QTCORE_INCLUDE_DIR@</dir>
+        <dir>@QT_QTGUI_INCLUDE_DIR@</dir>
         <dir>@QT_QTSQL_INCLUDE_DIR@</dir>
     </includeDirs>
 </config>


Bugfix: Remove HAVE_<LAPACK FUNCTIONS> if lapack is disabled

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@26780 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/configure/configure_lapack.cmake
+++ deal.II/cmake/configure/configure_lapack.cmake
@@ -14,6 +14,43 @@
 ENDMACRO()

+#
+# We do a fine grained check for availability of every single LAPACK
+# function we use. We have to ensure that this check is repeated every time
+# the lapack library or DEAL_II_WITH_LAPACK changes.
+#
+# TODO: Known bug: At the moment we don't cover the case if the lapack
+#                  library changes.
+#
+
+SET(DEAL_II_LAPACK_FUNCTIONS
+  daxpy_ dgeev_ dgeevx_ dgelsd_ dgemm_ dgemv_ dgeqrf_ dgesdd_ dgesvd_ dgetrf_
+  dgetri_ dgetrs_ dorgqr_ dormqr_ dstev_ dsyevx_ dsygvx_ saxpy_ sgeev_ sgeevx_
+  sgelsd_ sgemm_ sgemv_ sgeqrf_ sgesdd_ sgesvd_ sgetrf_ sgetri_ sgetrs_ sorgqr_
+  sormqr_ sstev_ ssyevx_ ssygvx_ strtrs_
+  )
+
+MACRO(CHECK_FOR_LAPACK_FUNCTIONS)
+  LIST(APPEND CMAKE_REQUIRED_LIBRARIES "${LAPACK_LIBRARIES}")
+  ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
+
+  FOREACH(func ${DEAL_II_LAPACK_FUNCTIONS})
+    STRING(TOUPPER ${func} func_uppercase)
+    CHECK_FUNCTION_EXISTS(${func} HAVE_${func_uppercase})
+  ENDFOREACH()
+
+  LIST(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "${LAPACK_LIBRARIES}")
+  STRIP_FLAG(CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
+ENDMACRO()
+
+
+MACRO(RESET_LAPACK_FUNCTIONS_CACHE)
+  FOREACH(func ${DEAL_II_LAPACK_FUNCTIONS})
+    STRING(TOUPPER ${func} func_uppercase)
+    UNSET(HAVE_${func_uppercase} CACHE)
+  ENDFOREACH()
+ENDMACRO()
+
 MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL var)

   ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${LAPACK_LINKER_FLAGS}")
@@ -22,46 +59,7 @@
     ${LAPACK_LIBRARIES}
     )

-  LIST(APPEND CMAKE_REQUIRED_LIBRARIES "${LAPACK_LIBRARIES}")
-  ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
-  CHECK_FUNCTION_EXISTS(daxpy_  HAVE_DAXPY_)
-  CHECK_FUNCTION_EXISTS(dgeevx_ HAVE_DGEEVX_)
-  CHECK_FUNCTION_EXISTS(dgeev_  HAVE_DGEEV_)
-  CHECK_FUNCTION_EXISTS(dgelsd_ HAVE_DGELSD_)
-  CHECK_FUNCTION_EXISTS(dgemm_  HAVE_DGEMM_)
-  CHECK_FUNCTION_EXISTS(dgemv_  HAVE_DGEMV_)
-  CHECK_FUNCTION_EXISTS(dgeqrf_ HAVE_DGEQRF_)
-  CHECK_FUNCTION_EXISTS(dgesdd_ HAVE_DGESDD_)
-  CHECK_FUNCTION_EXISTS(dgesvd_ HAVE_DGESVD_)
-  CHECK_FUNCTION_EXISTS(dgetrf_ HAVE_DGETRF_)
-  CHECK_FUNCTION_EXISTS(dgetri_ HAVE_DGETRI_)
-  CHECK_FUNCTION_EXISTS(dgetrs_ HAVE_DGETRS_)
-  CHECK_FUNCTION_EXISTS(dorgqr_ HAVE_DORGQR_)
-  CHECK_FUNCTION_EXISTS(dormqr_ HAVE_DORMQR_)
-  CHECK_FUNCTION_EXISTS(dstev_  HAVE_DSTEV_)
-  CHECK_FUNCTION_EXISTS(dsyevx_ HAVE_DSYEVX_)
-  CHECK_FUNCTION_EXISTS(dsygvx_ HAVE_DSYGVX_)
-  CHECK_FUNCTION_EXISTS(saxpy_  HAVE_SAXPY_)
-  CHECK_FUNCTION_EXISTS(sgeevx_ HAVE_SGEEVX_)
-  CHECK_FUNCTION_EXISTS(sgeev_  HAVE_SGEEV_)
-  CHECK_FUNCTION_EXISTS(sgelsd_ HAVE_SGELSD_)
-  CHECK_FUNCTION_EXISTS(sgemm_  HAVE_SGEMM_)
-  CHECK_FUNCTION_EXISTS(sgemv_  HAVE_SGEMV_)
-  CHECK_FUNCTION_EXISTS(sgeqrf_ HAVE_SGEQRF_)
-  CHECK_FUNCTION_EXISTS(sgesdd_ HAVE_SGESDD_)
-  CHECK_FUNCTION_EXISTS(sgesvd_ HAVE_SGESVD_)
-  CHECK_FUNCTION_EXISTS(sgetrf_ HAVE_SGETRF_)
-  CHECK_FUNCTION_EXISTS(sgetri_ HAVE_SGETRI_)
-  CHECK_FUNCTION_EXISTS(sgetrs_ HAVE_SGETRS_)
-  CHECK_FUNCTION_EXISTS(sorgqr_ HAVE_SORGQR_)
-  CHECK_FUNCTION_EXISTS(sormqr_ HAVE_SORMQR_)
-  CHECK_FUNCTION_EXISTS(sstev_  HAVE_SSTEV_)
-  CHECK_FUNCTION_EXISTS(ssyevx_ HAVE_SSYEVX_)
-  CHECK_FUNCTION_EXISTS(ssygvx_ HAVE_SSYGVX_)
-  CHECK_FUNCTION_EXISTS(strtrs_ HAVE_STRTRS_)
-
-  LIST(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "${LAPACK_LIBRARIES}")
-  STRIP_FLAG(CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
+  CHECK_FOR_LAPACK_FUNCTIONS()

   SET(HAVE_LIBLAPACK TRUE)

@@ -72,3 +70,11 @@

 CONFIGURE_FEATURE(LAPACK)

+#
+# Call RESET_LAPACK_FUNCTIONS_CHECK if DEAL_II_WITH_LAPACK is unset to
+# clean the configuration
+#
+IF(NOT DEAL_II_WITH_LAPACK)
+  RESET_LAPACK_FUNCTIONS_CACHE()
+ENDIF()
+


Arguments must be splitted by space

Arguments must be splitted by space

--- CMake/Utils/PrecompiledHeader.cmake
+++ CMake/Utils/PrecompiledHeader.cmake
@@ -80,7 +80,7 @@
                item MATCHES "/usr/include$")
           # workaround for GCC 6.x bug
         else()
-          LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix}\"${item}\"")
+          LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix} \"${item}\"")
         endif()
     ENDFOREACH(item)

@@ -90,7 +90,7 @@
                item MATCHES "/usr/include$")
           # workaround for GCC 6.x bug
         else()
-          LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix}\"${item}\"")
+          LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix} \"${item}\"")
         endif()
     ENDFOREACH(item)


fix build of SWIG

fix build of SWIG

--- SuperBuild/External_SWIG.cmake
+++ SuperBuild/External_SWIG.cmake
@@ -70,7 +70,7 @@
     set(CLANG_ARG -DCMAKE_COMPILER_IS_CLANGXX:BOOL=ON)
   endif()

-  set(SWIG_SOURCE_DIR ${SOURCE_DOWNLOAD_CACHE}/${proj} )
+  set(SWIG_SOURCE_DIR ${${proj}_SOURCE_DIR} )

   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}


COMP: Upgrade minimum requirement to cmake 2.8

--- DashboardScripts/tubetk_style.cmake
+++ DashboardScripts/tubetk_style.cmake
@@ -20,7 +20,8 @@
 # limitations under the License.
 #
 ##############################################################################
-cmake_minimum_required(VERSION 2.6)
+
+cmake_minimum_required(VERSION 2.8)

 include( ${CTEST_SCRIPT_DIRECTORY}/../../tubetk_config.cmake )

@@ -36,5 +37,5 @@
 ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" )
 ctest_read_custom_files( "${CTEST_BINARY_DIRECTORY}" )
 EXECUTE_PROCESS( COMMAND make -C "${CTEST_BINARY_DIRECTORY}" StyleCheck )
-ctest_submit( )
+ctest_submit()


Code coverage, Numerics ~ 33% ... -> http://cdash.inria.fr

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@1189 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/SiconosProject.cmake
+++ Numerics/cmake/SiconosProject.cmake
@@ -72,6 +72,11 @@
   OPTION(BUILD_SHARED_LIBS "Building of shared libraries" ON)

   # Tests coverage (taken from ViSp)
+
+  #
+  # Note: all of this is done with a recent cmake version (>2.6.0) with:
+  # cmake -DCMAKE_BUILD_TYPE=Profile
+  #
   IF(WITH_TESTS_COVERAGE)
     # Add build options for test coverage. Currently coverage is only supported
     # on gcc compiler
@@ -87,11 +92,15 @@
     IF(CXX_HAVE_FTEST_COVERAGE AND CXX_HAVE_PROFILE_ARCS)
       MESSAGE("Adding test coverage flags to CXX compiler : -ftest-coverage -fprofile-arcs")
       SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ftest-coverage -fprofile-arcs")
+      SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
+      SET (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
     ENDIF(CXX_HAVE_FTEST_COVERAGE AND CXX_HAVE_PROFILE_ARCS)

     IF(C_HAVE_FTEST_COVERAGE)
       MESSAGE("Adding test coverage flags to C compiler : -ftest-coverage")
-      SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ftest-coverage")
+      SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ftest-coverage -fprofile-arcs")
+      SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
+      SET (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
     ENDIF(C_HAVE_FTEST_COVERAGE)

   ENDIF(WITH_TESTS_COVERAGE)


cmake: add comments to device_plugin_container

The doxygen comments for part of device_plugin_container need to be
autogenerated.

--- autogenerate_plugin_container.cmake
+++ autogenerate_plugin_container.cmake
@@ -130,7 +130,17 @@
         "${FORWARD_DECLARATION_STRING}class ${impl_class_name};\n")

     set(PLUGIN_GET_STRING
-        "${PLUGIN_GET_STRING}    ${class_name} &${get_name}() { return ${member_name}; }\n")
+        "${PLUGIN_GET_STRING}    /**\n")
+    set(PLUGIN_GET_STRING
+        "${PLUGIN_GET_STRING}     * Getter for ${class_name} plugin.\n")
+    set(PLUGIN_GET_STRING
+        "${PLUGIN_GET_STRING}     *\n")
+    set(PLUGIN_GET_STRING
+        "${PLUGIN_GET_STRING}     * @return a reference to the ${get_name} plugin instance\n")
+    set(PLUGIN_GET_STRING
+        "${PLUGIN_GET_STRING}     */\n")
+    set(PLUGIN_GET_STRING
+        "${PLUGIN_GET_STRING}    ${class_name} &${get_name}() { return ${member_name}; }\n\n")

     set(PLUGIN_MEMBER_STRING
         "${PLUGIN_MEMBER_STRING}    ${impl_class_name} *${impl_member_name};\n")


Fix an important include

Fix an important include

--- files.cmake
+++ files.cmake
@@ -1,4 +1,5 @@
-set( TUVOK_HEADERS  3rdParty/LUA/lapi.h
+set( TUVOK_HEADERS  StdTuvokDefines.h
+                    3rdParty/LUA/lapi.h
                     3rdParty/LUA/lauxlib.h
                     3rdParty/LUA/lcode.h
                     3rdParty/LUA/lctype.h


cmake fix

cmake fix

PiperOrigin-RevId: 164911656

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -756,7 +756,7 @@
     "${tensorflow_source_dir}/tensorflow/core/profiler/internal/print_model_analysis.h"
     "${tensorflow_source_dir}/tensorflow/core/profiler/internal/print_model_analysis.cc"
     "${tensorflow_source_dir}/tensorflow/python/eager/pywrap_tfe.h"
-    "${tensorflow_source_dir}/tensorflow/python/eager/pywrap_tfe_src.h"
+    "${tensorflow_source_dir}/tensorflow/python/eager/pywrap_tfe_src.cc"
     "${tensorflow_source_dir}/tensorflow/python/client/tf_session_helper.h"
     "${tensorflow_source_dir}/tensorflow/python/client/tf_session_helper.cc"
     "${tensorflow_source_dir}/tensorflow/python/framework/cpp_shape_inference.h"


SuperBuild: mvd cmake option to switch to repository tag

--- SuperBuild/CMake/External_mvd.cmake
+++ SuperBuild/CMake/External_mvd.cmake
@@ -5,6 +5,8 @@
 endif()

 SETUP_SUPERBUILD(MVD)
+
+set(MONTEVERDI_GIT_TAG "develop" CACHE STRING "branch name of monteverdi to build. Default is 'develop'")

 # declare dependencies
 ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(MVD OTB QWT QT4)
@@ -16,10 +18,11 @@
 ADD_SUPERBUILD_CMAKE_VAR(MVD QT_QMAKE_EXECUTABLE)

 #TODO: control build testing via cmake variable properly
+
 ExternalProject_Add(MVD
   PREFIX MVD
   GIT_REPOSITORY "https://git@git.orfeo-toolbox.org/git/monteverdi2.git"
-  GIT_TAG "release-3.2"
+  GIT_TAG "${MONTEVERDI_GIT_TAG}"
   SOURCE_DIR ${MVD_SB_SRC}
   BINARY_DIR ${MVD_SB_BUILD_DIR}
   INSTALL_DIR ${CMAKE_INSTALL_PREFIX}


Print gadgetron output from ctest

Print gadgetron output from ctest

--- SuperBuild/External_Gadgetron.cmake
+++ SuperBuild/External_Gadgetron.cmake
@@ -113,7 +113,7 @@
   # Gadgetron only adds tests if (GTEST_FOUND AND ARMADILLO_FOUND)
   if (BUILD_TESTING_${proj})
     add_test(NAME ${proj}_TESTS
-         COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+         COMMAND ${CMAKE_CTEST_COMMAND} -VV -C $<CONFIGURATION>
          WORKING_DIRECTORY ${${proj}_BINARY_DIR}/test)
   endif()


correct typo

correct typo

--- packaging/linux/LinuxPackaging.cmake
+++ packaging/linux/LinuxPackaging.cmake
@@ -53,7 +53,7 @@
   set(CPACK_RPM_PACKAGE_REQUIRES "qt, qtwebkit")
 else()
   set(CPACK_GENERATOR DEB)
-  set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-sql-sqlite, libqt4-webkit)
+  set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-sql-sqlite, libqt4-webkit")
 endif()

 set(CPACK_GENERATOR "${CPACK_GENERATOR}" CACHE STRING "Type of package to build")


pw_build: Detect test.cc as a test file

pw_build: Detect test.cc as a test file

Change-Id: I77de3edb6ee5a46b476771584f16c669d6ba40ba
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/45340
Pigweed-Auto-Submit: Wyatt Hepler <cca3bedb37979eacd157a9bceb473582df8aea1e@google.com>
Commit-Queue: Auto-Submit <14637eda5603879df170705285bf30f5996692f0@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Vic Yang <5fd92abeee651458f98e2856f4f200ee971cee4d@google.com>

--- pw_build/pigweed.cmake
+++ pw_build/pigweed.cmake
@@ -69,7 +69,8 @@

   # Create a library with all source files not ending in _test.
   set(sources "${all_sources}")
-  list(FILTER sources EXCLUDE REGEX "_test(\\.cc|(_c)?\\.c)$")
+  list(FILTER sources EXCLUDE REGEX "_test(\\.cc|(_c)?\\.c)$")  # *_test.cc
+  list(FILTER sources EXCLUDE REGEX "^test(\\.cc|(_c)?\\.c)$")  # test.cc
   list(FILTER sources EXCLUDE REGEX "_fuzzer\\.cc$")

   file(GLOB_RECURSE headers *.h)


add check that message package declares the interface files

--- rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
+++ rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
@@ -131,6 +131,13 @@
     endforeach()
   endforeach()

+  # check that all dependencies are actually valid message packages
+  foreach(_dep ${_recursive_dependencies})
+    if (NOT DEFINED ${_dep}_INTERFACE_FILES)
+      message(FATAL_ERROR "The message package '${_dep}' does not declare the interface files")
+    endif()
+  endforeach()
+
   # generators must be executed in topological order
   # which is ensured by every generator finding its dependencies first
   # and then registering itself as an extension


mistake with LINKER_LANGUAGE ...

mistake with LINKER_LANGUAGE ...

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@2782 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/LibraryProjectSetup.cmake
+++ Numerics/cmake/LibraryProjectSetup.cmake
@@ -153,7 +153,7 @@
         OUTPUT_NAME "${PROJECT_NAME}"
         VERSION "${${PROJECT_NAME}_VERSION}"
         CLEAN_DIRECT_OUTPUT 1
-        #      LINKER_LANGUAGE ${${PROJECT_NAME}_LINKER_LANGUAGE}
+        LINKER_LANGUAGE ${${PROJECT_NAME}_LINKER_LANGUAGE}
         )
     ENDIF(BUILD_SHARED_LIBS)


Better defaults.cmake.

Better defaults.cmake.

--- defaults.cmake
+++ defaults.cmake
@@ -1,74 +1,80 @@
 function(check_c_flag flag var)
-    include(CheckCCompilerFlag)
-    set(output_message "-- C compiler flag ${flag} - ")
-    check_c_compiler_flag("${flag}" ${var})
-    if(${${var}})
-        if(2 LESS ${ARGC})
-            if("DEBUG" STREQUAL "${ARGV2}")
-                string(STRIP "${CMAKE_C_FLAGS_DEBUG} ${flag}" NEW_FLAGS)
-                set(CMAKE_C_FLAGS_DEBUG "${NEW_FLAGS}" PARENT_SCOPE)
-            elseif("RELEASE" STREQUAL "${ARGV2}")
-                string(STRIP "${CMAKE_C_FLAGS_RELEASE} ${flag}" NEW_FLAGS)
-                set(CMAKE_C_FLAGS_RELEASE "${NEW_FLAGS}" PARENT_SCOPE)
+    if(CMAKE_C_COMPILER)
+        include(CheckCCompilerFlag)
+        set(output_message "-- C compiler flag ${flag} - ")
+        check_c_compiler_flag("${flag}" ${var})
+        if(${${var}})
+            if(2 LESS ${ARGC})
+                if("DEBUG" STREQUAL "${ARGV2}")
+                    string(STRIP "${CMAKE_C_FLAGS_DEBUG} ${flag}" NEW_FLAGS)
+                    set(CMAKE_C_FLAGS_DEBUG "${NEW_FLAGS}" PARENT_SCOPE)
+                elseif("RELEASE" STREQUAL "${ARGV2}")
+                    string(STRIP "${CMAKE_C_FLAGS_RELEASE} ${flag}" NEW_FLAGS)
+                    set(CMAKE_C_FLAGS_RELEASE "${NEW_FLAGS}" PARENT_SCOPE)
+                else()
+                    message(SEND_ERROR "unknown build type ${ARGV1}")
+                endif()
+            else()
+                string(STRIP "${CMAKE_C_FLAGS} ${flag}" NEW_FLAGS)
+                set(CMAKE_C_FLAGS "${NEW_FLAGS}" PARENT_SCOPE)
+            endif()
+            set(${var} TRUE PARENT_SCOPE)
+            message("${output_message}accepted")
+        else()
+            set(${var} FALSE PARENT_SCOPE)
+            message("${output_message}not accepted")
+        endif()
+    endif()
+endfunction()
+
+function(check_cxx_flag flag var)
+    if(CMAKE_CXX_COMPILER)
+        include(CheckCXXCompilerFlag)
+        set(output_message "-- C++ compiler flag ${flag} - ")
+        check_cxx_compiler_flag("${flag}" ${var})
+        if(${${var}})
+            if(2 LESS ${ARGC})
+                if("DEBUG" STREQUAL "${ARGV2}")
+                    string(STRIP "${CMAKE_CXX_FLAGS_DEBUG} ${flag}" NEW_FLAGS)
+                    set(CMAKE_CXX_FLAGS_DEBUG "${NEW_FLAGS}" PARENT_SCOPE)
+                elseif("RELEASE" STREQUAL "${ARGV2}")
+                    string(STRIP "${CMAKE_CXX_FLAGS_RELEASE} ${flag}" NEW_FLAGS)
+                    set(CMAKE_CXX_FLAGS_RELEASE "${NEW_FLAGS}" PARENT_SCOPE)
+                else()
+                    message(SEND_ERROR "unknown build type ${ARGV2}")
+                endif()
+            else()
+                string(STRIP "${CMAKE_CXX_FLAGS} ${flag}" NEW_FLAGS)
+                set(CMAKE_CXX_FLAGS "${NEW_FLAGS}" PARENT_SCOPE)
+            endif()
+            set(${var} TRUE PARENT_SCOPE)
+            message("${output_message}accepted")
+        else()
+            set(${var} FALSE PARENT_SCOPE)
+            message("${output_message}not accepted")
+        endif()
+    endif()
+endfunction()
+
+function(check_linker_flag flag)
+    if(CMAKE_C_COMPILER OR CMAKE_CXX_COMPILER)
+        set(output_message "-- Linker flag ${flag} - ")
+        if(1 LESS ${ARGC})
+            if("DEBUG" STREQUAL "${ARGV1}")
+                string(STRIP "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${flag}" NEW_FLAGS)
+                set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${NEW_FLAGS}" PARENT_SCOPE)
+            elseif("RELEASE" STREQUAL "${ARGV1}")
+                string(STRIP "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${flag}" NEW_FLAGS)
+                set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${NEW_FLAGS}" PARENT_SCOPE)
             else()
                 message(SEND_ERROR "unknown build type ${ARGV1}")
             endif()
         else()
-            string(STRIP "${CMAKE_C_FLAGS} ${flag}" NEW_FLAGS)
-            set(CMAKE_C_FLAGS "${NEW_FLAGS}" PARENT_SCOPE)
-        endif()
-        set(${var} TRUE PARENT_SCOPE)
-        message("${output_message}accepted")
-    else()
-        set(${var} FALSE PARENT_SCOPE)
-        message("${output_message}not accepted")
-    endif()
-endfunction()
-
-function(check_cxx_flag flag var)
-    include(CheckCXXCompilerFlag)
-    set(output_message "-- C++ compiler flag ${flag} - ")
-    check_cxx_compiler_flag("${flag}" ${var})
-    if(${${var}})
-        if(2 LESS ${ARGC})
-            if("DEBUG" STREQUAL "${ARGV2}")
-                string(STRIP "${CMAKE_CXX_FLAGS_DEBUG} ${flag}" NEW_FLAGS)
-                set(CMAKE_CXX_FLAGS_DEBUG "${NEW_FLAGS}" PARENT_SCOPE)
-            elseif("RELEASE" STREQUAL "${ARGV2}")
-                string(STRIP "${CMAKE_CXX_FLAGS_RELEASE} ${flag}" NEW_FLAGS)
-                set(CMAKE_CXX_FLAGS_RELEASE "${NEW_FLAGS}" PARENT_SCOPE)
-            else()
-                message(SEND_ERROR "unknown build type ${ARGV2}")
-            endif()
-        else()
-            string(STRIP "${CMAKE_CXX_FLAGS} ${flag}" NEW_FLAGS)
-            set(CMAKE_CXX_FLAGS "${NEW_FLAGS}" PARENT_SCOPE)
-        endif()
-        set(${var} TRUE PARENT_SCOPE)
-        message("${output_message}accepted")
-    else()
-        set(${var} FALSE PARENT_SCOPE)
-        message("${output_message}not accepted")
-    endif()
-endfunction()
-
-function(check_linker_flag flag)
-    set(output_message "-- Linker flag ${flag} - ")
-    if(1 LESS ${ARGC})
-        if("DEBUG" STREQUAL "${ARGV1}")
-            string(STRIP "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${flag}" NEW_FLAGS)
-            set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${NEW_FLAGS}" PARENT_SCOPE)
-        elseif("RELEASE" STREQUAL "${ARGV1}")
-            string(STRIP "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${flag}" NEW_FLAGS)
-            set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${NEW_FLAGS}" PARENT_SCOPE)
-        else()
-            message(SEND_ERROR "unknown build type ${ARGV1}")
-        endif()
-    else()
-        string(STRIP "${CMAKE_EXE_LINKER_FLAGS} ${flag}" NEW_FLAGS)
-        set(CMAKE_EXE_LINKER_FLAGS "${NEW_FLAGS}" PARENT_SCOPE)
-    endif()
-    message("${output_message}enabled")
+            string(STRIP "${CMAKE_EXE_LINKER_FLAGS} ${flag}" NEW_FLAGS)
+            set(CMAKE_EXE_LINKER_FLAGS "${NEW_FLAGS}" PARENT_SCOPE)
+        endif()
+        message("${output_message}enabled")
+    endif()
 endfunction()

 function(find_folder_msvc var match)
@@ -263,6 +269,9 @@
 endfunction()

 function(find_glu)
+    if(NOT OpenGL_GL_PREFERENCE)
+        set(OpenGL_GL_PREFERENCE "GLVND")
+    endif()
     include(FindOpenGL)
     if(OPENGL_GLU_FOUND)
         message("-- Found GLU: ${OPENGL_glu_LIBRARY}")
@@ -354,6 +363,9 @@
 endfunction()

 function(find_opengl)
+    if(NOT OpenGL_GL_PREFERENCE)
+        set(OpenGL_GL_PREFERENCE "GLVND")
+    endif()
     include(FindOpenGL)
     if(NOT OPENGL_FOUND)
         message(SEND_ERROR "OpenGL required but not found")
@@ -542,7 +554,7 @@
     set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_TEMP3} PARENT_SCOPE)
 endfunction()

-if(${MSVC})
+if(MSVC)
     add_definitions("/D_CRT_SECURE_NO_WARNINGS")
     add_definitions("/D_SCL_SECURE_NO_WARNINGS")
     add_definitions("/DWIN32")


BUG: missing dependency to zlib in libkml

--- CMake/External_libKML.cmake
+++ CMake/External_libKML.cmake
@@ -33,6 +33,15 @@
     list(APPEND ${proj}_DEPENDENCIES BOOST)
   endif()

+  if(USE_SYSTEM_ZLIB)
+    set(LIBKML_SB_ZLIB_CONFIG)
+  else()
+    set(LIBKML_SB_ZLIB_CONFIG
+      -DZLIB_ROOT:STRING=${CMAKE_INSTALL_PREFIX}
+      )
+    list(APPEND ${proj}_DEPENDENCIES ZLIB)
+  endif()
+
   ExternalProject_Add(${proj}
     PREFIX ${proj}
     URL "http://ftp.de.debian.org/debian/pool/main/libk/libkml/libkml_1.3.0~r863.orig.tar.gz"
@@ -45,6 +54,7 @@
       -DBUILD_SHARED_LIBS:BOOL=ON
       ${LIBKML_SB_EXPAT_CONFIG}
       ${LIBKML_SB_BOOST_CONFIG}
+      ${LIBKML_SB_ZLIB_CONFIG}
     #CMAKE_COMMAND
     #  # use 'env' because CTest launcher doesn't perform shell interpretation
     #  env LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib


COMP: allow tests to link with optional deps, no dragged by module lib

--- CMake/OTBModuleMacros.cmake
+++ CMake/OTBModuleMacros.cmake
@@ -277,6 +277,12 @@
   foreach(dep IN LISTS OTB_MODULE_${otb-module-test}_DEPENDS)
     list(APPEND ${otb-module-test}_LIBRARIES "${${dep}_LIBRARIES}")
   endforeach()
+  # make sure the test can link with optional libs
+  foreach(dep IN LISTS OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS)
+    if (${dep}_ENABLED)
+      list(APPEND ${otb-module-test}_LIBRARIES "${${dep}_LIBRARIES}")
+    endif()
+  endforeach()
 endmacro()

 macro(otb_module_warnings_disable)


BUG 7589 Fix Mingw Java libraries name

BUG 7589 Fix Mingw Java libraries name

See:
* http://vtk.org/Bug/view.php?id=10969
* http://vtk.org/Bug/view.php?id=7589

Change-Id: Idad20d624d4d23b7401d22b7c7b7b74506a9ff6f

--- CMake/vtkJavaWrapping.cmake
+++ CMake/vtkJavaWrapping.cmake
@@ -41,6 +41,9 @@
     "${module_srcs};${Kit_JAVA_EXTRA_WRAP_SRCS}")

   add_library(${module_name}Java SHARED ${ModuleJava_SRCS} ${Kit_JAVA_EXTRA_SRCS})
+  if(MINGW)
+    set_target_properties(${module_name}Java PROPERTIES PREFIX "")
+  endif(MINGW)
   vtk_target_export(${module_name}Java)
   if(CMAKE_HAS_TARGET_INCLUDES)
     set_property(TARGET ${module_name}Java APPEND


PKG: friendly error message in case PKG_STAGE_DIR is empty

--- SuperBuild/Packaging/PackageHelper.cmake
+++ SuperBuild/Packaging/PackageHelper.cmake
@@ -1,5 +1,9 @@
 macro(super_package)
   cmake_parse_arguments(PKG  "" "STAGE_DIR" "SEARCHDIRS" ${ARGN} )
+
+  if(${PKG_STAGE_DIR} STREQUAL "")
+    message(FATAL_ERROR "PKG_STAGE_DIR is emtpy. Just can't continue.")
+  endif()

   set(loader_program_PATHS)
   if(WIN32 OR CMAKE_CROSSCOMPILING)


FindOpenImageIO: document the imported targets

--- src/cmake/modules/FindOpenImageIO.cmake
+++ src/cmake/modules/FindOpenImageIO.cmake
@@ -22,6 +22,10 @@
 #   OPENIMAGEIO_VERSION_PATCH  Version minor patch
 #   OPENIMAGEIO_VERSION_TWEAK  Version minor tweak
 #   OIIOTOOL_BIN               Path to oiiotool executable
+#
+# Imported targets:
+#   OpenImageIO::OpenImageIO   The libOpenImageIO library.
+#   OpenImageIO::oiiotool      The oiiotool executable.
 #
 # Special inputs:
 #   OpenImageIO_ROOT - if using CMake >= 3.12, will automatically search


Print build dependency output directly to console

Former-commit-id: c0e311e913afa28fde31ccbd0baef0acd06ef304

--- cmake-modules/BuildDependency.cmake
+++ cmake-modules/BuildDependency.cmake
@@ -6,7 +6,7 @@
     endif()
     include(cmake-modules/GetNumThreads.cmake)
     get_num_threads(num_threads)
-
+    execute_process( COMMAND  ${CMAKE_COMMAND} -E remove ${build_dir}/CMakeCache.txt)
     execute_process( COMMAND  ${CMAKE_COMMAND} -E make_directory ${build_dir})
     execute_process(
             COMMAND  ${CMAKE_COMMAND}
@@ -20,7 +20,6 @@
             ${PROJECT_SOURCE_DIR}/cmake-modules/external_${dep_name}
             WORKING_DIRECTORY ${build_dir}
             RESULT_VARIABLE config_result
-            #ERROR_VARIABLE  config_error
     )
     if(config_result)
         message(STATUS "Got non-zero exit code while configuring ${dep_name}")
@@ -28,13 +27,6 @@
         message(STATUS  "install_dir       : ${install_dir}")
         message(STATUS  "extra_flags       : ${extra_flags}")
         message(STATUS  "config_result     : ${config_result}")
-        #message(STATUS  "Output saved to ${build_dir}/stdout and ${build_dir}/stderr")
-        #file(APPEND ${build_dir}/stdout ${config_result})
-        #file(APPEND ${build_dir}/stderr ${config_error})
-        #if(DMRG_PRINT_INFO OR CMAKE_VERBOSE_MAKEFILE OR DMRG_PRINT_CHECKS)
-        #    message(STATUS "Contents of stdout: \n  ${config_result} \n")
-        #    message(STATUS "Contents of stderr: \n  ${config_error}  \n")
-        #endif()
         message(FATAL_ERROR "Failed to configure ${dep_name}")
     endif()

@@ -44,7 +36,6 @@
     execute_process(COMMAND  ${CMAKE_COMMAND} --build . --parallel ${num_threads}
             WORKING_DIRECTORY "${build_dir}"
             RESULT_VARIABLE build_result
-            #ERROR_VARIABLE  build_error
             )

     if(build_result)
@@ -53,13 +44,6 @@
         message(STATUS  "install_dir       : ${install_dir}")
         message(STATUS  "extra_flags       : ${extra_flags}")
         message(STATUS  "build_result      : ${build_result}")
-#        message(STATUS  "Output saved to ${build_dir}/stdout and ${build_dir}/stderr")
-#        file(APPEND ${build_dir}/stdout ${build_result})
-#        file(APPEND ${build_dir}/stderr ${build_error})
-#        if(DMRG_PRINT_INFO OR CMAKE_VERBOSE_MAKEFILE OR DMRG_PRINT_CHECKS)
-#            message(STATUS "Contents of stdout: \n  ${build_result} \n")
-#            message(STATUS "Contents of stderr: \n  ${build_error} \n")
-#        endif()
         message(FATAL_ERROR "Failed to build ${dep_name}")
     endif()


r10669/sofa : push a5af93b..4193c8b

r10669/sofa : push a5af93b..4193c8b

* commit 4193c8be268c379e973a7bfdb06c0b210a28e333
  Author: Marc Legendre <marc.legendre@inria.fr>
  Date:   Mon Feb 17 09:51:23 2014 +0100

      Fix FindOpenCascade.cmake for recent versions of Ubuntu

      OpenCascade headers are in /usr/include/oce/ instead of /usr/include/.

   cmake/Modules/FindOpenCascade.cmake |    4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Former-commit-id: 6c619041231b15fae7ce7f2ebbabfd841e80b744

--- cmake/Modules/FindOpenCascade.cmake
+++ cmake/Modules/FindOpenCascade.cmake
@@ -12,7 +12,7 @@
         PATHS ${SOFA_EXTLIBS_DIR}/OpenCASCADE*/ros/win32/vc9/lib )
 else()
     # Search standard locations
-    find_path(OPENCASCADE_INCLUDE_DIR BRep_Tool.hxx PATH_SUFFIXES opencascade)
+    find_path(OPENCASCADE_INCLUDE_DIR BRep_Tool.hxx PATH_SUFFIXES oce opencascade)
     find_library(OPENCASCADE_LIBRARIES TKBRep)
     mark_as_advanced(OPENCASCADE_LIBRARIES)
     get_filename_component(OPENCASCADE_LIBRARIES_DIR ${OPENCASCADE_LIBRARIES} PATH CACHE)
@@ -26,7 +26,7 @@

 # Report the results.
 if(NOT OPENCASCADE_FOUND)
-    set(msg "Unable to fine OpenCascade.")
+    set(msg "Unable to find OpenCascade.")
     if(OpenCascade_FIND_REQUIRED)
         message(FATAL_ERROR "${msg}")
     else()


Fixed typo in SetInstallPaths.cmake

Fixed typo in SetInstallPaths.cmake

--- cmake/modules/SetInstallPaths.cmake
+++ cmake/modules/SetInstallPaths.cmake
@@ -18,7 +18,7 @@
   set(SYSTEM_ROOT_DIR "/")
 endif()

-if(WIN32)
+if(NOT WIN32)
   set(BINDIR "bin")
   set(RUNTIME_LIBDIR "${BINDIR}\\${CMAKE_BUILD_TYPE}")
   set(DATADIR "${BINDIR}\\data")


COMP: Address wrong library types with VS and shared libraries

If ENABLED_SHARED is not specified for a library we must fallback to
the configured CMake defaults, instead of the specified ITK type. This
makes libraries static if the linkage requires export specification
and there is none provided.

Change-Id: I61350b62c9918134b91504b1d9aa15a404da5534

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -432,7 +432,15 @@
 # itk_module_add_library(MyModule ${ModuleModule_SRCS})
 #
 macro(itk_module_add_library _name)
-  add_library(${_name} ${ITK_LIBRARY_BUILD_TYPE} ${ARGN})
+  set(_LIBRARY_BUILD_TYPE "${ITK_LIBRARY_BUILD_TYPE}")
+  # If ENABLED_SHARED is not specified in the itk_module macro, then
+  # there is no export specification generated for the library. In
+  # such a case we fall back to the CMake default, instead of the ITK
+  # type.
+  if(NOT ITK_MODULE_${itk-module}_ENABLE_SHARED)
+    set(_LIBRARY_BUILD_TYPE)
+  endif()
+  add_library(${_name} ${_LIBRARY_BUILD_TYPE} ${ARGN})
   itk_module_link_dependencies()
   itk_module_target(${_name})
 endmacro()


COMP: Superbuild - Force rebuild of log4qt

--- CMakeExternals/log4qt.cmake
+++ CMakeExternals/log4qt.cmake
@@ -17,5 +17,13 @@
           -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
         )
     SET(log4qt_DIR ${ep_install_dir})
+
+    ExternalProject_Add_Step(${proj} force_rebuild
+      COMMENT "Force ${proj} re-build"
+      DEPENDERS build    # Steps that depend on this step
+      ALWAYS 1
+      WORKING_DIRECTORY ${ep_build_dir}/${proj}
+      )
+
   ENDIF()
 ENDIF()


COMP: Update External_niral_utilities

COMP: Update External_niral_utilities

Use the tag release for the repository External_niral_utilities

--- SuperBuild/External_niral_utilities.cmake
+++ SuperBuild/External_niral_utilities.cmake
@@ -80,7 +80,7 @@

   ### --- End Project specific additions
   set( ${proj}_REPOSITORY ${git_protocol}://github.com/NIRALUser/niral_utilities.git )
-  set( ${proj}_GIT_TAG 0218afc2696899761bba0671276dc06564be1135)
+  set( ${proj}_GIT_TAG release)
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


COMP: Fix VisualStudio linking to ParameterSerializerLib.

The import library was not being created.

Change-Id: I25cf0b2dde5b7b33930b61e010f38c166e813436

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -279,7 +279,7 @@
     endif()
     ExternalProject_Add( ${proj}
       GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/TubeTK/ParameterSerializer.git"
-      GIT_TAG "4161e9b314364e7f288cb06c9d1906e928cfc2b4"
+      GIT_TAG "23911582d78ced102946c95dd67294d4057bb645"
       SOURCE_DIR "${CMAKE_BINARY_DIR}/ParameterSerializer"
       BINARY_DIR ParameterSerializer-Build
       CMAKE_GENERATOR ${gen}


Force python shared lib build

Force python shared lib build

--- python.cmake
+++ python.cmake
@@ -31,6 +31,7 @@
     PATCH_COMMAND       ""
     CONFIGURE_COMMAND   ${FLYEM_ENV_STRING} ${python_SRC_DIR}/configure
         --prefix=${FLYEM_BUILD_DIR}
+        --enable-shared
         LDFLAGS=-L${FLYEM_BUILD_DIR}/lib
         CPPFLAGS=-I${FLYEM_BUILD_DIR}/include
     BUILD_COMMAND       ${FLYEM_ENV_STRING} make


Adding GENHLC_TARGET to depends

Adding GENHLC_TARGET to depends

Signed-off-by: Jeffrey Elms <23ce84ca7a7de9dc17ad8e8b0bbd717d4f9f9884@freshred.net>

--- make/devices.cmake
+++ make/devices.cmake
@@ -796,6 +796,8 @@
   get_target_property_required(VPR env VPR)
   get_target_property_required(GENHLC env GENHLC)
   get_target_property(VPR_TARGET env VPR_TARGET)
+  get_target_property(GENHLC_TARGET env GENHLC_TARGET)
+
   separate_arguments(
     VPR_BASE_ARGS_LIST UNIX_COMMAND "${VPR_BASE_ARGS}"
     )
@@ -957,7 +959,7 @@
   # -------------------------------------------------------------------------
   add_custom_command(
     OUTPUT ${OUT_HLC}
-    DEPENDS ${OUT_ROUTE} ${OUT_PLACE} ${OUT_IO} ${VPR_DEPS}
+    DEPENDS ${OUT_ROUTE} ${OUT_PLACE} ${OUT_IO} ${VPR_DEPS} ${GENHLC_TARGET}
     COMMAND ${GENHLC_CMD}
     COMMAND
       ${CMAKE_COMMAND} -E copy ${OUT_LOCAL}/vpr_stdout.log


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -11,6 +11,7 @@
 Name[nl]=Instant Messaging
 Name[pt]=Mensagens Instantâneas
 Name[pt_BR]=Mensagens instantâneas
+Name[sk]=Priama komunikácia
 Name[sl]=Hipno sporočanje
 Name[sr]=Брзо гласништво
 Name[sr@ijekavian]=Брзо гласништво
@@ -20,6 +21,7 @@
 Name[ug]=مۇڭداشقۇ
 Name[uk]=Миттєвий обмін повідомленнями
 Name[x-test]=xxInstant Messagingxx
+Name[zh_TW]=即時訊息
 Comment=Start a chat with any of your IM contacts or change your IM status
 Comment[ca]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat de MI
 Comment[cs]=Začít rozhovor s kterýmkoliv vaším kontaktem v IM nebo změnit stav na IM
@@ -32,6 +34,7 @@
 Comment[nl]=Begin een chat met een van uw IM-contactpersonen of wijzig uw IM-status
 Comment[pt]=Iniciar uma conversa com qualquer um dos seus contactos MI ou mudar o seu estado
 Comment[pt_BR]=Inicia um bate-papo com um dos seus contatos de MI ou altera o seu status
+Comment[sk]=Spustiť rozhovor s nejakým z vašich IM kontaktov alebo zmeniť váš IM stav
 Comment[sl]=Začnite klepet s katerimkoli izmed vaših stikov hipnega sporočanja ali spremenite vaše stanje
 Comment[sr]=Започните ћаскање преко ИМ контакта или измените своје ИМ стање
 Comment[sr@ijekavian]=Започните ћаскање преко ИМ контакта или измените своје ИМ стање
@@ -40,6 +43,7 @@
 Comment[sv]=Börja chatta med någon direktmeddelandekontakt eller ändra din direktmeddelandestatus
 Comment[uk]=Почати спілкування з будь-яким з ваших контактів або змінити ваш запис стану у системах обміну повідомленнями
 Comment[x-test]=xxStart a chat with any of your IM contacts or change your IM statusxx
+Comment[zh_TW]=與您的即時訊息聯絡人開始聊天，或是變更您的即時訊息狀態
 Icon=user-online

 X-KDE-ServiceTypes=Plasma/Runner


Roll back change to use C++1y/C++14 flags.

Presumed to be causing issues with older libstdc++ (wheezy)

--- CompilerFeatures.cmake
+++ CompilerFeatures.cmake
@@ -5,17 +5,11 @@

 include(CheckCXXCompilerFlag)
 if(NOT MSVC)
-    check_cxx_compiler_flag("-std=c++14" COMPILER_SUPPORTS_CXX14)
-    check_cxx_compiler_flag("-std=c++1y" COMPILER_SUPPORTS_CXX1Y)
     check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
     check_cxx_compiler_flag("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
 endif()

-if(COMPILER_SUPPORTS_CXX14)
-    set(CMAKE_REQUIRED_FLAGS "-std=c++14")
-elseif(COMPILER_SUPPORTS_CXX1Y)
-    set(CMAKE_REQUIRED_FLAGS "-std=c++1y")
-elseif(COMPILER_SUPPORTS_CXX11)
+if(COMPILER_SUPPORTS_CXX11)
     set(CMAKE_REQUIRED_FLAGS "-std=c++11")
 elseif(COMPILER_SUPPORTS_CXX0X)
     set(CMAKE_REQUIRED_FLAGS "-std=c++0x")


[INTERNAL] Changing build system not to generate forwards any more.

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

--- seqan/util/cmake/FindSeqAn.cmake
+++ seqan/util/cmake/FindSeqAn.cmake
@@ -203,7 +203,7 @@
 function (seqan_setup_includes REL_PATH TARGET_NAME)
     set (PATH ${CMAKE_CURRENT_SOURCE_DIR}/${REL_PATH})
     set (PATH_BIN ${CMAKE_CURRENT_BINARY_DIR}/${REL_PATH})
-    file (GLOB HEADERS_TMP ${PATH}/seqan/[A-z]*/[A-z]*.h)
+    file (GLOB HEADERS ${PATH}/seqan/[A-z]*/[A-z]*.h)
     file (GLOB SUPER_HEADERS ${PATH}/seqan/[A-z]*.h)

     set (SEQAN_INCLUDE_DIR_FOR_${TARGET_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/${REL_PATH} ${CMAKE_CURRENT_BINARY_DIR}/${REL_PATH} CACHE INTERNAL "asdf" FORCE)
@@ -213,55 +213,11 @@

     set (SEQAN_LIBRARY_TARGETS ${TARGET_NAME} CACHE INTERNAL "asdf" FORCE)

-    foreach (HEADER ${HEADERS_TMP})
-        if (NOT ${HEADER} MATCHES ".*generated.*")
-            list (APPEND HEADERS ${HEADER})
-        else (NOT ${HEADER} MATCHES ".*generated.*")
-            list (APPEND FORWARDS ${HEADER})
-        endif (NOT ${HEADER} MATCHES ".*generated.*")
-    endforeach (HEADER ${HEADERS})
-
-    # Sort headers and forwards.
+    # Sort headers.
     if (HEADERS)
         list (SORT HEADERS)
     endif (HEADERS)
-    if (FORWARDS)
-        list (SORT FORWARDS)
-    endif (FORWARDS)

-    # ---------------------------------------------------------------------------
-    # Forwards Generation.
-    # ---------------------------------------------------------------------------
-    if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
-        file (GLOB BASE_CONTENTS RELATIVE ${PATH}/seqan ${PATH}/seqan/[A-z]*)
-        foreach (ENTRY ${BASE_CONTENTS})
-            if (IS_DIRECTORY ${PATH}/seqan/${ENTRY})
-                list (APPEND MODULES ${ENTRY})
-            endif (IS_DIRECTORY ${PATH}/seqan/${ENTRY})
-        endforeach (ENTRY ${SEQAN_BASE_CONTENTS})
-
-        if (MODULES)
-            list (SORT MODULES)
-            list (REMOVE_DUPLICATES MODULES)
-
-            # Build a list of generated forwards headers.  Goes into SEQAN_FORWARDS.
-            foreach (MODULE ${MODULES})
-                list (APPEND FORWARDS ${PATH_BIN}/seqan/${MODULE}/${MODULE}_generated_forwards.h)
-            endforeach (MODULE ${MODULES})
-
-            # Now tell CMake that the forward headers can be generated with
-            # build_forwards.py
-            add_custom_command (
-                OUTPUT ${FORWARDS}
-                COMMAND ${PYTHON_EXECUTABLE} ${SEQAN_ROOT_SOURCE_DIR}/util/bin/build_forwards.py ${PATH}/seqan ${PATH_BIN}/seqan all
-                DEPENDS ${HEADERS})
-            #message(STATUS "add_custom_command (
-            #    OUTPUT ${FORWARDS}
-            #    COMMAND ${PYTHON_EXECUTABLE} ${SEQAN_ROOT_SOURCE_DIR}/util/bin/build_forwards.py ${PATH}/seqan all
-            #    DEPENDS ${HEADERS})")
-        endif (MODULES)
-    endif (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
-
     # ---------------------------------------------------------------------------
     # GUI Setup Stuff.
     # ---------------------------------------------------------------------------
@@ -281,10 +237,8 @@
     add_custom_target(
         ${TARGET_NAME}
         DEPENDS ${HEADERS}
-                ${FORWARDS}
                 ${GUI_SOURCES}
     )
-    #message("add_custom_target(${TARGET_NAME} DEPENDS ${HEADERS} ${FORWARDS} ${GUI_SOURCES})")

     # Group library headers into modules.  The CMake documentation says this
     # is mostly (only?) used for Visual Studio Projects.
@@ -298,7 +252,7 @@
     # -----------------------------------------------------------------------
     # Installation
     # -----------------------------------------------------------------------
-    foreach (HEADER ${HEADERS} ${SUPER_HEADERS} ${FORWARDS})
+    foreach (HEADER ${HEADERS} ${SUPER_HEADERS})
         string(REPLACE ${CMAKE_CURRENT_BINARY_DIR}/${REL_PATH}/seqan "" NEW_PATH ${HEADER})
         string(REPLACE ${BASE_ABS} "" NEW_PATH ${NEW_PATH})
         string(REPLACE "//" "/" NEW_PATH ${NEW_PATH})


Fix bug in vpm_add_executable

Fix bug in vpm_add_executable

--- package_build.cmake
+++ package_build.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2011-2013, Christian Rorvik
+# Copyright (c) 2011-2014, Christian Rorvik
 # Distributed under the Simplified BSD License (See accompanying file LICENSE.txt)

 include(debug.cmake)
@@ -44,7 +44,7 @@
 endmacro()

 macro(vpm_add_executable _name)
-  add_executable(${ARGN})
+  add_executable(${_name} ${ARGN})
 endmacro()

 macro(vpm_add_link_dependencies _name)


enca: disable forced rebuilds

enca: disable forced rebuilds

At least until the build system is less derpy.

--- packages/enca.cmake
+++ packages/enca.cmake
@@ -12,7 +12,7 @@
     LOG_DOWNLOAD 1 LOG_UPDATE 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
 )

-force_rebuild_git(enca)
+# force_rebuild_git(enca)
 autoreconf(enca)

 ExternalProject_Add_Step(enca fix-configure


forgot options

forgot options

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -103,13 +103,15 @@
 ENDIF (UNIX)

 #
-# Look for the PNG and zlib libraries and header files
+# Look for the PNG, zlib, and jpeg libraries and header files
 #
 INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Utilities/zlib)
 INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Utilities/png)
+INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Utilities/jpeg)
 IF (NOT LIBRARY_OUTPUT_PATH)
   LINK_DIRECTORIES(${VTK_BINARY_DIR}/Utilities/png)
   LINK_DIRECTORIES(${VTK_BINARY_DIR}/Utilities/zlib)
+  LINK_DIRECTORIES(${VTK_BINARY_DIR}/Utilities/jpeg)
 ENDIF (NOT LIBRARY_OUTPUT_PATH)

 #


After version 0.4.10

After version 0.4.10

--- Modules/ManageVersion.cmake
+++ Modules/ManageVersion.cmake
@@ -69,30 +69,28 @@
 	    || echo Inconsistent version detected. Fixing.. && ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR}
 	    )

-	#CONFIGURE_FILE(ChangeLog.in ChangeLog)
+	CONFIGURE_FILE(ChangeLog.in ChangeLog)

-	#ADD_CUSTOM_COMMAND(OUTPUT ChangeLog
-	#    COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR}
-	#    DEPENDS ${releaseFile} ChangeLog.prev
-	#    COMMENT "ChangeLog is older than ${releaseFile}. Rebuilding"
-	#    VERBATIM
-	#    )
+	ADD_CUSTOM_COMMAND(OUTPUT ChangeLog
+	    COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR}
+	    DEPENDS ${releaseFile} ChangeLog.prev
+	    COMMENT "ChangeLog is older than ${releaseFile}. Rebuilding"
+	    VERBATIM
+	    )

 	ADD_CUSTOM_TARGET(changelog ALL
 	    DEPENDS ${CMAKE_SOURCE_DIR}/ChangeLog
 	    )

-	ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_SOURCE_DIR}/ChangeLog
-	    COMMAND ${CMAKE_COMMAND} -E echo "* ${TODAY_CHANGELOG} ${MAINTAINER} - ${PRJ_VER}" > ChangeLog
-	    COMMAND cat ${releaseFile}_NO_PACK_CHANGELOG_ITEM  >> ChangeLog
-	    COMMAND echo -e "\\n" >> ChangeLog
-	    COMMAND cat ChangeLog.prev >> ChangeLog
-	    DEPENDS ${CMAKE_SOURCE_DIR}/${releaseFile} ${CMAKE_SOURCE_DIR}/ChangeLog.prev
-	    COMMENT "Building ChangeLog"
-	    VERBATIM
-	    )
-
-
+	#ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_SOURCE_DIR}/ChangeLog
+	#    COMMAND ${CMAKE_COMMAND} -E echo "* ${TODAY_CHANGELOG} ${MAINTAINER} - ${PRJ_VER}" > ChangeLog
+	#    COMMAND cat ${releaseFile}_NO_PACK_CHANGELOG_ITEM  >> ChangeLog
+	#    COMMAND echo -e "\\n" >> ChangeLog
+	#    COMMAND cat ChangeLog.prev >> ChangeLog
+	#    DEPENDS ${CMAKE_SOURCE_DIR}/${releaseFile} ${CMAKE_SOURCE_DIR}/ChangeLog.prev
+	#    COMMENT "Building ChangeLog"
+	#    VERBATIM
+	#    )
     ENDMACRO(LOAD_RELEASE_FILE releaseFile)

 ENDIF(NOT DEFINED _MANAGE_VERSION_CMAKE_)


ENH: Unmark FLTK variables as Advanced. The "advanced" option is not required      now to see them.

--- Utilities/ITKFindFLTK.cmake
+++ Utilities/ITKFindFLTK.cmake
@@ -28,3 +28,10 @@
 ENDIF(FLTK_FLUID_EXE)

+
+MARK_AS_ADVANCED( CLEAR
+  FLTK_FLUID_EXE
+  FLTK_INCLUDE_PATH
+  FLTK_LIBRARY
+)
+


example Boost-stdlibcxx do not modify flags if compiler is not Clang

--- examples/Boost-stdlibcxx/toolchain.cmake
+++ examples/Boost-stdlibcxx/toolchain.cmake
@@ -9,28 +9,33 @@
   set(EXAMPLE_TOOLCHAIN_CMAKE 1)
 endif()

-set(
-    CMAKE_CXX_FLAGS
-    "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libstdc++"
-    CACHE
-    STRING
-    "C++ compiler flags"
-)
+string(COMPARE EQUAL "${CMAKE_CXX_COMPILER_ID}" "Clang" is_clang)
+string(COMPARE EQUAL "${CMAKE_CXX_COMPILER_ID}" "AppleClang" is_apple_clang)

-set(
-    CMAKE_EXE_LINKER_FLAGS
-    "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libstdc++"
-    CACHE
-    STRING
-    "Executable linker flags"
-    FORCE
-)
+if(is_clang OR is_apple_clang)
+  set(
+      CMAKE_CXX_FLAGS
+      "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libstdc++"
+      CACHE
+      STRING
+      "C++ compiler flags"
+  )

-set(
-    CMAKE_SHARED_LINKER_FLAGS
-    "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libstdc++"
-    CACHE
-    STRING
-    "Shared library linker flags"
-    FORCE
-)
+  set(
+      CMAKE_EXE_LINKER_FLAGS
+      "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libstdc++"
+      CACHE
+      STRING
+      "Executable linker flags"
+      FORCE
+  )
+
+  set(
+      CMAKE_SHARED_LINKER_FLAGS
+      "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libstdc++"
+      CACHE
+      STRING
+      "Shared library linker flags"
+      FORCE
+  )
+endif()


fixed encoeded list decode

fixed encoeded list decode

--- cmake/collections/encoded_list/encoded_list.cmake
+++ cmake/collections/encoded_list/encoded_list.cmake
@@ -25,7 +25,7 @@
   string_codes()
   eval("
   function(encoded_list_decode str)
-    if(\"\${str}\" STREQUAL \"${empty_code}\")
+    if(\"\${str}_\" STREQUAL \"${empty_code}_\")
       return()
     endif()
     string(REPLACE \"${bracket_open_code}\" \"[\"  str \"\${str}\")


[CMake] [macho_embedded] [builtins] Always use OS X sysroot, even for arm.

Turns out that there are some checks in the backend that change code generation for armv7 if you are building against an iOS sys root. For the macho_embedded builtins we really don't want that.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@253064 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -411,11 +411,8 @@
       string(TOLOWER "${float_type}_${type}" lib_suffix)
       foreach(arch ${DARWIN_${float_type}_FLOAT_ARCHS})
         set(DARWIN_macho_embedded_SYSROOT ${DARWIN_osx_SYSROOT})
-        set(DARWIN_macho_embedded_BUILTIN_MIN_VER_FLAG ${DARWIN_osx_BUILTIN_MIN_VER_FLAG})
         set(float_flag)
         if(${arch} MATCHES "^arm")
-          set(DARWIN_macho_embedded_SYSROOT ${DARWIN_ios_SYSROOT})
-          set(DARWIN_macho_embedded_BUILTIN_MIN_VER_FLAG ${DARWIN_ios_BUILTIN_MIN_VER_FLAG})
           # x86 targets are hard float by default, but the complain about the
           # float ABI flag, so don't pass it unless we're targeting arm.
           set(float_flag ${${float_type}_FLOAT_FLAG})


Add SPIRV-Headers 1.5.1.corrected (#297)

* Add SPIRV-Headers 1.5.1.corrected

* remove hunter config

Co-authored-by: Eli Semory <396edcaad17f10b0c86db72085779dcc532e90fa@snap.com>

--- cmake/projects/SPIRV-Headers/hunter.cmake
+++ cmake/projects/SPIRV-Headers/hunter.cmake
@@ -25,6 +25,17 @@
     PACKAGE_NAME
     SPIRV-Headers
     VERSION
+    1.5.1.corrected
+    URL
+    https://github.com/KhronosGroup/SPIRV-Headers/archive/1.5.1.corrected.tar.gz
+    SHA1
+    e7911f27a13c61e9d8c13fe7b0df5f1a883e972e
+)
+
+hunter_add_version(
+    PACKAGE_NAME
+    SPIRV-Headers
+    VERSION
     1.5.3.reservations1
     URL
     https://github.com/KhronosGroup/SPIRV-Headers/archive/1.5.3.reservations1.tar.gz


Refactoring cmake macros.

Refactoring cmake macros.

--- external/External.cmake
+++ external/External.cmake
@@ -5,11 +5,11 @@
 #/// Check exists libraries.
 #///
 #/// @param __result  [out] value name of output result.
-#/// @param __files   [in]  Files.
-function (exists_files __result __files)
+#/// @param ...       [in]  Files.
+function (exists_files __result)
     set (${__result} ON)

-    foreach (__lib_cursor ${__files})
+    foreach (__lib_cursor ${ARGN})
         if (NOT EXISTS "${__lib_cursor}")
             set (${__result} OFF)
             break ()
@@ -24,9 +24,9 @@
 #///
 #/// @param __name  [in] Print name.
 #/// @param __deps  [in] Dependencies.
-#/// @param __files [in] Output files.
-function (fake_output_library __name __deps __files)
-    add_custom_command (OUTPUT  ${__files}
+#/// @param ...     [in] Output files.
+function (fake_output_library __name __deps)
+    add_custom_command (OUTPUT  ${ARGN}
                         COMMAND ${CMAKE_COMMAND} -E echo "Fake output: ${__name}"
                         DEPENDS ${__deps})
 endfunction ()
@@ -62,7 +62,7 @@
 set (uv_EXT_INCLUDE_DIR  "${EXT_INSTALL_DIR}/include")
 set (uv_EXT_STATIC_LIB   "${EXT_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${uv_EXT_STATIC_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}")
 set (uv_EXT_LIBRARIES    "${uv_EXT_STATIC_LIB}")
-exists_files (uv_EXT_EXISTS "${uv_EXT_LIBRARIES}")
+exists_files (uv_EXT_EXISTS ${uv_EXT_LIBRARIES})

 if (uv_EXT_EXISTS)
     message (STATUS "Skip external/uv (Exists: ${uv_EXT_STATIC_LIB})")
@@ -89,7 +89,7 @@
             LOG_BUILD     0
             LOG_TEST      1
             LOG_INSTALL   1)
-    fake_output_library (uv_ext_output uv_ext "${uv_EXT_LIBRARIES}")
+    fake_output_library (uv_ext_output uv_ext ${uv_EXT_LIBRARIES})
 endif ()
 add_custom_target (uv DEPENDS ${uv_EXT_LIBRARIES})

@@ -111,7 +111,7 @@
 set (zlib_EXT_INCLUDE_DIR  "${EXT_INSTALL_DIR}/include")
 set (zlib_EXT_STATIC_LIB   "${EXT_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${zlib_EXT_STATIC_LIB_NAME}${zlib_EXT_DEBUG_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}")
 set (zlib_EXT_LIBRARIES    "${zlib_EXT_STATIC_LIB}")
-exists_files (zlib_EXT_EXISTS "${zlib_EXT_LIBRARIES}")
+exists_files (zlib_EXT_EXISTS ${zlib_EXT_LIBRARIES})

 if (zlib_EXT_EXISTS)
     message (STATUS "Skip external/zlib (Exists: ${zlib_EXT_STATIC_LIB})")
@@ -137,7 +137,7 @@
             LOG_BUILD     0
             LOG_TEST      1
             LOG_INSTALL   1)
-    fake_output_library (zlib_ext_output zlib_ext "${zlib_EXT_LIBRARIES}")
+    fake_output_library (zlib_ext_output zlib_ext ${zlib_EXT_LIBRARIES})
 endif ()
 add_custom_target (zlib DEPENDS ${zlib_EXT_LIBRARIES})

@@ -153,7 +153,7 @@
 set (ressl_EXT_LIBRARIES         "${ressl_crypto_EXT_STATIC_LIB}"
                                  "${ressl_ssl_EXT_STATIC_LIB}"
                                  "${ressl_tls_EXT_STATIC_LIB}")
-exists_files (ressl_EXT_EXISTS "${ressl_EXT_LIBRARIES}")
+exists_files (ressl_EXT_EXISTS ${ressl_EXT_LIBRARIES})

 if (ressl_EXT_EXISTS)
     message (STATUS "Skip external/ressl_crypto (Exists: ${ressl_crypto_EXT_STATIC_LIB})")
@@ -181,7 +181,7 @@
             LOG_BUILD     0
             LOG_TEST      1
             LOG_INSTALL   1)
-    fake_output_library (ressl_ext_output ressl_ext "${ressl_EXT_LIBRARIES}")
+    fake_output_library (ressl_ext_output ressl_ext ${ressl_EXT_LIBRARIES})
 endif ()
 add_custom_target (ressl DEPENDS ${ressl_EXT_LIBRARIES})

@@ -193,7 +193,7 @@
 set (freetype_EXT_INCLUDE_DIR  "${EXT_INSTALL_DIR}/include")
 set (freetype_EXT_STATIC_LIB   "${EXT_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}freetype${CMAKE_STATIC_LIBRARY_SUFFIX}")
 set (freetype_EXT_LIBRARIES    "${freetype_EXT_STATIC_LIB}")
-exists_files (freetype_EXT_EXISTS "${freetype_EXT_LIBRARIES}")
+exists_files (freetype_EXT_EXISTS ${freetype_EXT_LIBRARIES})

 if (freetype_EXT_EXISTS)
     message (STATUS "Skip external/freetype (Exists: ${freetype_EXT_STATIC_LIB})")
@@ -223,7 +223,7 @@
             LOG_BUILD     0
             LOG_TEST      1
             LOG_INSTALL   1)
-    fake_output_library (freetype_ext_output freetype_ext "${freetype_EXT_LIBRARIES}")
+    fake_output_library (freetype_ext_output freetype_ext ${freetype_EXT_LIBRARIES})
 endif ()
 add_custom_target (freetype DEPENDS ${freetype_EXT_LIBRARIES})

@@ -235,7 +235,7 @@
 set (ogg_EXT_INCLUDE_DIR  "${EXT_INSTALL_DIR}/include")
 set (ogg_EXT_STATIC_LIB   "${EXT_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}ogg${CMAKE_STATIC_LIBRARY_SUFFIX}")
 set (ogg_EXT_LIBRARIES    "${ogg_EXT_STATIC_LIB}")
-exists_files (ogg_EXT_EXISTS "${ogg_EXT_LIBRARIES}")
+exists_files (ogg_EXT_EXISTS ${ogg_EXT_LIBRARIES})

 if (ogg_EXT_EXISTS)
     message (STATUS "Skip external/ogg (Exists: ${ogg_EXT_STATIC_LIB})")
@@ -257,7 +257,7 @@
             LOG_BUILD     0
             LOG_TEST      1
             LOG_INSTALL   1)
-    fake_output_library (ogg_ext_output ogg_ext "${ogg_EXT_LIBRARIES}")
+    fake_output_library (ogg_ext_output ogg_ext ${ogg_EXT_LIBRARIES})
 endif ()
 add_custom_target (ogg DEPENDS ${ogg_EXT_LIBRARIES})

@@ -271,7 +271,7 @@
 set (flacxx_EXT_STATIC_LIB "${EXT_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}FLACXX${CMAKE_STATIC_LIBRARY_SUFFIX}")
 set (flac_EXT_LIBRARIES    "${flac_EXT_STATIC_LIB}"
                            "${flacxx_EXT_STATIC_LIB}")
-exists_files (flac_EXT_EXISTS "${flac_EXT_LIBRARIES}")
+exists_files (flac_EXT_EXISTS ${flac_EXT_LIBRARIES})

 if (flac_EXT_EXISTS)
     message (STATUS "Skip external/flac (Exists: ${flac_EXT_STATIC_LIB})")
@@ -299,7 +299,7 @@
             LOG_INSTALL   1
             #--Dependencies---------------
             DEPENDS ogg)
-    fake_output_library (flac_ext_output flac_ext "${flac_EXT_LIBRARIES}")
+    fake_output_library (flac_ext_output flac_ext ${flac_EXT_LIBRARIES})
 endif ()
 add_custom_target (flac DEPENDS ${flac_EXT_LIBRARIES})

@@ -315,7 +315,7 @@
 set (vorbis_EXT_LIBRARIES       "${vorbis_EXT_STATIC_LIB}"
                                 "${vorbisenc_EXT_STATIC_LIB}"
                                 "${vorbisfile_EXT_STATIC_LIB}")
-exists_files (vorbis_EXT_EXISTS "${vorbis_EXT_LIBRARIES}")
+exists_files (vorbis_EXT_EXISTS ${vorbis_EXT_LIBRARIES})

 if (vorbis_EXT_EXISTS)
     message (STATUS "Skip external/vorbis (Exists: ${vorbis_EXT_STATIC_LIB})")
@@ -342,7 +342,7 @@
             LOG_INSTALL   1
             #--Dependencies---------------
             DEPENDS ogg)
-    fake_output_library (vorbis_ext_output vorbis_ext "${vorbis_EXT_LIBRARIES}")
+    fake_output_library (vorbis_ext_output vorbis_ext ${vorbis_EXT_LIBRARIES})
 endif ()
 add_custom_target (vorbis DEPENDS ${vorbis_EXT_LIBRARIES})

@@ -366,7 +366,7 @@
                                     "${sfml_window_EXT_STATIC_LIB}"
                                     "${sfml_graphics_EXT_STATIC_LIB}"
                                     "${sfml_audio_EXT_STATIC_LIB}")
-exists_files (sfml_EXT_EXISTS   "${sfml_EXT_LIBRARIES}")
+exists_files (sfml_EXT_EXISTS ${sfml_EXT_LIBRARIES})

 if (sfml_EXT_EXISTS)
     message (STATUS "Skip external/sfml_system (Exists: ${sfml_system_EXT_STATIC_LIB})")
@@ -406,7 +406,7 @@
             LOG_INSTALL   1
             #--Dependencies---------------
             DEPENDS ogg vorbis flac freetype)
-    fake_output_library (sfml_ext_output sfml_ext "${sfml_EXT_LIBRARIES}")
+    fake_output_library (sfml_ext_output sfml_ext ${sfml_EXT_LIBRARIES})
 endif ()
 add_custom_target (sfml DEPENDS ${sfml_EXT_LIBRARIES})

@@ -420,7 +420,7 @@
 set (luajit_EXT_STATIC_LIB   "${EXT_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}lua${CMAKE_STATIC_LIBRARY_SUFFIX}")
 set (luajit_EXT_LIBRARIES    "${luajit_EXT_STATIC_LIB}"
                              "${luajit_EXT_CONF_HEADER}")
-exists_files (luajit_EXT_EXISTS "${luajit_EXT_LIBRARIES}")
+exists_files (luajit_EXT_EXISTS ${luajit_EXT_LIBRARIES})

 if (luajit_EXT_EXISTS)
     message (STATUS "Skip external/luajit (Exists: ${luajit_EXT_STATIC_LIB})")
@@ -445,7 +445,7 @@
             LOG_BUILD     0
             LOG_TEST      1
             LOG_INSTALL   1)
-    fake_output_library (luajit_ext_output luajit_ext "${luajit_EXT_LIBRARIES}")
+    fake_output_library (luajit_ext_output luajit_ext ${luajit_EXT_LIBRARIES})
 endif ()
 add_custom_target (luajit DEPENDS ${luajit_EXT_LIBRARIES})


DOC: Document Nonunit/IntegratedTest module.

Change-Id: I5dc0bf4d46737d7c0c121986b068b555ed4e437e

--- Modules/Nonunit/IntegratedTest/itk-module.cmake
+++ Modules/Nonunit/IntegratedTest/itk-module.cmake
@@ -1,3 +1,6 @@
+set(DOCUMENTATION "This modules contains tests targeting the behavior of
+multiple modules of the toolkit when they act together.")
+
 itk_module(ITKIntegratedTest
   TEST_DEPENDS
     ITKAnisotropicSmoothing
@@ -76,4 +79,6 @@
     ITKVTK
     ITKWatersheds
     ITKTestKernel
+  DESCRIPTION
+    "${DOCUMENTATION}"
 )


Fix ospray/travis flag

Fix ospray/travis flag

--- Superbuild/Superbuild.cmake
+++ Superbuild/Superbuild.cmake
@@ -102,12 +102,10 @@

 IF(TRAVIS_BUILD)
   IF(APPLE)
-    SET(WITH_OSPRAY OFF)
     SET(BUILD_TESTING OFF)
     SET(DOWNLOAD_TOOLKITS OFF)
     SET(BUILD_WITH_SCIRUN_DATA OFF)
   ELSE()
-    SET(WITH_OSPRAY OFF)
 	  SET(BUILD_TESTING OFF)
 	  SET(DOWNLOAD_TOOLKITS OFF)
 	  SET(BUILD_WITH_SCIRUN_DATA OFF)


Add bigobj compiler flag for windows

Add bigobj compiler flag for windows

--- cmake/platform/win32/platform.cmake
+++ cmake/platform/win32/platform.cmake
@@ -47,6 +47,7 @@
 add_compiler_flags(/FS) # build with multi processors
 add_compiler_flags(/std:c++17)
 add_compiler_flags(/EHsc)
+add_compiler_flags(/bigobj)

 set(WIN_TARGET 0x0601) # Windows XP SP2
 set(WIN_SDK_MIN 0x0601) # Windows Vista


[cmake] kernel requires linking to BLAS and LAPACK

Fixes #238.

--- cmake/siconos_find_common_dep.cmake
+++ cmake/siconos_find_common_dep.cmake
@@ -6,8 +6,8 @@

 # --- Blas Lapack ---
 # include(BlasLapackSetup)
-compile_with(BLAS REQUIRED SICONOS_COMPONENTS numerics externals)
-compile_with(LAPACK REQUIRED SICONOS_COMPONENTS numerics externals)
+compile_with(BLAS REQUIRED SICONOS_COMPONENTS kernel numerics externals)
+compile_with(LAPACK REQUIRED SICONOS_COMPONENTS kernel numerics externals)
 if(NOT BLAS_INCLUDE_DIRS)
   message(FATAL_ERROR "cannot find blas include directories")
 endif()


Adjusted cmake file to avoid clash with alloproject cmake file

--- cmake_modules/CMakeRunTargets.cmake
+++ cmake_modules/CMakeRunTargets.cmake
@@ -2,6 +2,8 @@
 #if(NOT (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})) # use only if cmake was run from the root directory
 #    message(FATAL_ERROR "Error: The run script must be called from the source root directory." )
 #endif(NOT (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}))
+
+message("Using AlloSystem Run facilties.")

 string(REGEX MATCH ".*\\*.*" match "${CMAKE_CURRENT_SOURCE_DIR}")
 IF(NOT ${match} STREQUAL "")
@@ -10,12 +12,12 @@

 if(BUILD_DIR)
   string(REGEX REPLACE "/+$" "" ALLOSYSTEM_BUILD_APP_DIR "${ALLOSYSTEM_BUILD_APP_DIR}") # remove trailing slash
-  file(GLOB ALLOPROJECT_APP_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${ALLOSYSTEM_BUILD_APP_DIR}/*.cpp)
+  file(GLOB ALLOSYSTEM_APP_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${ALLOSYSTEM_BUILD_APP_DIR}/*.cpp)
   string(REPLACE "/" "_" APP_NAME "${ALLOSYSTEM_BUILD_APP_DIR}")
   string(REGEX REPLACE "_+$" "" APP_NAME "${APP_NAME}")
   set(SOURCE_DIR "${ALLOSYSTEM_BUILD_APP_DIR}")
 else()
-  set(ALLOPROJECT_APP_SRC "${BUILD_APP_FILE}")
+  set(ALLOSYSTEM_APP_SRC "${BUILD_APP_FILE}")
   string(REPLACE "/" "_" APP_NAME "${BUILD_APP_FILE}")
   get_filename_component(APP_NAME "${APP_NAME}" NAME)
   STRING(REGEX REPLACE "\\.[^.]*\$" "" APP_NAME "${APP_NAME}")
@@ -26,7 +28,7 @@

 set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build/bin)

-add_executable("${APP_NAME}" EXCLUDE_FROM_ALL ${ALLOPROJECT_APP_SRC})
+add_executable("${APP_NAME}" EXCLUDE_FROM_ALL ${ALLOSYSTEM_APP_SRC})

 if(EXISTS "${SOURCE_DIR}/flags.cmake")
     include("${SOURCE_DIR}/flags.cmake")
@@ -46,7 +48,7 @@
 endif()

 message(STATUS "Target: ${APP_NAME}")
-message(STATUS "From sources: ${ALLOPROJECT_APP_SRC}")
+message(STATUS "From sources: ${ALLOSYSTEM_APP_SRC}")

 # Dependencies (check if targets exist and set variables)
 get_target_property(ALLOCORE_LIBRARY allocore${DEBUG_SUFFIX} LOCATION)
@@ -155,14 +157,14 @@
   ${ALLOCORE_LIBRARY}
   ${ALLOCORE_LINK_LIBRARIES})

-#list(REMOVE_ITEM PROJECT_RES_FILES ${ALLOPROJECT_APP_SRC})
+#list(REMOVE_ITEM PROJECT_RES_FILES ${ALLOSYSTEM_APP_SRC})

 if(NOT RUN_IN_DEBUGGER)
 add_custom_target("${APP_NAME}_run"
   COMMAND "${APP_NAME}"
   DEPENDS "${APP_NAME}"
   WORKING_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}"
-  SOURCES ${ALLOPROJECT_APP_SRC}
+  SOURCES ${ALLOSYSTEM_APP_SRC}
   COMMENT "Running: ${APP_NAME}")
   option(RUN_IN_DEBUGGER 0) # For next run
 else()
@@ -170,7 +172,7 @@
   COMMAND "${ALLOSYSTEM_DEBUGGER}" "-ex" "run" "${EXECUTABLE_OUTPUT_PATH}/${APP_NAME}"
   DEPENDS "${APP_NAME}"
   WORKING_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}"
-  SOURCES ${ALLOPROJECT_APP_SRC}
+  SOURCES ${ALLOSYSTEM_APP_SRC}
   COMMENT "Running: ${APP_NAME}")

 endif(NOT RUN_IN_DEBUGGER)


fix cmake error

fix cmake error

--- cmakemodules/script_nanoflann.cmake
+++ cmakemodules/script_nanoflann.cmake
@@ -10,13 +10,15 @@

 if (NOT nanoflann_FOUND)
     message(STATUS "--- Running CMake on external submodule 'nanoflann'...")
+    file(MAKE_DIRECTORY "${nanoflann_EMBEDDED_BUILD_DIR}")
     execute_process(COMMAND
-        ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -S "${MRPT_SOURCE_DIR}/3rdparty/nanoflann" -B "${nanoflann_EMBEDDED_BUILD_DIR}"
+        ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -S "${MRPT_SOURCE_DIR}/3rdparty/nanoflann"
         -DNANOFLANN_BUILD_EXAMPLES=OFF
         -DNANOFLANN_BUILD_BENCHMARKS=OFF
         -DNANOFLANN_BUILD_TESTS=OFF
         -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
       RESULT_VARIABLE result
+      WORKING_DIRECTORY "${nanoflann_EMBEDDED_BUILD_DIR}"
       )
     if(result)
       message(FATAL_ERROR "CMake step for nanoflann failed: ${result}")


lua-openssl: add xalgor to lua-openssl.cmake

--- deps/lua-openssl.cmake
+++ deps/lua-openssl.cmake
@@ -45,6 +45,7 @@
   ${LUA_OPENSSL_DIR}/src/xattrs.c
   ${LUA_OPENSSL_DIR}/src/xexts.c
   ${LUA_OPENSSL_DIR}/src/xname.c
+  ${LUA_OPENSSL_DIR}/src/xalgor.c
   ${LUA_OPENSSL_DIR}/src/xstore.c
 )


mpv: disable libquvi support

mpv: disable libquvi support

It never really worked, and libquvi seems to have died after the
retarded AGPL relicensing procedure and switch to unmaintained
Lua modules that aren’t packaged by any popular Linux distro.

--- packages/mpv.cmake
+++ packages/mpv.cmake
@@ -10,7 +10,7 @@
         libiconv
         libjpeg
         libpng
-        libquvi
+        luajit
         portaudio
         winpthreads
     GIT_REPOSITORY git://github.com/mpv-player/mpv.git
@@ -60,18 +60,6 @@
     COMMENT "Copying mpv binaries and manual"
 )

-ExternalProject_Add_Step(mpv copy-lua-modules
-    DEPENDEES clean-package-dir
-    COMMAND ${EXEC} cp -r ${MINGW_INSTALL_PREFIX}/lua/5.1/* ${CMAKE_CURRENT_BINARY_DIR}/mpv-package
-    COMMENT "Copying Lua modules"
-)
-
-ExternalProject_Add_Step(mpv copy-libquvi-scripts
-    DEPENDEES clean-package-dir
-    COMMAND ${CMAKE_COMMAND} -E copy_directory ${MINGW_INSTALL_PREFIX}/share/libquvi-scripts ${CMAKE_CURRENT_BINARY_DIR}/mpv-package/libquvi-scripts
-    COMMENT "Copying libquvi scripts"
-)
-
 ExternalProject_Add_Step(mpv copy-font-stuff
     DEPENDEES clean-package-dir
     COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/mpv/mpv ${CMAKE_CURRENT_BINARY_DIR}/mpv-package/mpv
@@ -80,7 +68,7 @@
 )

 ExternalProject_Add_Step(mpv pack-binary
-    DEPENDEES copy-binary copy-lua-modules copy-libquvi-scripts copy-font-stuff
+    DEPENDEES copy-binary copy-font-stuff
     COMMAND ${CMAKE_COMMAND} -E remove ../../mpv-${TARGET_CPU}-${BUILDDATE}.7z
     COMMAND ${EXEC} 7z a -m0=lzma2 -mx=9 -ms=on ../../mpv-${TARGET_CPU}-${BUILDDATE}.7z *
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mpv-package


InstallBasicPackagesFiles: add multiple target properties

--- conf/InstallBasicPackageFiles.cmake
+++ conf/InstallBasicPackageFiles.cmake
@@ -15,6 +15,7 @@
 #                              VERSION <version>
 #                              COMPATIBILITY <compatibility>
 #                              TARGETS_PROPERTY <property_name>
+#                              TARGETS_PROPERTIES <property1_name> <property1_name>
 #                              [NO_SET_AND_CHECK_MACRO]
 #                              [NO_CHECK_REQUIRED_COMPONENTS_MACRO]
 #                              [VARS_PREFIX <prefix>] # (default = "<name>")
@@ -148,7 +149,8 @@
                       VARS_PREFIX
                       DESTINATION
                       NAMESPACE)
-    set(_multiValueArgs EXTRA_PATH_VARS_SUFFIX)
+    set(_multiValueArgs EXTRA_PATH_VARS_SUFFIX
+                        TARGETS_PROPERTIES)
     cmake_parse_arguments(_IBPF "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" "${ARGN}")

     if(NOT DEFINED _IBPF_VARS_PREFIX)
@@ -163,8 +165,12 @@
         message(FATAL_ERROR "COMPATIBILITY argument is required")
     endif()

-    if(NOT DEFINED _IBPF_TARGETS_PROPERTY)
-        message(FATAL_ERROR "TARGETS_PROPERTY argument is required")
+    if(NOT DEFINED _IBPF_TARGETS_PROPERTY AND NOT DEFINED _IBPF_TARGETS_PROPERTIES)
+        message(FATAL_ERROR "TARGETS_PROPERTY or TARGET_PROPERTIES argument is required")
+    endif()
+
+    if(DEFINED _IBPF_TARGETS_PROPERTY AND DEFINED _IBPF_TARGETS_PROPERTIES)
+        message(FATAL_ERROR "Only one argument between TARGETS_PROPERTY or TARGET_PROPERTIES can be used")
     endif()

     if(_IBPF_UPPERCASE_FILENAMES AND _IBPF_LOWERCASE_FILENAMES)
@@ -252,7 +258,15 @@

     # Get targets from GLOBAL PROPERTY
-    get_property(_targets GLOBAL PROPERTY ${_IBPF_TARGETS_PROPERTY})
+    if(DEFINED _IBPF_TARGETS_PROPERTY)
+        get_property(_targets GLOBAL PROPERTY ${_IBPF_TARGETS_PROPERTY})
+    else()
+        set(_targets)
+        foreach(_prop ${_IBPF_TARGETS_PROPERTIES})
+            get_property(_prop_val GLOBAL PROPERTY ${_prop})
+            list(APPEND _targets ${_prop_val})
+        endforeach()
+    endif()
     foreach(_target ${_targets})
         list(APPEND ${_IBPF_VARS_PREFIX}_TARGETS ${_Name}::${_target})
     endforeach()


Remove a bad idea

Remove a bad idea

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@27304 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/configure/configure_1_threads.cmake
+++ deal.II/cmake/configure/configure_1_threads.cmake
@@ -18,14 +18,6 @@
 # library:
 #

-
-#
-# Default to off
-#
-SET(DEAL_II_WITH_THREADS
-  OFF # Default to off
-  CACHE BOOL "Build deal.II with threading support." FORCE
-  )

 #
 # Set up genereal threading:


refs #4871 speed up tag generation for cscope and idutils

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@46022 c7de825b-a66e-492c-adef-691d508d4ae1

--- cmake_modules/TokuBuildTagDatabases.cmake
+++ cmake_modules/TokuBuildTagDatabases.cmake
@@ -63,11 +63,15 @@
 if (USE_CSCOPE)
   find_program(CSCOPE "cscope")
   if (NOT CSCOPE MATCHES NOTFOUND)
+    file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cscope.files" "")
+    foreach(file ${all_srcs} ${all_hdrs})
+      file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/cscope.files" "${file}\n")
+    endforeach(file)
     add_custom_command(
       OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/cscope.out"
       OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/cscope.in.out"
       OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/cscope.po.out"
-      COMMAND ${CSCOPE} -b -q -R
+      COMMAND ${CSCOPE} -b -q -R -i"${CMAKE_CURRENT_BINARY_DIR}/cscope.files" -I"${CMAKE_CURRENT_SOURCE_DIR}" -I"${CMAKE_CURRENT_SOURCE_DIR}/include" -I"${CMAKE_CURRENT_SOURCE_DIR}/toku_include" -I"${CMAKE_CURRENT_SOURCE_DIR}/portability" -I"${CMAKE_CURRENT_SOURCE_DIR}/portability/tests" -I"${CMAKE_CURRENT_SOURCE_DIR}/ft" -I"${CMAKE_CURRENT_SOURCE_DIR}/ft/tests" -I"${CMAKE_CURRENT_SOURCE_DIR}/src" -I"${CMAKE_CURRENT_SOURCE_DIR}/src/range_tree" -I"${CMAKE_CURRENT_SOURCE_DIR}/src/range_tree/tests" -I"${CMAKE_CURRENT_SOURCE_DIR}/src/lock_tree" -I"${CMAKE_CURRENT_SOURCE_DIR}/src/lock_tree/tests" -I"${CMAKE_CURRENT_SOURCE_DIR}/src/tests" -I"${CMAKE_CURRENT_SOURCE_DIR}/utils" -I"${CMAKE_CURRENT_SOURCE_DIR}/db-benchmark-test" -I"${CMAKE_CURRENT_BINARY_DIR}" -I"${CMAKE_CURRENT_BINARY_DIR}/toku_include" -I"${CMAKE_CURRENT_BINARY_DIR}/buildheader"
       DEPENDS ${all_srcs} ${all_hdrs} install_tdb_h generate_config_h generate_log_code
       WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
     add_custom_target(build_cscope.out ALL DEPENDS
@@ -80,15 +84,11 @@
 option(USE_GTAGS "Build the gtags database." ON)
 if (USE_GTAGS)
   find_program(GTAGS "gtags")
-  find_program(MKID "mkid")
   if (NOT GTAGS MATCHES NOTFOUND)
     file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/gtags.files" "")
     foreach(file ${all_srcs} ${all_hdrs})
       file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/gtags.files" "${file}\n")
     endforeach(file)
-    if (NOT MKID MATCHES NOTFOUND)
-      set(idutils_option "-I")
-    endif ()
     add_custom_command(
       OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/GTAGS"
       OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/GRTAGS"
@@ -104,3 +104,17 @@
       "${CMAKE_CURRENT_SOURCE_DIR}/GSYMS")
   endif ()
 endif ()
+
+option(USE_MKID "Build the idutils database." ON)
+if (USE_MKID)
+  find_program(MKID "mkid")
+  if (NOT MKID MATCHES NOTFOUND)
+    add_custom_command(
+      OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/ID"
+      COMMAND ${MKID} ${all_srcs} ${all_hdrs}
+      DEPENDS ${all_srcs} ${all_hdrs} install_tdb_h generate_config_h generate_log_code
+      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
+    add_custom_target(build_MKID ALL DEPENDS
+      "${CMAKE_CURRENT_SOURCE_DIR}/ID")
+  endif ()
+endif ()


ToyBoxSDK has new libraries.

ToyBoxSDK has new libraries.

--- cmake/toy_SetThirdPartyLibraryPath.cmake
+++ cmake/toy_SetThirdPartyLibraryPath.cmake
@@ -9,15 +9,27 @@
 	# Visual Studio
 	elseif(MSVC)
 		set(TOY_SDK_INC         "D:/ToyBoxSDK/include" )
-		set(TOY_SDK_LIB         "D:/ToyBoxSDK/lib/msvc2015_x64_release" )
+		if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+		set(TOY_SDK_LIB         "D:/ToyBoxSDK/lib/msvc2015_x64_win32_release" )
+		else()
+		message(WARNING "ToyBox:ToyBoxSDK doesn't have this version")
+		endif()
 	# MinGW
 	elseif(WIN32)
 		set(TOY_SDK_INC         "D:/ToyBoxSDK/include" )
+		if(CMAKE_SIZEOF_VOID_P EQUAL 8)
 		set(TOY_SDK_LIB         "D:/ToyBoxSDK/lib/tdm_gcc_x64_release" )
+		else()
+		set(TOY_SDK_LIB         "D:/ToyBoxSDK/lib/tdm_gcc_x86_release" )
+		endif()
 	# Linux GCC
 	elseif(UNIX)
 		set(TOY_SDK_INC         "$ENV{HOME}/ToyBoxSDK/include" )
+		if(CMAKE_SIZEOF_VOID_P EQUAL 8)
 		set(TOY_SDK_LIB         "$ENV{HOME}/ToyBoxSDK/lib/ubuntu_gcc_x64_release" )
+		else()
+		set(TOY_SDK_LIB         "$ENV{HOME}/ToyBoxSDK/lib/ubuntu_gcc_x86_release" )
+		endif()
 	endif()

 	if(NOT EXISTS ${TOY_SDK_INC} AND NOT EXISTS ${TOY_SDK_LIB})


update rosbuild to use move roslaunch-check script (ros/ros_comm#241)

--- core/rosbuild/core/rosbuild/private.cmake
+++ core/rosbuild/core/rosbuild/private.cmake
@@ -264,12 +264,12 @@
     message(FATAL_ERROR "Can't find roslaunch file or directory \"${file}\"")
   endif(NOT _file_name)

-  # Find rostest
-  rosbuild_invoke_rospack("" rostest path find rostest)
+  # Find roslaunch
+  rosbuild_invoke_rospack("" roslaunch path find roslaunch)

   # Create target for this test.
   add_custom_target(${targetname}
-                    COMMAND ${rostest_path}/scripts/roslaunch-check.py -o ${rosbuild_test_results_dir}/${PROJECT_NAME}/TEST-${targetname}.xml ${file} ${ARGN}
+                    COMMAND ${roslaunch_path}/scripts/roslaunch-check -o ${rosbuild_test_results_dir}/${PROJECT_NAME}/TEST-${targetname}.xml ${file} ${ARGN}
                     DEPENDS ${file}
                     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                     VERBATIM)


-BUG: -clone instead of clone

-BUG: -clone instead of clone

--- Testing/Dashboard/pxDashboardCommon.cmake
+++ Testing/Dashboard/pxDashboardCommon.cmake
@@ -121,7 +121,7 @@

   # Assume git version 1.6.5 or higher, which has git clone -b option.
   set( CTEST_CHECKOUT_COMMAND
-     "\"${CTEST_GIT_COMMAND}\" -clone -b ${dashboard_git_branch} \"${dashboard_git_url}\" ${CTEST_DASHBOARD_ROOT}" )
+     "\"${CTEST_GIT_COMMAND}\" clone -b ${dashboard_git_branch} \"${dashboard_git_url}\" \"${CTEST_DASHBOARD_ROOT}\"" )

   # CTest delayed initialization is broken, so we copy the
   # CTestConfig.cmake info here.
@@ -188,8 +188,6 @@
   file(WRITE ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt "
 SITE:STRING=${CTEST_SITE}
 BUILDNAME:STRING=${CTEST_BUILD_NAME}
-CTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
-DART_TESTING_TIMEOUT:STRING=${CTEST_TEST_TIMEOUT}
 ${cache_build_type}
 ${cache_make_program}
 ${dashboard_cache}


Fix VTKViewer when compiled with CMake (add missing VTK component)

--- adm_local/cmake_files/FindSalomeVTK.cmake
+++ adm_local/cmake_files/FindSalomeVTK.cmake
@@ -6,7 +6,7 @@
 if(EXISTS ${PARAVIEW_ROOT_DIR})
   set(VTK_DIR ${PARAVIEW_ROOT_DIR}/lib/cmake/paraview-${PARAVIEW_VERSION} CACHE PATH "Path to directory including VTKConfig.cmake")
 endif(EXISTS ${PARAVIEW_ROOT_DIR})
-set(VTK_COMPONENTS vtkRenderingOpenGL vtkRenderingLOD vtkRenderingAnnotation vtkFiltersParallel vtkIOExport)
+set(VTK_COMPONENTS vtkRenderingFreeTypeOpenGL vtkRenderingLOD vtkRenderingAnnotation vtkFiltersParallel vtkIOExport)
 find_package(VTK 6.0 REQUIRED COMPONENTS ${VTK_COMPONENTS} NO_MODULE)
 if (VTK_FOUND)
   message(STATUS "VTK version is ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")


Use the new name of the template file, epa_CMakeLists.txt.in and
change the names of the configured files from */bp.cmake to */CMakeLists.txt

Tested by Alan W. Irwin <airwin@users.sourceforge.net> using the
procedure in README.developers.  The result of this reconfiguration of
most of the build configurations was no changes at all which confirms
the procedure in README.developers is now consistent with the new
*/CMakeLists.txt naming scheme.

N.B. this consistency is a good first step but there is more to
do before the planned add_subdirectory technique for epa_build
works.

svn path=/trunk/; revision=12797

--- cmake/epa_build/configure_epa.cmake
+++ cmake/epa_build/configure_epa.cmake
@@ -70,7 +70,7 @@

   # Configure the package file using the appropriate template file.
   if(config_type STREQUAL "autotools" OR config_type STREQUAL "tarball" OR config_type STREQUAL "cmake")
-    set(template_file template.bp.in)
+    set(template_file epa_CMakeLists.txt.in)
   else(config_type STREQUAL "autotools" OR config_type STREQUAL "tarball" OR config_type STREQUAL "cmake")
     message(FATAL_ERROR "incorrect config_type = ${config_type}")
   endif(config_type STREQUAL "autotools" OR config_type STREQUAL "tarball" OR config_type STREQUAL "cmake")
@@ -80,6 +80,6 @@
   endif(NOT package)

   file(MAKE_DIRECTORY ${package})
-  configure_file(${template_file} ${package}/bp.cmake @ONLY)
+  configure_file(${template_file} ${package}/CMakeLists.txt @ONLY)

 endforeach(index RANGE 0 ${max_index})


ApplicationTools: Link in boo and hecl-light

Ensures that the include paths are always automatically added to the
shader targets.

--- ApplicationTools.cmake
+++ ApplicationTools.cmake
@@ -52,6 +52,7 @@
   add_stage_rep(shader_${name} ${CMAKE_CURRENT_BINARY_DIR}/${dir}/shader_${name}.hpp)
   add_pipeline_rep(shader_${name} ${CMAKE_CURRENT_BINARY_DIR}/${dir}/shader_${name}.hpp UNIVERSAL)
   add_library(shader_${name} ${CMAKE_CURRENT_BINARY_DIR}/${dir}/shader_${name}.hpp ${CMAKE_CURRENT_BINARY_DIR}/${dir}/shader_${name}.cpp)
+  target_link_libraries(shader_${name} PUBLIC boo hecl-light)
   add_shader_target(shader_${name})
 endfunction()

@@ -59,5 +60,6 @@
   add_stage_rep(${name} ${name}.hpp)
   add_pipeline_rep(${name} ${name}.hpp UNIVERSAL)
   add_library(${name} ${name}.hpp ${ARGN})
+  target_link_libraries(${name} PUBLIC boo hecl-light)
   add_shader_target(${name})
 endfunction()


[FIX] Octave is not automatically found under Ubuntu 12.04.

--- CMake/FindOctave.cmake
+++ CMake/FindOctave.cmake
@@ -138,7 +138,8 @@
     )
 FIND_PATH(OCTAVE_INCLUDE_DIR
     "mex.h"
-    ${OCTAVE_INCLUDE_PATHS} NO_DEFAULT_PATH
+    PATHS ${OCTAVE_INCLUDE_PATHS}
+    PATH_SUFFIXES "octave" NO_DEFAULT_PATH
     )

 SET(OCTAVE_ROOT_LAST "${OCTAVE_ROOT}" CACHE INTERNAL "" FORCE)


COMP: use GDAL_CONFIG defined by FindGDAL.cmake instead of redefining a GDALCONFIG_EXECUTABLE variable

--- CMake/ImportGdal.cmake
+++ CMake/ImportGdal.cmake
@@ -21,19 +21,17 @@
   MESSAGE(STATUS "  GDAL library  : ${GDAL_LIBRARY}")

   IF(UNIX)
-    # Find gdal version with gdal-config
-    FIND_PROGRAM(GDALCONFIG_EXECUTABLE gdal-config)
-    MARK_AS_ADVANCED(GDALCONFIG_EXECUTABLE)
-    IF (NOT EXISTS ${GDALCONFIG_EXECUTABLE})
-      MESSAGE(FATAL_ERROR "gdal-config not found or set to a wrong path. Please check GDALCONFIG_EXECUTABLE")
-    ENDIF(NOT EXISTS ${GDALCONFIG_EXECUTABLE})
-
-    EXECUTE_PROCESS(COMMAND ${GDALCONFIG_EXECUTABLE} --version
+    IF (NOT GDAL_CONFIG)
+      MESSAGE(FATAL_ERROR
+              "Cannot find gdal-config. Set GDAL_CONFIG")
+    ENDIF(NOT GDAL_FOUND)
+
+    EXECUTE_PROCESS(COMMAND ${GDAL_CONFIG} --version
                     OUTPUT_VARIABLE GDAL_VERSION
                     OUTPUT_STRIP_TRAILING_WHITESPACE)

     # Detect if gdal support hdf format
-    EXECUTE_PROCESS(COMMAND ${GDALCONFIG_EXECUTABLE} --formats
+    EXECUTE_PROCESS(COMMAND ${GDAL_CONFIG} --formats
                     OUTPUT_VARIABLE GDAL_FORMATS
                     OUTPUT_STRIP_TRAILING_WHITESPACE )
     IF ( ${GDAL_FORMATS} MATCHES "hdf" )


ENH: Use a specific GIT tag for CTK

ENH: Use a specific GIT tag for CTK

  This tag is associated with Slicer 4 rc1

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -321,7 +321,7 @@
       set( proj CTK )
       ExternalProject_Add( CTK
         GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/commontk/CTK.git"
-        GIT_TAG "origin/master"
+        GIT_TAG "d76ebaac2226f8ef431835eff1693012ffaf62c3"
         SOURCE_DIR "${CMAKE_BINARY_DIR}/CTK"
         BINARY_DIR CTK-Build
         CMAKE_GENERATOR ${gen}


Find libdwarf.h on debian

Find libdwarf.h on debian

Debian installs libdwarf.h at /usr/include/libdwarf/. This change
enables cmake finding this header on debian.

--- BackwardConfig.cmake
+++ BackwardConfig.cmake
@@ -72,7 +72,7 @@
 		LIBDL_INCLUDE_DIR LIBDL_LIBRARY)

 	# find libdwarf
-	find_path(LIBDWARF_INCLUDE_DIR NAMES "libdwarf.h")
+	find_path(LIBDWARF_INCLUDE_DIR NAMES "libdwarf.h" PATH_SUFFIXES libdwarf)
 	find_path(LIBELF_INCLUDE_DIR NAMES "libelf.h")
 	find_path(LIBDL_INCLUDE_DIR NAMES "dlfcn.h")
 	find_library(LIBDWARF_LIBRARY dwarf)