I have a project having txx file along with source files. I used following CMake configuration
SET(Main Step6.cpp Step6main.cpp Step6RegionGrowing1.cpp Step6RegionGrowing2.cpp moc_Step6.cpp Step6RegionGrowing.txx) SET(MainH Step6.h )
add_executable(${PROJECT_NAME} ${Main} ${MainH} ) target_link_libraries(${PROJECT_NAME} ${ALL_LIBRARIES})
But my sln file is showing txx file in headers and treating it as a text file while comiplation. I checked one cpp is including that txx and when I entered some line just to enter some errors so that I can check if that txx is compiling or not it didn't returned any error. Now my question is
Thanks in advance.
I think CMake looks file extensions to find out C++ source files and does not recognize the .txx extension as one of the C++ source file extensions. The CMake documentation describes way to set the file language explicitely. Eg
set_source_files_properties(Step6RegionGrowing.txx PROPERTIES LANGUAGE CXX)
Hope it helps!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.