[CMake] Detecting compilation option and flags

2018-05-20 Thread Lars Christensen
I rely on these to detect options and flags: $ $ But not all options are picked up. These are missing: 1. Debug flag (when CMAKE_BUILD_TYPE=Debug) 2. -std=xx (CMAKE_CXX_STANDARD) How can I reliably detect ALL compilation flags for a target? Picking up these two flags is required for my pre-com

[CMake] Method to get effective include_directories and compile_definitions

2014-02-10 Thread Lars Christensen
Hello, Is there a way to get the effective include directories and compile definitions for a target, including those specified at the directory level and any INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITION on targets that are required via target_link_libraries? Iterating recursivel

[CMake] Custom target/command dependencies with Visual Studio

2012-02-23 Thread Lars Christensen
I have this simple CMakeLists.txt: add_custom_target(deptest ALL DEPENDS files.out) add_custom_command(OUTPUT foo.x COMMAND touch foo.x DEPENDS foo.cpp) add_custom_command(OUTPUT bar.x COMMAND false DEPENDS bar.cpp) add_custom_command(OUTPUT files.out COMMAND touch files.out DEPENDS foo.x bar.x)