You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
503 B
13 lines
503 B
10 years ago
|
|
||
|
enable_language(CXX)
|
||
|
|
||
|
file(GENERATE
|
||
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/$<BOOL:$<TARGET_PROPERTY:foo,SOURCES>>somefile.cpp"
|
||
|
CONTENT "static const char content[] = \"$<TARGET_PROPERTY:foo,SOURCES>\";\n"
|
||
|
)
|
||
|
|
||
|
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/renamed.cpp"
|
||
|
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/renamed.cpp")
|
||
|
|
||
|
add_executable(foo "${CMAKE_CURRENT_BINARY_DIR}/1somefile.cpp" "${CMAKE_CURRENT_BINARY_DIR}/renamed.cpp")
|