mirror of
https://github.com/reactos/CMake.git
synced 2024-12-15 15:48:52 +00:00
2514e4265c
Use it instead of the similar cmMakefile API. It is necessary to
know that the Configure step is completely done, not just that one
particular cmMakefile is finished configuring.
Prior to commit 611220f7
(cmTarget: Use reliable test for CMP0024 and CMP0026
OLD., 2015-07-25), this was determined by checking whether cmGeneratorTargets
exist yet, which happens after the Configure step.
15 lines
535 B
CMake
15 lines
535 B
CMake
|
|
enable_language(C)
|
|
|
|
cmake_policy(SET CMP0026 OLD)
|
|
|
|
add_subdirectory(clear-cached-information-dir)
|
|
|
|
# Critical: this needs to happen in root CMakeLists.txt and not inside
|
|
# the subdir.
|
|
get_target_property(mypath Hello LOCATION)
|
|
# Now we create the file later, so you can see, ultimately no error should
|
|
# happen e.g. during generate phase:
|
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clear-cached-information-dir/main.c)
|
|
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/clear-cached-information-dir/main.c PROPERTIES GENERATED TRUE)
|