Page MenuHome

Use compiler check for WITH_COMPILER_SHORT_FILE_MACRO
ClosedPublic

Authored by Ankit Meel (ankitm) on Nov 4 2020, 6:30 AM.

Details

Summary

Use a more reliable method to check the availability of the flag than
compiler versions.

Diff Detail

Repository
rB Blender

Event Timeline

Ankit Meel (ankitm) requested review of this revision.Nov 4 2020, 6:30 AM
Ankit Meel (ankitm) created this revision.
This revision is now accepted and ready to land.Nov 4 2020, 12:09 PM
This revision now requires review to proceed.Nov 4 2020, 12:52 PM

This still won't build for me.

First I get some warnings about boost and then it throws the same errors

Building Blender ...
make -s -C "/home/christoph/Software/Blender/blender-custom/build_linux" -j 4 install
[  0%] Building C object intern/clog/CMakeFiles/bf_intern_clog.dir/clog.c.o
[  0%] Building CXX object intern/guardedalloc/CMakeFiles/bf_intern_guardedalloc.dir/intern/leak_detector.cc.o
[  0%] Building CXX object intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_Buttons.cpp.o
c++: error: unrecognized command line option ‘-fmacro-prefix-map=/home/christoph/Software/Blender/blender-custom/blender/=’
c++: error: unrecognized command line option ‘-fmacro-prefix-map=/home/christoph/Software/Blender/blender-custom/build_linux/=’
intern/guardedalloc/CMakeFiles/bf_intern_guardedalloc.dir/build.make:62: recipe for target 'intern/guardedalloc/CMakeFiles/bf_intern_guardedalloc.dir/intern/leak_detector.cc.o' failed
make[3]: *** [intern/guardedalloc/CMakeFiles/bf_intern_guardedalloc.dir/intern/leak_detector.cc.o] Error 1
CMakeFiles/Makefile2:314: recipe for target 'intern/guardedalloc/CMakeFiles/bf_intern_guardedalloc.dir/all' failed
make[2]: *** [intern/guardedalloc/CMakeFiles/bf_intern_guardedalloc.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....

It throws this error a couple of times.
I am on Linux Mint Mate 19.1 and on GCC 9.3.0 if that is of any help

  • add cxx check too. Remove compiler name and version as their can be multiple as it seems from this case.

Please check again.
Also share the few lines that you see after "-- Performing Test C_MACRO_PREFIX_MAP" while
configuring.

building works now but there seems to be an error still?

-- Performing Test CXX_MACRO_PREFIX_MAP
-- Performing Test CXX_MACRO_PREFIX_MAP - Failed
-- Unsupported CXXFLAG: -fmacro-prefix-map=foo=bar
-- Unsupported CXXFLAG: -Werror=float-conversion
-- Unsupported CXXFLAG: -Werror=double-promotion
-- Unsupported CXXFLAG: -Wno-error=unused-macros
  • message_first_run to message. Since WITH_COMPILER_SHORT_FILE_MACRO is set to off in unsupported compilers, subsequent runs will be safe from warning spam.
This revision was not accepted when it landed; it landed in state Needs Review.Nov 4 2020, 4:31 PM
This revision was automatically updated to reflect the committed changes.