dealii / dealii

The development repository for the deal.II finite element library
https://www.dealii.org
Other
1.34k stars 741 forks source link

[CMake] Warning during 'setup_tests' #14965

Closed bangerth closed 1 year ago

bangerth commented 1 year ago

I've recently started to get these kinds of messages during make setup_tests:

> ninja setup_tests
[36/69] Processing tests/fe
FAILED: tests/CMakeFiles/setup_tests_fe 
cd /home/fac/g/bangerth/p/deal.II/1/build-strange/tests/fe && /raid/bangerth/bin/bin/cmake -DDEAL_II_DIR=/home/fac/g/bangerth/p/deal.II/1/build-strange -UDIFF_DIR -UNUMDIFF_DIR -UTEST_PICKUP_REGEX -UTEST_TIME_LIMIT -UTEST_MPI_RANK_LIMIT -UTEST_THREAD_LIMIT -UENABLE_PERFORMANCE_TESTS -UTESTING_ENVIRONMENT /home/fac/g/bangerth/p/deal.II/1/dealii/tests/fe > /dev/null
CMake Error at /home/fac/g/bangerth/p/deal.II/1/build-strange/share/deal.II/macros/macro_deal_ii_add_test.cmake:563 (add_custom_target):
  add_custom_target cannot create target "fe.block_mask_02.debug.test"
  because another target with the same name already exists.  The existing
  target is a custom target created in source directory
  "/home/fac/g/bangerth/p/deal.II/1/dealii/tests/fe".  See documentation for
  policy CMP0002 for more details.
Call Stack (most recent call first):
  /home/fac/g/bangerth/p/deal.II/1/build-strange/share/deal.II/macros/macro_deal_ii_pickup_tests.cmake:343 (deal_ii_add_test)
  CMakeLists.txt:4 (deal_ii_pickup_tests)

CMake Error at /home/fac/g/bangerth/p/deal.II/1/build-strange/share/deal.II/macros/macro_deal_ii_add_test.cmake:577 (add_test):
  add_test given test NAME "fe/block_mask_02.debug" which already exists in
  this directory.
Call Stack (most recent call first):
  /home/fac/g/bangerth/p/deal.II/1/build-strange/share/deal.II/macros/macro_deal_ii_pickup_tests.cmake:343 (deal_ii_add_test)
  CMakeLists.txt:4 (deal_ii_pickup_tests)

I don't even know what else to provide other than the warning itself.

tjhei commented 1 year ago

The existing target is a custom target created in source directory "/home/fac/g/bangerth/p/deal.II/1/dealii/tests/fe"

Do you have leftovers of an in-source build?

bangerth commented 1 year ago

I had an extra .output file:

> ll tests/fe/block_mask*
-rw-r--r-- 1 bangerth fac 1104 Mar 19 14:04 tests/fe/block_mask_01.cc
-rw-r--r-- 1 bangerth fac   10 Mar 19 14:04 tests/fe/block_mask_01.output
-rw-r--r-- 1 bangerth fac 1377 Mar 19 14:04 tests/fe/block_mask_02.cc
-rw-r--r-- 1 bangerth fac  197 Mar 19 14:04 tests/fe/block_mask_02.debug.output
-rw-r--r-- 1 bangerth fac  197 Mar 19 14:04 tests/fe/block_mask_02.output               <----------------

I thought that that is ok? The marked file is not part of the repository, and after removing it, the error went away, so the issue is probably moot.