summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CXXModules/examples/depchain-modules-json-file-rebuild-check.cmake
blob: 94e833ad1eaf0a5a1c49175aa985d9f424fdb229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
if (RunCMake_GENERATOR_IS_MULTI_CONFIG)
  set(dep_modules_json_path "CMakeFiles/depchain_modules_json_file.dir/Debug/CXX.dd")
  set(modules_json_path "CMakeFiles/depchain_with_modules_json_file.dir/Debug/CXXModules.json")
else ()
  set(dep_modules_json_path "CMakeFiles/depchain_modules_json_file.dir/CXX.dd")
  set(modules_json_path "CMakeFiles/depchain_with_modules_json_file.dir/CXXModules.json")
endif ()

if ("${RunCMake_TEST_BINARY_DIR}/${modules_json_path}" IS_NEWER_THAN "${RunCMake_TEST_BINARY_DIR}/${dep_modules_json_path}")
  list(APPEND RunCMake_TEST_FAILED
    "Object '${dep_modules_json_path}' should have recompiled if '${modules_json_path}' changed.")
endif ()