eth-cscs / DLA-Future

DLA-Future
https://eth-cscs.github.io/DLA-Future/master/
BSD 3-Clause "New" or "Revised" License
64 stars 14 forks source link

DLAF_WITH_PRECOMPILED_HEADERS=on fails after introduction of the C API #950

Closed RMeli closed 1 year ago

RMeli commented 1 year ago

Reported by @albestro:

ialberto@daint101:/project/csstaff/ialberto/workspace/dla-future.master/build-gpu> cat ./configure.sh
CC=cc CXX=CC cmake ..\
  -DCMAKE_EXPORT_COMPILE_COMMANDS=on \
  -DCMAKE_BUILD_TYPE=Release\
  -DDLAF_WITH_PRECOMPILED_HEADERS=on\
  -DDLAF_WITH_MKL=on\
  -DDLAF_WITH_CUDA=on\
  -DDLAF_MPI_PRESET=slurm\
  -DMPIEXEC_NUMCORES=24\
  -DDLAF_TEST_RUNALL_WITH_MPIEXEC=on $@
ialberto@daint101:/project/csstaff/ialberto/workspace/dla-future.master/build-gpu> ./configure.sh
...
-- Configuring done (18.2s)
CMake Error in test/unit/c_api/eigensolver/CMakeLists.txt:
  Unable to resolve full path of PCH-header
  '/project/csstaff/ialberto/workspace/dla-future.master/build-gpu/src/CMakeFiles/dlaf.pch_exe.dir/cmake_pch.h'
  assigned to target test_eigensolver_c_api, although its path is supposed to
  be known!

CMake Error in test/unit/c_api/factorization/CMakeLists.txt:
  Unable to resolve full path of PCH-header
  '/project/csstaff/ialberto/workspace/dla-future.master/build-gpu/src/CMakeFiles/dlaf.pch_exe.dir/cmake_pch.h'
  assigned to target test_cholesky_c_api, although its path is supposed to be
  known!

CMake Error in test/unit/c_api/grid/CMakeLists.txt:
  Unable to resolve full path of PCH-header
  '/project/csstaff/ialberto/workspace/dla-future.master/build-gpu/src/CMakeFiles/dlaf.pch_exe.dir/cmake_pch.h'
  assigned to target test_grid_c_api, although its path is supposed to be
  known!

-- Generating done (2.8s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
ialberto@daint101:/project/csstaff/ialberto/workspace/dla-future.master/build-gpu> find . -name "cmake_pch.*"
./src/CMakeFiles/dlaf.pch_exe.dir/cmake_pch.hxx
./src/CMakeFiles/dlaf.pch_exe.dir/cmake_pch.hxx.cxx
./src/CMakeFiles/dlaf.pch_lib.dir/cmake_pch.hxx
./src/CMakeFiles/dlaf.pch_lib.dir/cmake_pch.hxx.cxx
msimberg commented 1 year ago

Relevant stackoverflow post: https://stackoverflow.com/questions/68735830/cmake-precompiled-headers-issue-with-mixed-c-c-project.

msimberg commented 1 year ago

Fixed by #955.