Hi,

is it possible to override CMAKE_C_FLAGS on a per-directory basis? I
have attempted to solve this by setting CMAKE_C_FLAGS to a different
value than the default used in the project, but this modification is
not reflected in the command line for compilation within the
directory. Example

"global" CMAKE_C_FLAGS are "-foo -bar"

some_dir/CMakeLists.txt:
[...]
set(CMAKE_C_FLAGS "-argl")
[...]

Still sources in some_dir are compiled with "-foo -bar" rather than
with "-argl".


Also setting the COMPILE_FLAGS property via
set_source_files_properties() applied to the sources in some_dir would
only *append* the new flags to "-foo -bar" rather than replacing them.

cmake 2.8 on Linux.

Kind regards
Ingolf
_______________________________________________
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

Reply via email to