Make debug: mismatch detected for '_ITERATOR_DEBUG_LEVEL'

With a newly cloned \cycles, when “make debug” I get many occurrances of this error:
usd_usd_m.lib(diagnostic.obj) : error LNK2038: mismatch detected for ‘_ITERATOR_DEBUG_LEVEL’: value ‘0’ doesn’t match value ‘2’

Well, I did make hdCycles work with usdview.

  • I have a good \build folder, which should be different than a \build folder generated from scratch with “make debug”.
  • I must have modified some projects in the good \build folder. The good projects do not have usd_usd_m.lib in Link > Input.
  • With the good \build folder, “make debug” does not override the existing projects.

OK, it was due to, for a new Cycles clone, I didn’t do this:

cmake -B ./build -DPXR_ROOT="<path to USD install>"