[ITK-dev] Function-style preprocessor definitions

Kevin H. Hobbs hobbsk at ohio.edu
Thu Jan 29 18:18:10 EST 2015


I have a very simple test case that is broken on bubbles (a host that
submits a nightly dashboard build)

I'm using nightly ITK and nightly CMake

CMakeLists.txt :

  cmake_minimum_required( VERSION 2.8.7 )
  project( Testi_prog )

  find_package( ITK )
  include( ${ITK_USE_FILE} )

  add_executable( test_prog test_prog.cxx )
  target_link_libraries( test_prog )

test_prog.cxx:

  int main( int argc, char** argv)
  {
    return 0;
  }

The build goes fine with the :

  find_package( ITK )
  include( ${ITK_USE_FILE} )

but as soon as those lines are in I get :

WARNING: Function-style preprocessor definitions may not be passed on
the compiler
 command line because many compilers do not support it.
 CMake is dropping a preprocessor definition: (
 Consider defining the macro in a (configured) header file.


 WARNING: Function-style preprocessor definitions may not be passed on
the compiler
 command line because many compilers do not support it.
 CMake is dropping a preprocessor definition: (
 Consider defining the macro in a (configured) header file.

from ccmake and then :

Scanning dependencies of target test_prog
[100%] Building CXX object CMakeFiles/test_prog.dir/test_prog.cxx.o
/bin/sh: -c: line 0: syntax error near unexpected token `)'
/bin/sh: -c: line 0: `/usr/lib64/ccache/c++   -D)
-DITK_IO_FACTORY_REGISTER_MANAGER....

from make

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 173 bytes
Desc: OpenPGP digital signature
URL: <http://public.kitware.com/pipermail/insight-developers/attachments/20150129/f5aeaccf/attachment.sig>


More information about the Insight-developers mailing list