[CMake] How can I find the values of COMPILE_FLAGS and LINK_FLAGS in cmake-generated CodeBloks files?

yaoyansi yaoyansi at aliyun.com
Sun Sep 7 10:36:57 EDT 2014


Hi all,I use cmake 2.8.11 on CentOS 7 x64.
My cmake files and the generated CodeBlocks project files are attached, and here is a code section of my CMakeLists.txt
set(MAYA_COMPILE_FLAGS
    "-m64 -g -pthread -pipe -fPIC -Wno-deprecated -fno-gnu-keywords" )

set(MAYA_LINK_FLAGS
    "-shared -m64 -g -pthread -pipe -fPIC -Wno-deprecated -fno-gnu-keywords -Wl,-Bsymbolic" )

SET_TARGET_PROPERTIES( ${MY_PROJECT_NAME}
    PROPERTIES 
        COMPILE_DEFINITIONS        "${MAYA_COMPILE_DEFINITIONS}"
        COMPILE_FLAGS            "${MAYA_COMPILE_FLAGS}"
        LINK_FLAGS            "${MAYA_LINK_FLAGS}"
        PREFIX                ""
        SUFFIX                ${MAYA_EXTENSION}

        OUTPUT_NAME            ${MY_PROJECT_NAME}
        LIBRARY_OUTPUT_DIRECTORY    ${CMAKE_CURRENT_SOURCE_DIR}/../../plug-ins
)
When I open the generated file dynamic_enum.cbp with CodeBlocks IDE, I can't find any value of COMPILE_FLAGS and LINK_FLAGS in Project's build options window. And, when I open dynamic_enum.cbp with gedit, I can't find any values of COMPILE_FLAGS and LINK_FLAGS too.But when I build the project, I can find these value in CodeBlocks's build log window, here it is:/usr/bin/g++  -fPIC -g -shared -m64 -g -pthread -pipe -fPIC -Wno-deprecated -fno-gnu-keywords -Wl,-Bsymbolic   -shared -Wl,-soname,dynamic_enum.so -o /home/user0/dev/mymagicbox/dynamic_enum/plug-ins/dynamic_enum.so CMakeFiles/dynamic_enum.dir/home/user0/dev/mymagicbox/dynamic_enum/src/dynamic_enum.cpp.o CMakeFiles/dynamic_enum.dir/home/user0/dev/mymagicbox/dynamic_enum/src/plugin.cpp.o  -L/usr/autodesk/maya2015-x64/lib -lFoundation -lOpenMaya -lOpenMayaUI -Wl,-rpath,/usr/autodesk/maya2015-x64/lib I don't know how to check the value of COMPILE_FLAGS and LINK_FLAGS in CodeBlocks IDE. Is there any thing wrong in my CMakeLists.txt?
Could you give me any help? Thank you in advance.

Cheers
yaoyansi


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140907/2e83eef6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dynamic_enum_cmake.zip
Type: application/octet-stream
Size: 40600 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140907/2e83eef6/attachment-0001.obj>


More information about the CMake mailing list