@@ -724,10 +724,10 @@ def _add_file(self, file_path, resources, base_path, exclude_paths=None):
724
724
elif ext == '.c' :
725
725
resources .c_sources .append (file_path )
726
726
727
- elif ext == '.cpp' :
727
+ elif ext == '.cpp' or ext == '.cc' :
728
728
resources .cpp_sources .append (file_path )
729
729
730
- elif ext == '.h' or ext == '.hpp' :
730
+ elif ext == '.h' or ext == '.hpp' or ext == '.hh' :
731
731
resources .headers .append (file_path )
732
732
733
733
elif ext == '.o' :
@@ -996,7 +996,7 @@ def compile_command(self, source, object, includes):
996
996
997
997
source = abspath (source ) if PRINT_COMPILER_OUTPUT_AS_LINK else source
998
998
999
- if ext == '.c' or ext == '.cpp' :
999
+ if ext == '.c' or ext == '.cpp' or ext == '.cc' :
1000
1000
base , _ = splitext (object )
1001
1001
dep_path = base + '.d'
1002
1002
try :
@@ -1006,12 +1006,12 @@ def compile_command(self, source, object, includes):
1006
1006
config_file = ([self .config .app_config_location ]
1007
1007
if self .config .app_config_location else [])
1008
1008
deps .extend (config_file )
1009
- if ext == '.cpp ' or self .COMPILE_C_AS_CPP :
1009
+ if ext != '.c ' or self .COMPILE_C_AS_CPP :
1010
1010
deps .append (join (self .build_dir , self .PROFILE_FILE_NAME + "-cxx" ))
1011
1011
else :
1012
1012
deps .append (join (self .build_dir , self .PROFILE_FILE_NAME + "-c" ))
1013
1013
if len (deps ) == 0 or self .need_update (object , deps ):
1014
- if ext == '.cpp ' or self .COMPILE_C_AS_CPP :
1014
+ if ext != '.c ' or self .COMPILE_C_AS_CPP :
1015
1015
return self .compile_cpp (source , object , includes )
1016
1016
else :
1017
1017
return self .compile_c (source , object , includes )
0 commit comments