There are various variables like CMAKE_C_FLAGS_<CONFIG> that can influence the final flags sent to the compiler. Is there a variable that exists or a function to call to get the final C flags.
What I am trying to do is invoke a custom command to run make on an external source tree. This makefile has CC, AR, RANLIB CFLAGS and LDFLAGS variables. The command I would like to do is add_custom_command(<OUTPUT> COMMAND make CC=${CMAKE_C_COMPILER} AR=${CMAKE_AR} RANLIB=${CMAKE_RANLIB} CFLAGS=<what to put here> LDFLAGS=<what to put here> ……) However it doesn’t seem like there is a variable that contains a set of all the flags that cmake would use. For example, when building on OS X the -mmacosx-version-min flag gets tacked on by cmake but I can’t find a variable that contains this flag. Is there a way to do what I want or am I going to have to manage all the C flags manually? -- Matt Keeler
-- 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://public.kitware.com/mailman/listinfo/cmake