Files
CMake/Tests/RunCMake/CXXModules/NotCompiledSourceModules.cmake
Ben Boeckel 458e3974a8 cxxmodules: detect and message about non-compiled sources
Previously an internal error was raised which ended up causing an
internal exception to be thrown. This is a typo situation that should
fall into an explicit error.

Fixes: #25207
2023-09-12 14:46:36 -04:00

14 lines
308 B
CMake

enable_language(CXX)
set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "")
add_library(not-cxx-source)
target_sources(not-cxx-source
PRIVATE
sources/cxx-anchor.cxx
PUBLIC
FILE_SET fs TYPE CXX_MODULES FILES
sources/not-compiled.txt)
target_compile_features(not-cxx-source
PRIVATE
cxx_std_20)