Hello,

I would like to build some C++ software with the tool "CMake 2.8.11.2-108.1" on
my openSUSE systen.

I have macro calls like the following in a CMake script of a subdirectory.

...
message(STATUS "{T} XFLAG: |${XFLAG}|")
foreach(X
        client
...
        unix_server_stream)
   set(T "${X}_cpp")
   add_executable("${T}" "${X}.cpp")
   set_target_properties("${T}" PROPERTIES COMPILE_FLAGS "${XFLAG}" OUTPUT_NAME
"${X}")
   target_link_libraries("${T}" ${LIB})
endforeach(X)
...


The CMake GUI shows the expected log:

C++11 support activated.
{T} XFLAG: |-std=c++11|
Configuring done
Generating done


But I get surprised by the message like "error: 'std::unique_ptr' has not been
declared" after I called the program "make". The verbose build mode shows that
the needed parameter was not passed by the corresponding command.
How are the chances to find out where and why the desired compilation parameter
gets lost?


If I rename the used variable to "FLAGS", the software generation succeeds.
I would appreciate if my approach will also work with longer variable names
which can be found more easily and better understood.

Regards,
Markus
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to