1. 25 Jun, 2015 1 commit
    • Brad King's avatar
      cmTarget: Fix diagnostic of target_link_libraries in wrong directory (#15626) · 30c2e1dd
      Brad King authored
      Since commit v3.3.0-rc1~62^2~5 (cmTarget: Store only cmListFileContext
      for CMP0023 handling, 2015-05-18) a call to target_link_libraries on a
      target that was defined in another (non-ancestor) directory crashes
      because no execution context is left active.  Fix this by getting the
      execution context from the actual cmMakefile where the current
      target_link_libraries call takes place.  Test this by verifying that
      such calls correctly produce an error diagnostic instead of crashing.
  2. 17 Jan, 2013 1 commit
    • Stephen Kelly's avatar
      Add the $<TARGET_POLICY> expression · 6c8d8afe
      Stephen Kelly authored
      This new expression allows checking how a policy was set when a target
      was created.  That information is only recorded for a subset of policies,
      so a whitelist is used.
  3. 15 Aug, 2012 1 commit
    • Brad King's avatar
      Add boolean generator expressions · ebf05abd
      Brad King authored
      Add generator expressions that combine and use boolean test results:
       $<0:...>         = empty string (ignores "...")
       $<1:...>         = content of "..."
       $<AND:?[,?]...>  = '1' if all '?' are '1', else '0'
       $<OR:?[,?]...>   = '0' if all '?' are '0', else '1'
       $<NOT:?>         = '0' if '?' is '1', else '1'
      These will be useful to evaluate (future) boolean query expressions and
      condition content on the results.  Include tests and documentation.
  4. 20 Jun, 2012 1 commit
    • Brad King's avatar
      Do not crash on SHARED library without language (#13324) · 56148fd2
      Brad King authored
      Since commit e1409ac5 (Support building shared libraries or modules
      without soname, 2012-04-22) CMake crashes on the code
       add_library(foo SHARED foo.nolang)
      because the logic to lookup the language's soname flag was moved from
      cmTarget::GetLibraryNames to cmMakefile::GetSONameFlag without its check
      for a NULL language.  Restore the check for NULL.
      Add RunCMake.Languages test to cover language error cases like this one.
  5. 16 Mar, 2012 1 commit
    • Brad King's avatar
      Test OBJECT library failure cases · 56831016
      Brad King authored
      Add "RunCMake.ObjectLibrary" test to verify that unsupported use cases
      are rejected with errors:
      * An OBJECT library may not reference another object library
      * An OBJECT library may not be referenced in target_link_libraries
      * An OBJECT library may not contain non-compiling sources
      * An OBJECT library may not have pre/post build/link commands
      * An OBJECT library may not be installed, exported, or imported
      Also verify that invalid $<TARGET_OBJECTS:...> expressions are
  6. 12 Mar, 2012 2 commits
  7. 28 Feb, 2012 1 commit
    • Brad King's avatar
      find_package: Test error and warning messages in failure cases · eeaaffcb
      Brad King authored
      Add a "CMakeCommands.find_package" test to run CMake on a bunch of cases
      in which find_package fails.  Check that the process return code and
      warning/error messages are as expected.  Record expected test output in
      corresponding files for reference by the check.  These files will also
      serve as a reference for the message text in each case.