[CMake] CXX_COMPILER_FLAGS also passed to the linker?
Mike Jackson
mike.jackson at imts.us
Tue Jan 2 14:34:04 EST 2007
I am using the intel c++ compiler for OS X and I am trying to shutoff
some remarks that the compiler kicks out. According to the Intel Docs
if I pass "-wd[RemarkNum],[RemarkNum]..." to the compiler I can
shutoff what I want.
So I fired up ccmake and set the CMAKE_CXX_FLAGS to "-wd981" and
then ran make. The compile proceeds file (without the remarks) until
the link phase. The linker is dying because "d981" is being passed to
the linker which is not right. Is this a bug in CMake or am I not
using ccmake correctly?
/usr/bin/icpc -DHDFWrapper_EXPORTS -wd981 -I/usr/local/include/
boost-1_33_1 -I/Users/mjackson/Task_7/Workspace/PFImport/src -I/Users/
mjackson/Task_7/Workspace/PFImport/.. -I/Developer/Headers/FlatCarbon
-I/Users/mjackson/Task_7/Workspace/MHDataModel/.. -I/Users/mjackson/
Task_7/Workspace/MHDFInterface/.. -DDEBUG -Wall -o MHDataModel/
MHDFInterface/CMakeFiles/HDFWrapper.dir/Users/mjackson/Task_7/
Workspace/MHDFInterface/MHDFInterface.o -c /Users/mjackson/Task_7/
Workspace/MHDFInterface/MHDFInterface.cpp
Linking CXX shared library ../../Bin/libHDFWrapper.dylib
cd /Users/mjackson/Task_7/Workspace/PFImport/Build-Intel/MHDataModel/
MHDFInterface && /usr/local/bin/cmake -P CMakeFiles/HDFWrapper.dir/
cmake_clean_target.cmake
cd /Users/mjackson/Task_7/Workspace/PFImport/Build-Intel/MHDataModel/
MHDFInterface && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/
HDFWrapper.dir/link.txt --verbose=1
/usr/bin/icpc d981 -dynamiclib -headerpad_max_install_names -
o ../../Bin/libHDFWrapper.dylib -install_name /Users/mjackson/Task_7/
Workspace/PFImport/Build-Intel/Bin/libHDFWrapper.dylib "CMakeFiles/
HDFWrapper.dir/Users/mjackson/Task_7/Workspace/MHDFInterface/
utilities.o" "CMakeFiles/HDFWrapper.dir/Users/mjackson/Task_7/
Workspace/MHDFInterface/MHDFInterface.o" -L/usr/local/lib -lz -
lhdf5_hl -lhdf5 -lhdf5_hl -lhdf5 -lhdf5_hl -lhdf5 -ltiff
IPO Warning: can not find "d981"
libtool: can't open file: d981 (No such file or directory)
make[2]: *** [Bin/libHDFWrapper.dylib] Error 1
make[1]: *** [MHDataModel/MHDFInterface/CMakeFiles/HDFWrapper.dir/
all] Error 2
make: *** [all] Error 2
Thanks for any help
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
More information about the CMake
mailing list