Closed miroi closed 9 years ago
It is definitely possible. But the question is probably whether this should be provided by default and this I don't know yet. Everything that is on by default has to work for "all" possible projects. I suggest you start coding a module that does that and if it turns out general enough we include it in the standard set of modules.
I tried to emulate config_info output based on git_info output, but plenty of variables are undefined in the simplest test case (I modified fc).
So I leaving this issue. Probably good printout can be in done in own cmake module.
milias@login.grid.umb.sk:~/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/test/fc/build-20
15-08-03-19-48-21/.m
[ 25%] Generating config_info.h
-- Who compiled :
-- Host :
-- Who compiled :
-- Host :
-- System name :
-- System :
-- CMake version : 2.8.12.2
-- CMake generator :
-- Python version :
-- Processor :
-- Fortran compiler :
-- Fortran compiler version :
-- Fortran compiler flags :
-- C compiler :
-- C compiler version :
-- C compiler flags :
-- CMAKE_ARGC=4
-- CMAKE_ARGV0=/usr/bin/cmake
-- CMAKE_ARGV1=-D_target_dir=/home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/test/fc/build-2015-08-03-19-48-21
-- CMAKE_ARGV2=-P
-- CMAKE_ARGV3=config_info_sub.cmake
-- CMAKE_BINARY_DIR=/home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/modules/config_info
-- CMAKE_COMMAND=/usr/bin/cmake
-- CMAKE_CPACK_COMMAND=/usr/bin/cpack
-- CMAKE_CTEST_COMMAND=/usr/bin/ctest
-- CMAKE_CURRENT_BINARY_DIR=/home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/modules/config_info
-- CMAKE_CURRENT_LIST_DIR=/home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/modules/config_info
-- CMAKE_CURRENT_LIST_FILE=/home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/modules/config_info/config_info_sub.cmake
-- CMAKE_CURRENT_SOURCE_DIR=/home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/modules/config_info
-- CMAKE_EDIT_COMMAND=/usr/bin/ccmake
-- CMAKE_FILES_DIRECTORY=/CMakeFiles
-- CMAKE_HOST_UNIX=1
-- CMAKE_MAJOR_VERSION=2
-- CMAKE_MINOR_VERSION=8
-- CMAKE_PATCH_VERSION=12
-- CMAKE_ROOT=/usr/share/cmake-2.8
-- CMAKE_SCRIPT_MODE_FILE=/home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/modules/config_info/config_info_sub.cmake
-- CMAKE_SOURCE_DIR=/home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/modules/config_info
-- CMAKE_TWEAK_VERSION=2
-- CMAKE_VERSION=2.8.12.2
-- UNIX=1
-- _target_dir=/home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/test/fc/build-2015-08-03-19-48-21
[ 25%] Built target config_info
[ 50%] Generating git_info.h
-- Found Git: /usr/bin/git (found version "1.7.1")
[ 50%] Built target git_info
[ 75%] Building Fortran object src/CMakeFiles/example.dir/module.f90.o
make[2]: Warning: File `src/CMakeFiles/example.dir/module.f90.o.provides.build' has modification time 25 s in the future
[100%] Building Fortran object src/CMakeFiles/example.dir/example.f90.o
Warning: /home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/test/fc/src/example.f90:5: Illegal preprocessor directive
Warning: /home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/test/fc/src/example.f90:6: Illegal preprocessor directive
Linking Fortran executable ../bin/example
make[2]: warning: Clock skew detected. Your build may be incomplete.
[100%] Built target example
A warning about dealing with build info using header files. Sounds like a perfect idea and I have tried it myself but this will most probably fail on Fortran due to the line limit. This needs extra care and extra scripts that chop or truncate strings. Alternatively it requires Fortran calling C which includes the header file.
Hi,
would it be possible to have more output from autocmake (through verbose flag) ? I am used to the DIRAC cmake output, containing compiler flags, compiler versions, extra libraries...