[PATCH] D96746: [test-suite] SPEC2017 CPU ROMS floating point tests.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 09:13:46 PST 2021


Meinersbur added a comment.

Btw, I found the following at https://blog.kitware.com/fortran-for-cc-developers-made-easier-with-cmake/ (from 2012):

> Building Fortran in the correct order
>
> Fortran 90 supports a module system that allows Fortran to import and export modules from source files. This adds a huge complexity to the build problem as the Fortran code must be compiled in the correct order to ensure that module files are available for import after they have been exported, but before they are imported. To accomplish this, CMake contains a full Fortran parser. When CMake computes depend information at build time, it will parse all of the Fortran sources. The parser determines which files are producers and which files are the consumers, and then it uses that information to order the build. There is no user interaction with CMake in order to use this feature. It is only used with Makefile builds. The Intel VS Fortran IDE plugin handles this itself.



================
Comment at: CMakeLists.txt:11
   enable_language(Fortran)
+  if(NOT ${CMAKE_GENERATOR} STREQUAL "Ninja")
+      message(WARNING "CMAKE_GENERATOR = ${CMAKE_GENERATOR}.\n"
----------------
Some generators have spaces in their name ("UNIX Makefiles"), I recommend using quotes. 

The syntax of STREQUAL is `<variable|string> STREQUAL <variable|string>`, so
```
if(NOT CMAKE_GENERATOR STREQUAL "Ninja")
```
should work too.


================
Comment at: CMakeLists.txt:13-14
+      message(WARNING "CMAKE_GENERATOR = ${CMAKE_GENERATOR}.\n"
+	"Fortran test suite may NOT build in parallel.\n"
+	"Recommend using Ninja 1.10 or later.")
+  endif()
----------------
When I tried the "UNIX Makefile" generator, it did not even build sequentially.

Could you add that to the message that this is a warning about the Generator/`-G` switch? A user who does not know about what ninja is might be confused by this message.



Repository:
  rT test-suite

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96746/new/

https://reviews.llvm.org/D96746



More information about the llvm-commits mailing list