Skip to content

Commit

Permalink
Treat .c supporting files as C
Browse files Browse the repository at this point in the history
  • Loading branch information
Soroosh129 committed Sep 19, 2021
1 parent 4a07316 commit da58de2
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions org.lflang/src/org/lflang/generator/c/CCmakeGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,6 @@ StringBuilder generateCMakeCode(
// First enable the CXX language
cMakeCode.append("enable_language(CXX)\n");
cMakeCode.append("set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -Wno-write-strings\")\n");
// We can't just simply use g++ to compile C code. We use a
// specific CMake flag to set the language of all .c files to C++.
// Also convert any additional sources
for (String source: additionalSources) {
cMakeCode.append("set_source_files_properties( "+source+" PROPERTIES LANGUAGE CXX)\n");
}
cMakeCode.append("set_source_files_properties(${LF_PLATFORM_FILE} PROPERTIES LANGUAGE CXX)\n");
// Finally, set the CXX compiler to what the user has requested.
cMakeCode.append("set(CMAKE_CXX_COMPILER "+targetConfig.compiler+")\n");
} else {
Expand Down

0 comments on commit da58de2

Please sign in to comment.