Browse Source

Xcode: Set ASM source language in project file (#13472)

Also teach the Assembler test to build under Xcode.

Suggested-by: Tobias Pape <[email protected]>
Brad King 13 years ago
parent
commit
f3477ed88c
2 changed files with 5 additions and 1 deletions
  1. 4 0
      Source/cmGlobalXCodeGenerator.cxx
  2. 1 1
      Tests/Assembler/CMakeLists.txt

+ 4 - 0
Source/cmGlobalXCodeGenerator.cxx

@@ -787,6 +787,10 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext,
     {
     {
     sourcecode += ".fortran.f90";
     sourcecode += ".fortran.f90";
     }
     }
+  else if(lang == "ASM")
+    {
+    sourcecode += ".asm";
+    }
   //else
   //else
   //  {
   //  {
   //  // Already specialized above or we leave sourcecode == "sourcecode"
   //  // Already specialized above or we leave sourcecode == "sourcecode"

+ 1 - 1
Tests/Assembler/CMakeLists.txt

@@ -7,7 +7,7 @@ set(SRCS)
 
 
 # (at least) the following toolchains can process assembler files directly
 # (at least) the following toolchains can process assembler files directly
 # and also generate assembler files from C:
 # and also generate assembler files from C:
-if("${CMAKE_GENERATOR}" MATCHES "Makefile")
+if("${CMAKE_GENERATOR}" MATCHES "Makefile|Xcode")
   if(("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|Clang|HP|SunPro|XL)$") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel"  AND  UNIX))
   if(("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|Clang|HP|SunPro|XL)$") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel"  AND  UNIX))
     set(C_FLAGS "${CMAKE_C_FLAGS}")
     set(C_FLAGS "${CMAKE_C_FLAGS}")
     separate_arguments(C_FLAGS)
     separate_arguments(C_FLAGS)