Open robertodr opened 7 years ago
I agree with you that "configuring a project with setup and bare cmake should lead to the exact same result" and I can imagine that it may not always and when it does not, I consider it a bug or bad design of some of the components. This is important when a project is included as external project.
-H
means and perhaps rather use the --long-flags
for more clarity. This will be mostly transparent but if somebody goes into the code that they have an idea what is happening.I will send a PR for this. My example for the moment was hande-qmc/hande#2, but really, any project using Autocmake will be an example. For -H
the documentation says it will output an help message if called without a directory as argument.
So we can leave out the -H
? Since the script will always call it with an argument.
I feel -H
is the proper way of doing it, even if it's undocumented.
I think configuring a project with
setup
and barecmake
should lead to the exact same result, but this is not currently the case:setup
sets compilers asFC=gfortran cmake
. I think it is better to pass them as CMake variables:cmake -DCMAKE_Fortran_COMPILER=gfortran
, which is also portable.setup
creates the build directory beforehand and then moves into it before runningcmake
. With barecmake
I docmake -H. -Bbuild
(also portable) I encountered this problem because I am running a configuration script that needscmake
to be run from the root directory (I know this is bad practice)cmake
leads the math detector to believe that I want to use MKL. I haven't investigated this last problem more.Possible solutions:
configure.py
andgenerate.py
can be simplified/removed.cmake
) but generate the CMake command ascmake -H<project_root_dir> -B<build_path>
.