dpalermo wrote: I am seeing build errors on systems running cmake versions 3.22.1 and 3.24.3:
``` FAILED: tools/flang/unittests/Evaluate/CMakeFiles/uint128.test.dir/uint128.cpp.o /usr/bin/c++ -D-DFLANG_RUNTIME_F128_MATH_LIB=\"libquadmath\" -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS ... ... <command-line>: error: macro names must be identifiers ``` Systems running 3.28.1 build without problem. The problem can be resolved by removing the stray '-D' in the call to add_compile_definitions: ``` diff --git a/flang/CMakeLists.txt b/flang/CMakeLists.txt index c8e75024823f..af34366b3652 100644 --- a/flang/CMakeLists.txt +++ b/flang/CMakeLists.txt @@ -336,7 +336,7 @@ endif() if (FLANG_RUNTIME_F128_MATH_LIB) add_compile_definitions( - -DFLANG_RUNTIME_F128_MATH_LIB="${FLANG_RUNTIME_F128_MATH_LIB}" + FLANG_RUNTIME_F128_MATH_LIB="${FLANG_RUNTIME_F128_MATH_LIB}" ) endif() ``` https://github.com/llvm/llvm-project/pull/81971 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits