In regards to this topic *in my opinion* linking directory structure/level to CMake CFLAGS is not a good design (on the part of CMake)... again *in my opinion*.
I would prefer there was project level (and ability to inherit project level settings from another project using the project() where project could use project(myProject INHERIT myOtherProject) and add_subdirectory level inheritance with the addition concept of namespaces. Namespaces, which do not exist, would allow use of add_subdirectory with third party source and could prepend CMAKE_C_FLAGS with the project name if add_subdirectory allowed the use of a project name specification such as: add_subdirectory( directory PROJECT myProjectName). Then CMAKE_C_FLAGS would become myProjectName.CMAKE_C_FLAGS and any use of CACHE STRING "" FORCE in the added subdirectory would change myProjectName.CMAKE_C_FLAGS and not the global (argh) CMAKE_C_FLAGS. With these changes to CMake a programmer could add more easily 3rdParty packages with add_subdirectory and not have CMAKE_C_FLAGS get blasted away by each 3rd party package. For anyone interested in why I want/desire this please see "Build Only What You Need In Third Party Packages": http://www.mail-archive.com/[email protected]/msg25703.html if your having difficulty with global CFLAGS and subdir project inheritance.... I feel your pain.
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
