diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 821ae09154..b2e9d0093f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -113,31 +113,31 @@ if(DLAF_WITH_PRECOMPILED_HEADERS) # We create two separate targets whose precompiled headers will be reused, one # for libraries and one for executables. Separate targets are needed because # the compilation flags for executables and libraries may differ. - add_library(dlaf.pch_lib OBJECT dummy.cpp) + add_library(dlaf.pch_lib OBJECT dummy.cpp dummy.c) target_link_libraries(dlaf.pch_lib PRIVATE dlaf.prop dlaf.prop_private) target_add_warnings(dlaf.pch_lib) - add_executable(dlaf.pch_exe dummy.cpp) + add_executable(dlaf.pch_exe dummy.cpp dummy.c) target_link_libraries(dlaf.pch_exe PRIVATE dlaf.prop dlaf.prop_private) target_add_warnings(dlaf.pch_exe) set(precompiled_headers - $<$:> - - - - - - + $<$,$>:> + $<$:> + $<$:> + $<$:> + $<$:> + $<$:> + $<$:> # We exclude lapack.hh because it pulls in complex.h and defines I as a # macro. I is a commonly used e.g. as template parameter names and defining # it as a macro breaks compilation. Undefining I for the precompiled header # is a bigger hassle than excluding the header since it's a cheap header to # compile. - # - - + # $<$:> + $<$:> + $<$:> $<$:> $<$:> $<$:> diff --git a/src/dummy.c b/src/dummy.c new file mode 100644 index 0000000000..0c92050409 --- /dev/null +++ b/src/dummy.c @@ -0,0 +1,14 @@ +// +// Distributed Linear Algebra with Future (DLAF) +// +// Copyright (c) 2018-2023, ETH Zurich +// All rights reserved. +// +// Please, refer to the LICENSE file in the root directory. +// SPDX-License-Identifier: BSD-3-Clause +// +// This file is intentionally empty. It is used for the precompiled headers +// target. + +// Silences -Wpedantic: ISO C forbids an empty translation unit +void dlaf_empty();