It doesn’t require any kind of workarounds. The standard way is to use CMAKE_CONFIGURE_DEPENDS property:
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS <filename>)
More Related Contents:
- CMake link to external library
- What is the proper way to use `pkg-config` from `cmake`?
- CMake does not find includes / libraries
- CMake: In which order are files parsed (cache, toolchain, etc.)?
- How to specify a compiler in CMake?
- Why is cmake file GLOB evil?
- What use is find_package() when you need to specify CMAKE_MODULE_PATH?
- How to modify environment variables passed to custom CMake target?
- How do I change the working directory for my program
- Copy file from source directory to binary directory using CMake
- Find package Eigen3 for CMake
- CMake share library with multiple executables
- Building a tool immediately so it can be used later in same CMake run
- MacOS, CMake and OpenMP
- What is CMake equivalent of ‘configure –prefix=DIR && make all install ‘?
- How to detect if current scope has a parent in CMake?
- Making a CMake library accessible by other CMake packages automatically
- CMake: How to build external projects and include their targets
- Set CFLAGS and CXXFLAGS options using CMake
- Passing compiler options in CMake
- how to add prebuilt object files to executable in cmake
- spacing in -D option in cmake
- How do I include a literal double quote in a custom CMake command?
- Check CMake Cache Variable in Toolchain File
- How to tell CMake to use relative paths
- Postpone making custom target until install
- Specifying build directory within CMakeLists file
- How to list all CMake build options and their default values?
- Passing an argument to CMAKE via command prompt
- CMake: how to change compiler for individual target