CMake sets directories for objects files implicitly while compiling the source files, but I want to keep all those object files in a particular directory.
For example in my code CMake is creating directories based on the source code directories itself like this:
CMakeFiles/OBJ2.dir/src/lib/kernels/XnnKernel.o I want to keep them in different locations, but unable to do so.
I tried some commands:
set(OBJ "build/CMakeFiles/OBJ1.dir/src/lib/kernels/igemm8_generic.o") file(COPY ${OBJ} DESTINATION ${SOURCE_PATH}/src/OBJ_FILES) As per my understanding, the file(COPY) command is getting executed before compilation. Please correct me if I am wrong and give me a solution.