summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakeListFileName/RunCMakeTest.cmake
blob: 147590e50a808fb8cd9b3ca321f8c751bd6ac2cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
include(RunCMake)

block()
  set(RunCMake_TEST_NO_SOURCE_DIR 1)
  set(source ${RunCMake_SOURCE_DIR}/project)
  run_cmake_with_options(dont-set-file -S ${source})
  run_cmake_with_options(set-file-dne -S ${source} --project-file dne.cmake)
  run_cmake_with_options(set-file-multi -S ${source} --project-file 1 --project-file 2)
  run_cmake_with_options(set-file-none -S ${source} --project-file)

  set(RunCMake_TEST_NO_CLEAN 1)
  set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/other)
  file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
  run_cmake_with_options(set-file -S ${source} --project-file other.cmake)
  run_cmake_with_options(remembers-file -S ${source})
  run_cmake_with_options(cant-change-file -S ${source} --project-file another.cmake)
endblock()