[PATCH] D95633: [test-suite] SPEC2017 CPU CactuBSSN floating point tests.

Nichols A. Romero via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 20:26:00 PST 2021


naromero77 added inline comments.


================
Comment at: External/SPEC/CFP2017rate/507.cactuBSSN_r/CMakeLists.txt:50-52
+target_compile_definitions(${PROG} PRIVATE $<$<COMPILE_LANGUAGE:Fortran>:FCODE>)
+target_compile_definitions(${PROG} PRIVATE $<$<COMPILE_LANGUAGE:C>:CCODE>)
+target_compile_definitions(${PROG} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:CCODE CCTK_DISABLE_RESTRICT=1>)
----------------
Meinersbur wrote:
> test-suite style usually defines compilation/linking options before adding the target (e.g. by setting LDFALGS, CFLAGS, CXXCLAGS), `add_compile_definitions` would be more consistent than `target_compile_definitions`.
> 
> But I also don't think its important.
At first I tried using `add_compile_definitions`, but the the generator expression was not being expanded correctly. It was being partially merged with the absolute path to the object file. I spent several hours trying to debug this but had no success:

I then found this recommendation:
https://stackoverflow.com/questions/55536140/defining-preprocessor-in-modern-cmake

and went with `target_compile_definitions` instead.



Repository:
  rT test-suite

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

https://reviews.llvm.org/D95633



More information about the llvm-commits mailing list