Created
August 8, 2024 20:52
-
-
Save yeputons/230dd8e110c64f928208ae2bfeb950d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.22) | |
project(cmake-issue-demo CXX) | |
add_executable(exec main.cpp) | |
set(ARGS ARG1 "value1" ARG2 "$<$<CONFIG:Debug>:value2>" ARG3 "value3") | |
add_custom_command( | |
TARGET exec POST_BUILD | |
COMMAND "${CMAKE_COMMAND}" | |
-D "ARGS=${ARGS}" | |
-P "${CMAKE_CURRENT_SOURCE_DIR}/helper.cmake" | |
VERBATIM | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
message("ARGS=${ARGS}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment