Files
CMake/Tests/RunCMake/Swift/ForceResponseFile.cmake
Dave Abrahams 45b3387c50 Tests/RunCMake/Swift: Enable more cases with Ninja Multi-Config
Also factor out testing that's common across Xcode and Ninja.* generators.

- Ninja expected output files were extended to accept directories named
  after the configuration in paths.
- Tests that previously ran with Ninja were allowed to run with Ninja
  Multi-Config.
- Swift/RunCMakeTest.cmake:
  - Checks for conditions where little or no testing could be done
    were moved to the top of the file, with return()s to limit nesting
    of the remainder of the code ("Early bailouts").
  - CMP0157 tests, which were being performed for all generators, were
    factored out into a block at the top of the file.
  - RunCMake_TEST_OPTIONS is set initially for all multi-config
    generators and list(APPEND)'ed-to in each block() where it was previously
    set() and unset().
2024-05-24 13:41:01 -07:00

14 lines
294 B
CMake

if(POLICY CMP0157)
cmake_policy(SET CMP0157 NEW)
endif()
if(NOT CMAKE_GENERATOR MATCHES "Ninja")
message(SEND_ERROR "this test must use a Ninja generator, found ${CMAKE_GENERATOR} ")
endif()
set(CMAKE_NINJA_FORCE_RESPONSE_FILE TRUE)
enable_language(Swift)
add_library(L STATIC L.swift)