Merge pull request #4825 from Guozhanxin/cmake

[cmake] fix path issue.
This commit is contained in:
Bernard Xiong 2021-06-26 14:07:30 +08:00 committed by GitHub
commit 989cedb278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -49,10 +49,10 @@ def GenerateCFiles(env,project):
cm_file.write("SET(CMAKE_SIZE \""+ SIZE + "\")\n\n") cm_file.write("SET(CMAKE_SIZE \""+ SIZE + "\")\n\n")
cm_file.write("SET(CMAKE_C_FLAGS \""+ rtconfig.CFLAGS + "\")\n") cm_file.write("SET(CMAKE_C_FLAGS \""+ rtconfig.CFLAGS.replace('\\', "/") + "\")\n")
cm_file.write("SET(CMAKE_CXX_FLAGS \""+ rtconfig.CXXFLAGS + "\")\n") cm_file.write("SET(CMAKE_CXX_FLAGS \""+ rtconfig.CXXFLAGS.replace('\\', "/") + "\")\n")
cm_file.write("SET(CMAKE_ASM_FLAGS \""+ rtconfig.AFLAGS + "\")\n") cm_file.write("SET(CMAKE_ASM_FLAGS \""+ rtconfig.AFLAGS.replace('\\', "/") + "\")\n")
cm_file.write("SET(CMAKE_EXE_LINKER_FLAGS \""+ re.sub('-T(\s*)', '-T ${CMAKE_SOURCE_DIR}/',rtconfig.LFLAGS) + "\")\n\n") cm_file.write("SET(CMAKE_EXE_LINKER_FLAGS \""+ re.sub('-T(\s*)', '-T ${CMAKE_SOURCE_DIR}/',rtconfig.LFLAGS.replace('\\', "/")) + "\")\n\n")
cm_file.write("SET(CMAKE_CXX_STANDARD 14)\n") cm_file.write("SET(CMAKE_CXX_STANDARD 14)\n")
cm_file.write("PROJECT(rtthread C CXX ASM)\n") cm_file.write("PROJECT(rtthread C CXX ASM)\n")