1. 07 Jul, 2014 3 commits
  2. 02 Jul, 2014 10 commits
  3. 01 Jul, 2014 14 commits
    • Stephen Kelly's avatar
      Target: Return null when a transitive property is not defined. · 65aa5442
      Stephen Kelly authored
      Commit v2.8.11~310^2~1 (Keep track of INCLUDE_DIRECTORIES as a vector of
      structs., 2012-11-19) added special case of INCLUDE_DIRECTORIES
      for the purpose of origin-tracking of individual entries in the property. It
      introduced a bug in that it returned an empty string instead of '0' in the
      case that no includes have been set.
      
      Commit v2.8.11~289^2~2 (Handle INTERFACE properties transitively for includes
      and defines., 2012-09-23) introduced transitive handling of the property
      through the link implementation, together with a whitelist of properties
      which would be evaluated transitively. Because of the bug introduced
      previously, the 'prop' in TargetPropertyNode is non-null,
      meaning that the content (the empty string) would be evaluated as a generator
      expression.  This was harmless as the follow-up code was only for 'INTERFACE_'
      variants of target properties, so the effect was the same.
      
      Commits v2.8.11~280^2~2 (Keep track of properties used to determine linker
      libraries., 2012-11-05) and v2.8.11~280^2~1 (Add API to calculate
      link-interface-dependent bool properties or error., 2013-01-06) added a way
      to track and report errors on properties which both determine and are
      determined by the link implementation.  This was later used in generator
      expression evaluation by commit v2.8.11~252^2~2 (Make INTERFACE determined
      properties readable in generator expressions., 2013-01-19).  If a property
      is unset (null), and the link implementation of the target was not being
      evaluated, this commit made it possible to evaluate the property from the
      link implementation instead.  If the link implementation was being evaluated,
      an empty string was returned from the generator expression evaluation, which
      might be later reported as an error.
      
      The above logic was written for 'compatible interface' properties, but in
      fact it should have also included other properties.  Because of the
      empty-string-instead-of-null bug, this code block is not entered for the
      INCLUDE_DIRECTORIES property.  At this point, however, the bug still does
      not significantly affect behavior, because the follow-up code is still a
      no-op for the INCLUDE_DIRECTORIES property, and an empty string is returned
      regardless. Commit v2.8.11~189^2~6 (Use the link information as a source of
      compile definitions and includes., 2013-02-12) refactored the logic, but also
      without a change in behavior.
      
      Commit v2.8.11~156^2~2 (Expand includes and defines transitively
      in 'external' genexes., 2013-02-13) refactored the logic again, this time with
      a change of behavior. The INCLUDE_DIRECTORIES property was then mapped to
      INTERFACE_INCLUDE_DIRECTORIES during transitive generator expression
      evaluation.  Because the transitive evaluation involved evaluation of the
      link implementation, this introduced a recursive loop and a segfault with
      code like:
      
        add_library(empty1 ...)
        add_library(empty2 ...)
        target_link_libraries(empty1
          PRIVATE
            $<$<STREQUAL:$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
        )
      
      As there is no real use-case for reading a target property like that while
      evaluating the link implementation, this went unnoticed.  The same pattern
      was followed for other special-cased reads of transitive target properties
      such as COMPILE_DEFINITIONS.
      
      The segfault was fixed in the parent commit, but change the property to
      return null when appropriate for other future uses.
      65aa5442
    • Stephen Kelly's avatar
      Genex: Fix stack overflow in transitive property evaluation. · 61ce6547
      Stephen Kelly authored
      Commit v2.8.11~156^2~2 (Expand includes and defines transitively
      in 'external' genexes., 2013-02-13) introduced a recursive loop
      and a stack overflow during evaluation of a link implementation
      which depends on a transitive property, such as
      
       add_library(empty1 ...)
       add_library(empty2 ...)
       target_link_libraries(empty1
         PRIVATE
           $<$<STREQUAL:$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
       )
      
      There is no use-case for code like that currently, but it should not
      cause a stack overflow.
      
      Avoid the recursion by reporting an error early if a case like this
      is found.
      61ce6547
    • Rolf Eike Beer's avatar
      ExternalProject test: remove unused file · 7269e69f
      Rolf Eike Beer authored
      7269e69f
    • Rolf Eike Beer's avatar
      5217ad26
    • Ben Boeckel's avatar
      Tests: Use add_test(NAME) signature in add_test_macro · 902c9063
      Ben Boeckel authored and Brad King's avatar Brad King committed
      This will allow generator expressions to be used in test arguments.
      902c9063
    • Ben Boeckel's avatar
      Ninja: Add order-only dependencies to link commands (#14728) · ac8879ce
      Ben Boeckel authored and Brad King's avatar Brad King committed
      A library or executable target that consists only of a reference to an
      object library may have no sources to compile or custom commands to run.
      The command in the target is the link (or archive) command.  Add missing
      order-only dependencies to link commands so that target ordering
      dependencies are satisfied for it without depending on an intermediate
      compilation rule.
      
      Extend the ObjectLibrary test to cover this case.
      
      Co-Author: Brad King <brad.king@kitware.com>
      ac8879ce
    • Brad King's avatar
      Merge topic 'test-speedup-RunCMake.include_directories' · 623123aa
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      9998d78d Tests: Speed up RunCMake.include_directories test
      6eee5d74 Tests: Drop broken and now unused RunCMake_TEST_FILE option
      f0f15b93 Tests: Refactor RunCMake.include_directories to drop RunCMake_TEST_FILE
      8707814e Tests: Refactor RunCMake.File_Generate to drop RunCMake_TEST_FILE
      623123aa
    • Brad King's avatar
      Merge topic 'ninja-no-phony-sources' · e4767a2b
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      93371ed5 Ninja: Skip generating empty phony rules
      7243c951 Ninja: Don't limit custom cmd side-effects to build folder (#14972)
      a33cf6d0 Ninja: Consider only custom commands deps as side-effects (#14972)
      e4767a2b
    • Brad King's avatar
      Merge topic 'cuda_osx_clang' · 9750a558
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      32bcec5f FindCUDA: Fix OSX Clang & no C language enabled
      9750a558
    • Brad King's avatar
      Merge topic 'FindVTK-drop-4.0-support' · 31ec558b
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      117e7e11 FindVTK: Drop support for finding VTK 4.0
      31ec558b
    • Brad King's avatar
      FindVTK: Drop support for finding VTK 4.0 · 117e7e11
      Brad King authored
      Convert to a simple thin-wrapper around the find_package(VTK NO_MODULE).
      This makes the code much simpler and improves error messages.
      117e7e11
    • Clinton Stimpson's avatar
    • Dinar Valeev's avatar
      FindJNI: search for ppc64 on ppc64le as well · 18ac6713
      Dinar Valeev authored
      
      
      IcedTea 2.5 have changed libarch for ppc64le to ppc64. Adjust FindJNI
      to look for both for backward compatibility.
      Signed-off-by: default avatarDinar Valeev <dvaleev@suse.com>
      18ac6713
    • Kitware Robot's avatar
      CMake Nightly Date Stamp · 949715f0
      Kitware Robot authored
      949715f0
  4. 30 Jun, 2014 13 commits
    • Brad King's avatar
      Merge topic 'FindQt4-ignore-qt5' · 1a575a91
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      567d4d8d FindQt4: Don't further process qmake if it does not belong to Qt4
      1a575a91
    • Brad King's avatar
      Merge topic 'vs14-generator' · 1563668f
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      f0e298ad Help: Add notes for topic 'vs14-generator'
      5c105140 Tests: Simplify LoadCommand tests
      b1cbd577 FindBoost: Add -vc140 mangling for VS 14
      bdc7d9c8 VS14: Fix Cl and Link flag tables as previous versions
      d96b3f68 VS14: Generate flag tables from MSBuild v140 tool files
      65624c39 VS14: Add Visual Studio 14 generator (#14982)
      8635ac23 Tests/Preprocess: Remove unnecessary VS version tests
      1563668f
    • Brad King's avatar
      Merge topic 'FindOpenMP-intel-qopenmp' · 4f7f6651
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      4671f3ab FindOpenMP: ICC 15 deprecates -openmp, use -qopenmp
      4f7f6651
    • Brad King's avatar
      Merge topic 'FindJPEG-new-windows-name' · 2e8a5ac3
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      115811dc FindJPEG: Add alternative name 'libjpeg'
      2e8a5ac3
    • Brad King's avatar
      Tests: Speed up RunCMake.include_directories test · 9998d78d
      Brad King authored
      Remove unnecessary language initializations.  Change the main
      CMakeLists.txt project() call to specify NONE.  Use enable_language(CXX)
      instead of project() in cases that need it to avoid enabling C too.
      9998d78d
    • Brad King's avatar
      Tests: Drop broken and now unused RunCMake_TEST_FILE option · 6eee5d74
      Brad King authored
      We cannot use -DRunCMake_TEST=${RunCMake_TEST_FILE} because test cases
      use project(${RunCMake_TEST}) and the project name cannot be a path to a
      file.  The parent and grandparent commits removed the only uses of the
      option.  Drop it now.
      6eee5d74
    • Brad King's avatar
      Tests: Refactor RunCMake.include_directories to drop RunCMake_TEST_FILE · f0f15b93
      Brad King authored
      Drop use of RunCMake_TEST_FILE and pass the test file in through a
      definition in RunCMake_TEST_OPTIONS.
      f0f15b93
    • Brad King's avatar
      Tests: Refactor RunCMake.File_Generate to drop RunCMake_TEST_FILE · 8707814e
      Brad King authored
      Drop use of RunCMake_TEST_FILE and pass the test file in through a
      definition in RunCMake_TEST_OPTIONS.
      8707814e
    • Adam Strzelecki's avatar
      FindCUDA: Fix OSX Clang & no C language enabled · 32bcec5f
      Adam Strzelecki authored
      When setting default CUDA_HOST_COMPILER we must dereference CMAKE_C_COMPILER,
      i.e. /usr/bin/clang should be used instead /usr/bin/cc which is symlink.
      Otherwise CUDA thinks it is GCC and issues -dumpspecs which is unknown option
      to Clang.
      
      Also in case neither CMAKE_C_COMPILER is defined (project does not use C
      language) nor CUDA_HOST_COMPILER is specified manually we should skip -ccbin
      and let nvcc use its own default C compiler.
      32bcec5f
    • Adam Strzelecki's avatar
      Ninja: Skip generating empty phony rules · 93371ed5
      Adam Strzelecki authored and Brad King's avatar Brad King committed
      Ninja generator ensures that all custom commands being target
      dependencies are run before other source compilations. However in case
      there are no such dependencies it currently generates empty phony rules
      which clutter the build graph.
      
      Teach the Ninja generator to produce such rules only when necessary.
      93371ed5
    • Adam Strzelecki's avatar
      Ninja: Don't limit custom cmd side-effects to build folder (#14972) · 7243c951
      Adam Strzelecki authored and Brad King's avatar Brad King committed
      Actually custom command can write wherever it wants to, such as temporary
      folder or source folder, possibly violating rules that only build folder should
      be affected. Therefore we should consider custom command dependency at any path
      as possible side effect adding phony rule.
      
      We avoid adding phony rules for regular source files (since the paraent
      commit) so we no longer need the in-build-tree test to avoid them.
      7243c951
    • Adam Strzelecki's avatar
      Ninja: Consider only custom commands deps as side-effects (#14972) · a33cf6d0
      Adam Strzelecki authored and Brad King's avatar Brad King committed
      Since commit v2.8.12~248^2 (Ninja: Custom Command file depends don't
      need to exist before building, 2013-06-07) all explicit dependencies
      inside build folder were considered as possible build command
      side-effects and phony rules were produced for them in case they don't
      exist when starting to build. This is unnecessary since regular compile
      inputs need to exist or cmake will fail.  Moreover the exception for
      sources having GENERATED property that can be missing is already handled
      by WriteAssumedSourceDependencies.
      
      This fixes unwanted phony rules for all regular source files when doing
      in-source build, causing Ninja not complain when such files gets missing,
      i.e. during development. Also this reduces number of rules in ninja.build.
      
      Now only custom command dependencies are considered as possible side-effects.
      a33cf6d0
    • Kitware Robot's avatar
      CMake Nightly Date Stamp · ad844207
      Kitware Robot authored
      ad844207