Fix c(pp)dialect generating uppercase C(++)xx in Xcode build configuration, replace gnu99 with explicit compiler default
This commit is contained in:
parent
911cb20d57
commit
c9ea228366
@ -79,7 +79,6 @@
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
|
@ -1228,7 +1228,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1254,7 +1253,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = s;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1280,7 +1278,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 3;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1306,7 +1303,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1333,7 +1329,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1359,7 +1354,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
_DEBUG,
|
||||
@ -1389,7 +1383,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1419,7 +1412,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1450,7 +1442,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1480,7 +1471,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1508,7 +1498,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1538,7 +1527,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1565,7 +1553,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
@ -1592,7 +1579,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1621,7 +1607,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1652,7 +1637,6 @@
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1678,7 +1662,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_CPP_EXCEPTIONS = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
@ -1706,7 +1689,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1736,7 +1718,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1762,7 +1743,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_CPP_RTTI = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
@ -1790,7 +1770,6 @@
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
@ -1817,7 +1796,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1847,7 +1825,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = MyProject_Prefix.pch;
|
||||
@ -1876,7 +1853,6 @@
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1903,7 +1879,6 @@
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1930,7 +1905,6 @@
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1957,7 +1931,6 @@
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -1984,7 +1957,6 @@
|
||||
ARCHS = i386;
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -2011,7 +1983,6 @@
|
||||
ARCHS = x86_64;
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -2037,7 +2008,6 @@
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
@ -2051,6 +2021,473 @@
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnCDefault()
|
||||
workspace("MyWorkspace")
|
||||
cdialect("Default")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = "compiler-default";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnC89()
|
||||
workspace("MyWorkspace")
|
||||
cdialect("C89")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c89;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnC90()
|
||||
workspace("MyWorkspace")
|
||||
cdialect("C90")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c90;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnC99()
|
||||
workspace("MyWorkspace")
|
||||
cdialect("C99")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnC11()
|
||||
workspace("MyWorkspace")
|
||||
cdialect("C11")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c11;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnGnu89()
|
||||
workspace("MyWorkspace")
|
||||
cdialect("gnu89")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu89;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnGnu90()
|
||||
workspace("MyWorkspace")
|
||||
cdialect("gnu90")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu90;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnGnu99()
|
||||
workspace("MyWorkspace")
|
||||
cdialect("gnu99")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnGnu11()
|
||||
workspace("MyWorkspace")
|
||||
cdialect("gnu11")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnCppDefault()
|
||||
workspace("MyWorkspace")
|
||||
cppdialect("Default")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnCpp98()
|
||||
workspace("MyWorkspace")
|
||||
cppdialect("C++98")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++98";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnCpp11()
|
||||
workspace("MyWorkspace")
|
||||
cppdialect("C++11")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnCpp14()
|
||||
workspace("MyWorkspace")
|
||||
cppdialect("C++14")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnCpp17()
|
||||
workspace("MyWorkspace")
|
||||
cppdialect("C++17")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++1z";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnCppGnu98()
|
||||
workspace("MyWorkspace")
|
||||
cppdialect("gnu++98")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++98";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnCppGnu11()
|
||||
workspace("MyWorkspace")
|
||||
cppdialect("gnu++11")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnCppGnu14()
|
||||
workspace("MyWorkspace")
|
||||
cppdialect("gnu++14")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.XCBuildConfigurationProject_OnCppGnu17()
|
||||
workspace("MyWorkspace")
|
||||
cppdialect("gnu++17")
|
||||
prepare()
|
||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||
test.capture [[
|
||||
[MyProject:Debug(2)] /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++1z";
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OBJROOT = obj/Debug;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SYMROOT = bin/Debug;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
]]
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- XCBuildConfigurationList tests
|
||||
|
@ -943,7 +943,7 @@
|
||||
settings['EXCLUDED_SOURCE_FILE_NAMES'] = fileNameList
|
||||
end
|
||||
settings['PRODUCT_NAME'] = cfg.buildtarget.basename
|
||||
|
||||
|
||||
if os.istarget(p.IOS) then
|
||||
settings['SDKROOT'] = 'iphoneos'
|
||||
|
||||
@ -981,17 +981,53 @@
|
||||
|
||||
|
||||
function xcode.XCBuildConfiguration_CLanguageStandard(settings, cfg)
|
||||
if cfg.cdialect and cfg.cdialect ~= "Default" then
|
||||
settings['GCC_C_LANGUAGE_STANDARD'] = cfg.cdialect
|
||||
else
|
||||
settings['GCC_C_LANGUAGE_STANDARD'] = 'gnu99'
|
||||
-- if no cppdialect is provided, don't set C dialect
|
||||
-- projects without C dialect set will use compiler default
|
||||
if not cfg.cdialect then
|
||||
return
|
||||
end
|
||||
|
||||
local cLanguageStandards = {
|
||||
["Default"] = "compiler-default", -- explicit compiler default
|
||||
["C89"] = "c89",
|
||||
["C90"] = "c90",
|
||||
["C99"] = "c99",
|
||||
["C11"] = "c11",
|
||||
["gnu89"] = "gnu89",
|
||||
["gnu90"] = "gnu90",
|
||||
["gnu99"] = "gnu99",
|
||||
["gnu11"] = "gnu11"
|
||||
}
|
||||
|
||||
local cLanguageStandard = cLanguageStandards[cfg.cdialect]
|
||||
if cLanguageStandard then
|
||||
settings['GCC_C_LANGUAGE_STANDARD'] = cLanguageStandard
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function xcode.XCBuildConfiguration_CppLanguageStandard(settings, cfg)
|
||||
if cfg.cppdialect and cfg.cppdialect ~= "Default" then
|
||||
settings['CLANG_CXX_LANGUAGE_STANDARD'] = cfg.cppdialect
|
||||
-- if no cppdialect is provided, don't set C++ dialect
|
||||
-- projects without C++ dialect set will use compiler default
|
||||
if not cfg.cppdialect then
|
||||
return
|
||||
end
|
||||
|
||||
local cppLanguageStandards = {
|
||||
["Default"] = "compiler-default", -- explicit compiler default
|
||||
["C++98"] = "c++98",
|
||||
["C++11"] = "c++0x", -- Xcode project GUI uses c++0x, but c++11 also works
|
||||
["C++14"] = "c++14",
|
||||
["C++17"] = "c++1z",
|
||||
["gnu++98"] = "gnu++98",
|
||||
["gnu++11"] = "gnu++0x", -- Xcode project GUI uses gnu++0x, but c++11 also works
|
||||
["gnu++14"] = "gnu++14",
|
||||
["gnu++17"] = "gnu++1z"
|
||||
}
|
||||
|
||||
local cppLanguageStandard = cppLanguageStandards[cfg.cppdialect]
|
||||
if cppLanguageStandard then
|
||||
settings['CLANG_CXX_LANGUAGE_STANDARD'] = cppLanguageStandard
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user