Skip to content
代码片段 群组 项目
提交 842822c9 编辑于 作者: Alberto Garcia's avatar Alberto Garcia
浏览文件

Re-structuring and upgrades to CMake infrastructure (Updated log message)

(The log message in this empty commit was intended for commit
 f9158b2e, but it was not used due to an error.)

* Bumped minimal version to 3.20 which allows one to DEFER calls
  (post-pone a call until the end of the add_subdirectory step). (3.19
  for DEFER, 3.20 for fixing #318)

* Added:

    SIESTA_TESTS
    SIESTA_SHARED_LIBS
    SIESTA_INSTALL

  mainly for future-proofing the codebase when being inherited in a
  project.

* Added some more print-build-options at the end of the configure
  step.  The shown options are mainly those that affect only
  siesta. I.e. units-convention, suffix names etc.  It gives a better
  overview.
  
* Added the CMAKE_MESSAGE_CONTEXT which can be quite handy.

* Changed lots of explicit function names in debug messages to use
  CMAKE_CURRENT_FUNCTION (does not work in macro's for obvious reasons).

* Enabled the flags:

    SIESTA_LINKER_FLAGS_PRE
    SIESTA_LINKER_FLAGS_POST
    SIESTA_LINKER_FLAGS

  initially for the siesta and libsiesta targets (more will be added
  in a later commit).
  
  The scheme works by creating a wrapper for add_executable|library,
  which defines the target with all its arguments, and then
  immediately calls

    target_link_libraries(<target> ${SIESTA_LINKER_FLAGS_PRE})
   
  It then installs a deferred call when the directory is
  done parsing which calls:

    target_link_libraries(<target> ${SIESTA_LINKER_FLAGS_POST|})

  (We might also consider doing the deferred call only when the
  PROJECT_SOURCE_DIR is done.)

  Basically this wraps all of this:

    add_executable(target ...)
    target_link_libraries(target SIESTA_LINKER_FLAG_PRE)
    < add more link libraries >
    target_link_libraries(target SIESTA_LINKER_FLAG_POST)

  into:

    siesta_add_executable(target ...)
    < add more link libraries >

  It is not completely clear that this is the best way to do things.
  An alternative could be to create other functions which install the
  PRE and POST flags, but that would require two more function calls at
  determined positions.

* Beautified the printbuildinfo scripts.

  When using different modes in the MESSAGE one needs to worry about
  the -- prefix for STATUS and above (i.e. NOTICE won't have these).
  For better formatting now everything is STATUS.  (Once 3.25 is in,
  one can bypass the mode flag and use a custom msg function which
  prints with NOTICE mode but only for DEBUG.)  Also reduced the
  spacing a bit, and just generally made it look prettier.

* The test-suite now used input flags with new names:

   SIESTA_TESTS_MPI_MIN|MAX_NUMPROCS (follows MPI naming convention)
   SIESTA_TESTS_MPI_NUMPROCS (actual used number of MPI ranks, defaults to 4)
   SIESTA_TESTS_VERIFY
   
* A function siesta_test_get_mpi has been added, but it is currently not
  used, pending some feedback.

* The test functions have been shortened to a great extent.

* The `IS_SIMPLE` option has been removed since it got superseeded by
  the `LABELS` (see internal #344).

* Changed the test names to be a bit shorter, and also changed the
  amount of printed information. Much of it can be regarded as debug
  information.

* The SUFFIX handling in Siesta has now a reduced output scope, with
  reduced verbosity.
上级 b081b937
无相关合并请求
显示
未找到文件。
0 个添加0 个删除
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册