[CMake] Appending to CMAKE_CXX_FLAGS

Michael Jackson mike.jackson at bluequartz.net
Tue Sep 11 11:57:51 EDT 2018


What is the “modern” way to append to CMAKE_CXX_FLAGS? This is the logic that I would like:

 

If (MSVC)

                Set(CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS} “/MP”)

Endif()

 

I have always heard that appending to the compile flags in this way is “bad”. What is the best practice for doing this?

 

Thanks

--

Michael Jackson | Owner, President

      BlueQuartz Software

[e] mike.jackson at bluequartz.net

[w] www.bluequartz.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180911/542deccf/attachment-0001.html>


More information about the CMake mailing list