[CMake] with 3.9 my testprj breaks: mylib_autogen/include: No such file or directory
Steffen Dettmer
steffen.dettmer at gmail.com
Mon Aug 7 09:01:16 EDT 2017
Hi,
I made a fix for [1] and tested cmake master branch, but noticed
that this cmake version does not compile my test project anymore
(v.3.8.2: OK; v3.9.0: FAIL). There is an include path to
$buildir/$subproject/mylib_autogen/include as -I for g++, but
this directory does not exist and I get:
cc1plus: error [...] No such file or directory.
If I manually create this include directory it compiles.
I guess it could be that the "mylib_autogen" directory (which is
created automatically) and its subdirectory "include" (which, at
least in my case, it not created automatically) are some new
feature. I guess, the *.moc files were moved into the autogen
diretories. In the autogen directory, I have only one file
"mocs_compilation.cpp" with the soley contents:
/* This file is autogenerated, do not edit*/
enum some_compilers { need_more_than_nothing };
which looks like a kind of dummy (it could be that this test lib
does not need any moc compilation).
We are using QT as described in [2].
Could it a bug that this include directory is not created in the
special case it is empty?
How to upgrade such projects to be compatible with cmake-3.9?
Steffen
[1] https://gitlab.kitware.com/cmake/cmake/issues/16920
[2] https://stackoverflow.com/questions/36570791/how-can-i-use-cmakes-automoc-feature-with-a-custom-qt-package
More information about the CMake
mailing list