[cfe-dev] Using Clang -O4 with CMake

Clark Gaebel cg.wowus.cg at gmail.com
Fri Jun 18 20:01:27 PDT 2010


When trying out -O4 instead of my usual -O3 on my C++ code using CMake,
I got this error...

Linking CXX executable test_memory
cd /home/clark/dev/cpp/GoGo/build/util/test && /usr/bin/cmake -E
cmake_link_script CMakeFiles/test_memory.dir/link.txt --verbose=1
/usr/local/bin/clang++     
CMakeFiles/test_memory.dir/test_memory.cpp.o  -o test_memory -rdynamic
-lboost_filesystem-mt-1_42 -lboost_iostreams-mt-1_42
-lboost_program_options-mt-1_42 -lboost_regex-mt-1_42
-lboost_serialization-mt-1_42 -lboost_signals-mt-1_42
-lboost_thread-mt-1_42 -lboost_wave-mt-1_42
CMakeFiles/test_memory.dir/test_memory.cpp.o: file not recognized: File
format not recognized
collect2: ld returned 1 exit status

What am I doing wrong? This works fine on every other optimization
setting. Literally, the only thing I did differently was -O4 instead of -O3.

-- 
Regards,
-Clark




More information about the cfe-dev mailing list