Quantcast
Channel: CMake: execute a macro/function as the command of add_custom_command - Stack Overflow
Browsing latest articles
Browse All 4 View Live

Answer by Karoly Molnar for CMake: execute a macro/function as the command of...

Is there a way to pass a parameter to the separate_script.cmake? You can use the cmake variables to pass values when you call the script e.g. "COMMAND ${CMAKE_COMMAND} -DPARAM=value -P...

View Article



Answer by cromod for CMake: execute a macro/function as the command of...

Take a look to this SO post.You can call your function in a separate CMake script, call this script with add_custom_target and cmake -P then add a dependency to your binary...

View Article

Answer by zaufi for CMake: execute a macro/function as the command of...

To prevent that function to run, just wrap it into if:if(NOT EXISTS ${CMAKE_BINARY_DIR}/blah-blah/generated.cpp) run_your_provided_command(BLAH_BLAH)endif()Easy!Update: To run it when config file has...

View Article

CMake: execute a macro/function as the command of add_custom_command

I'm using an external library which provides a CMake function for automatic code generation, to be used in my CMakeLists. The problem is that whenever I modify a CMakeLists then the function is run...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images