mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Rotates the UUID to indicate changed behavior. See: https://discourse.cmake.org/t/15654
57 lines
1.6 KiB
CMake
57 lines
1.6 KiB
CMake
set(CMAKE_INTERMEDIATE_DIR_STRATEGY FULL CACHE STRING "" FORCE)
|
|
|
|
# Fake out that we have dyndep; we only need to generate, not actually build
|
|
# here.
|
|
set(CMAKE_CXX_SCANDEP_SOURCE "")
|
|
|
|
set(CMAKE_EXPERIMENTAL_EXPORT_BUILD_DATABASE "70ef007e-b743-492d-9407-e35eeac03a40")
|
|
|
|
enable_language(CXX)
|
|
|
|
if (NOT CMAKE_GENERATOR MATCHES "Ninja")
|
|
message(FATAL_ERROR
|
|
"This test requires a 'Ninja' generator to be used.")
|
|
endif ()
|
|
|
|
add_library(ninja-compiledb-public)
|
|
target_sources(ninja-compiledb-public
|
|
PRIVATE
|
|
sources/module-impl.cxx
|
|
sources/module-internal-part-impl.cxx
|
|
sources/module-part-impl.cxx
|
|
PUBLIC
|
|
FILE_SET modules TYPE CXX_MODULES
|
|
BASE_DIRS
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/sources"
|
|
FILES
|
|
sources/module.cxx
|
|
sources/module-part.cxx
|
|
FILE_SET internal_partitions TYPE CXX_MODULES FILES
|
|
sources/module-internal-part.cxx)
|
|
target_compile_features(ninja-compiledb-public
|
|
PRIVATE
|
|
cxx_std_20)
|
|
set_property(TARGET ninja-compiledb-public
|
|
PROPERTY EXPORT_BUILD_DATABASE 1)
|
|
|
|
add_library(ninja-compiledb-private)
|
|
target_sources(ninja-compiledb-private
|
|
PRIVATE
|
|
sources/module-impl.cxx
|
|
sources/module-internal-part-impl.cxx
|
|
sources/module-part-impl.cxx
|
|
PRIVATE
|
|
FILE_SET modules TYPE CXX_MODULES
|
|
BASE_DIRS
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/sources"
|
|
FILES
|
|
sources/module.cxx
|
|
sources/module-part.cxx
|
|
FILE_SET internal_partitions TYPE CXX_MODULES FILES
|
|
sources/module-internal-part.cxx)
|
|
target_compile_features(ninja-compiledb-private
|
|
PRIVATE
|
|
cxx_std_20)
|
|
set_property(TARGET ninja-compiledb-private
|
|
PROPERTY EXPORT_BUILD_DATABASE 1)
|