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.
24 lines
463 B
24 lines
463 B
cmake_minimum_required(VERSION 3.26)
|
|
project(AutoMocGeneratedFile)
|
|
|
|
include("../AutogenCoreTest.cmake")
|
|
|
|
file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/myConfig.h
|
|
CONTENT
|
|
"
|
|
#ifndef MYCONFIG_H
|
|
#define MYCONFIG_H
|
|
|
|
inline void foo() {}
|
|
|
|
#endif
|
|
|
|
"
|
|
)
|
|
|
|
add_executable(testTarget
|
|
main.cpp
|
|
${CMAKE_CURRENT_BINARY_DIR}/myConfig.h)
|
|
target_include_directories(testTarget PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
set_property(TARGET testTarget PROPERTY AUTOMOC ON)
|