PhotoFlow icon indicating copy to clipboard operation
PhotoFlow copied to clipboard

[build] compiler flags are being reset during the build

Open darix opened this issue 9 years ago • 2 comments

buld is started with:

/usr/bin/cmake ..
  -DCMAKE_INSTALL_PREFIX:PATH=/usr
  -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64
  -DINCLUDE_INSTALL_DIR:PATH=/usr/include
  -DLIB_INSTALL_DIR:PATH=/usr/lib64
  -DSYSCONF_INSTALL_DIR:PATH=/etc
  -DSHARE_INSTALL_PREFIX:PATH=/usr/share
  -DCMAKE_BUILD_TYPE=None
  '-DCMAKE_C_FLAGS=-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG'
  '-DCMAKE_CXX_FLAGS=-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG' '-DCMAKE_Fortran_FLAGS=-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG'
  '-DCMAKE_EXE_LINKER_FLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now'
  '-DCMAKE_MODULE_LINKER_FLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now'
  '-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now'
  -DLIB_SUFFIX=64
  -DCMAKE_SKIP_RPATH:BOOL=ON
  -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
  -DBUILD_SHARED_LIBS:BOOL=ON
  -DBUILD_STATIC_LIBS:BOOL=OFF
  -DCMAKE_COLOR_MAKEFILE:BOOL=OFF
  -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF
  -DCMAKE_MODULES_INSTALL_DIR=/usr/share/cmake/Modules
  -DCMAKE_USER_MAKE_RULES_OVERRIDE=/usr/share/cmake/Modules/opensuse_rules.cmake
  -DBUNDLED_LENSFUN:BOOL=OFF
  -DUSE_GTKMM3=true
  -DINSTALL_PREFIX:STRING=/usr
  -DCMAKE_BUILD_TYPE=RelWithDebInfo

as you see in the build log but as you see in the build log the "INSTALL_PREFIX" define got lost.

darix avatar Mar 31 '16 22:03 darix

I finally managed to look into this issue, sorry for the delay.

I think that the reason for the missing "INSTALL_PREFIX" define is that you are setting

-DCMAKE_BUILD_TYPE=None

In such case, the define is not added to the CXX_FLAGS

Did you try with -DCMAKE_BUILD_TYPE=Release?

aferrero2707 avatar Apr 09 '16 19:04 aferrero2707

@darix I'm getting back to this issue to see if I can help further... Did you have a chance to try building the package with -DCMAKE_BUILD_TYPE=Release?

The -DCMAKE_BUILD_TYPE=None target is not currently supported. Is there a reason to use this one instead of Release?

Thanks!

aferrero2707 avatar Jul 30 '17 14:07 aferrero2707