summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CXXModules/examples/depchain-modules-json-file-rebuild-check.cmake
blob: 452f446a8c7a1d1be3d70666c1d57af5b52139ea (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/CXXModules.json")
  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/CXXModules.json")
  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 ()