Merge pull request #648 from starkos/fix-outdated-xcode
Fix out-of-date sources in the Xcode module
This commit is contained in:
commit
58ba0d8bd7
@ -1021,6 +1021,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
CONFIGURATION_BUILD_DIR = bin/Debug;
|
CONFIGURATION_BUILD_DIR = bin/Debug;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
INSTALL_PATH = /usr/local/bin;
|
INSTALL_PATH = /usr/local/bin;
|
||||||
PRODUCT_NAME = MyProject;
|
PRODUCT_NAME = MyProject;
|
||||||
@ -1265,6 +1266,36 @@
|
|||||||
prepare()
|
prepare()
|
||||||
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||||
test.capture [[
|
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;
|
||||||
|
USER_HEADER_SEARCH_PATHS = (
|
||||||
|
../include,
|
||||||
|
../libs,
|
||||||
|
"\"../name with spaces\"",
|
||||||
|
);
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
]]
|
||||||
|
end
|
||||||
|
|
||||||
|
function suite.XCBuildConfigurationProject_OnSysIncludeDirs()
|
||||||
|
sysincludedirs { "../include", "../libs", "../name with spaces" }
|
||||||
|
prepare()
|
||||||
|
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
|
||||||
|
test.capture [[
|
||||||
[MyProject:Debug(2)] /* Debug */ = {
|
[MyProject:Debug(2)] /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
@ -1280,6 +1311,7 @@
|
|||||||
../include,
|
../include,
|
||||||
../libs,
|
../libs,
|
||||||
"\"../name with spaces\"",
|
"\"../name with spaces\"",
|
||||||
|
"$(inherited)",
|
||||||
);
|
);
|
||||||
OBJROOT = obj/Debug;
|
OBJROOT = obj/Debug;
|
||||||
ONLY_ACTIVE_ARCH = NO;
|
ONLY_ACTIVE_ARCH = NO;
|
||||||
@ -1290,7 +1322,6 @@
|
|||||||
]]
|
]]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function suite.XCBuildConfigurationProject_OnBuildOptions()
|
function suite.XCBuildConfigurationProject_OnBuildOptions()
|
||||||
buildoptions { "build option 1", "build option 2" }
|
buildoptions { "build option 1", "build option 2" }
|
||||||
prepare()
|
prepare()
|
||||||
|
@ -884,7 +884,7 @@
|
|||||||
|
|
||||||
settings['ALWAYS_SEARCH_USER_PATHS'] = 'NO'
|
settings['ALWAYS_SEARCH_USER_PATHS'] = 'NO'
|
||||||
|
|
||||||
if not (cfg.symbols == p.ON) then
|
if cfg.symbols ~= p.OFF then
|
||||||
settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf-with-dsym'
|
settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf-with-dsym'
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -983,12 +983,18 @@
|
|||||||
|
|
||||||
settings['CONFIGURATION_TEMP_DIR'] = '$(OBJROOT)'
|
settings['CONFIGURATION_TEMP_DIR'] = '$(OBJROOT)'
|
||||||
|
|
||||||
if cfg.symbols == p.ON then
|
if config.isDebugBuild(cfg) then
|
||||||
settings['COPY_PHASE_STRIP'] = 'NO'
|
settings['COPY_PHASE_STRIP'] = 'NO'
|
||||||
end
|
end
|
||||||
|
|
||||||
settings['GCC_C_LANGUAGE_STANDARD'] = 'gnu99'
|
settings['GCC_C_LANGUAGE_STANDARD'] = 'gnu99'
|
||||||
|
|
||||||
|
if cfg.flags['C++14'] then
|
||||||
|
settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++14'
|
||||||
|
elseif cfg.flags['C++11'] then
|
||||||
|
settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++0x'
|
||||||
|
end
|
||||||
|
|
||||||
if cfg.exceptionhandling == p.OFF then
|
if cfg.exceptionhandling == p.OFF then
|
||||||
settings['GCC_ENABLE_CPP_EXCEPTIONS'] = 'NO'
|
settings['GCC_ENABLE_CPP_EXCEPTIONS'] = 'NO'
|
||||||
end
|
end
|
||||||
@ -1028,7 +1034,16 @@
|
|||||||
for i,v in ipairs(includedirs) do
|
for i,v in ipairs(includedirs) do
|
||||||
cfg.includedirs[i] = premake.quoted(v)
|
cfg.includedirs[i] = premake.quoted(v)
|
||||||
end
|
end
|
||||||
settings['HEADER_SEARCH_PATHS'] = table.join(cfg.includedirs, cfg.sysincludedirs)
|
settings['USER_HEADER_SEARCH_PATHS'] = cfg.includedirs
|
||||||
|
|
||||||
|
local sysincludedirs = project.getrelative(cfg.project, cfg.sysincludedirs)
|
||||||
|
for i,v in ipairs(sysincludedirs) do
|
||||||
|
cfg.sysincludedirs[i] = premake.quoted(v)
|
||||||
|
end
|
||||||
|
if not table.isempty(cfg.sysincludedirs) then
|
||||||
|
table.insert(cfg.sysincludedirs, "$(inherited)")
|
||||||
|
end
|
||||||
|
settings['HEADER_SEARCH_PATHS'] = cfg.sysincludedirs
|
||||||
|
|
||||||
for i,v in ipairs(cfg.libdirs) do
|
for i,v in ipairs(cfg.libdirs) do
|
||||||
cfg.libdirs[i] = premake.project.getrelative(cfg.project, cfg.libdirs[i])
|
cfg.libdirs[i] = premake.project.getrelative(cfg.project, cfg.libdirs[i])
|
||||||
|
Loading…
Reference in New Issue
Block a user