Commit Graph

46 Commits

Author SHA1 Message Date
Jussi Pakkanen f3386d10c3 Merge branch 'vs-privinc' 2016-03-29 22:50:15 +03:00
Jussi Pakkanen 833520afb5 Merge branch 'vs-fixinclude' 2016-03-29 22:45:45 +03:00
Jussi Pakkanen 1d89d091f8 Merge branch 'vs-extraargs' 2016-03-29 22:32:48 +03:00
Jussi Pakkanen 5ea24bafdd Merge branch 'samename' 2016-03-29 22:25:16 +03:00
Nicolas Schneider a33d9d56cf vs2010: support EXTRA_ARGS for generators 2016-03-29 12:08:34 +02:00
Nicolas Schneider c2a9f81b68 vs2010: fix generated files' path
Generated files should always come with the correct relative path set,
so we don't have to modify it at all.
2016-03-29 12:08:34 +02:00
Nicolas Schneider ba8b650cda vs2010: fix relative path to target private dir for generators
backend.get_target_private_dir() includes the target directory in the path.
However, we want to treat all paths relative from the target directory,
because that's where our VS project file lives in.
2016-03-29 12:08:34 +02:00
Nicolas Schneider 330be891c1 vs2010: fix generator command
A shebang line on Windows will be resolved to [binary, script_path].
Thus, we need to use both instead of just taking the first element of the
command.
2016-03-29 12:08:09 +02:00
Nicolas Schneider 30e2a5feae vs2010: fix include directories
Everything in the VS project file is relative to the project file itself.
The project file gets put in the target.subdir, so to include files from
there we just need to use '.'. To include from the private dir, we
need to use the relative path from the target dir to the target private
dir.
2016-03-29 11:50:50 +02:00
Nicolas Schneider 9c17f0cd93 vs2010: support private include dirs 2016-03-29 11:49:40 +02:00
Nicolas Schneider fd8180ddcb move source file conflict detection into Vs2010 backend 2016-03-28 14:42:52 +02:00
Nicolas Schneider 84804fc531 vs2010: use copy of buildtype_args to not change global state
We do not want the modifications of general_args to propagate to the
global buildtype_args.
2016-03-25 11:01:07 +01:00
Nicolas Schneider 8787ec3ea2 vs2010: fix object extraction with same source file name
This also refactors determine_ext_objs() to use inheritance instead of a
method flag for determining the object output name.
2016-03-25 09:49:30 +01:00
Nicolas Schneider 0c4aab6eed vs2010: support same source file names in different subdirs 2016-03-24 23:44:44 +01:00
Jussi Pakkanen 9071c8fc45 Merge branch 'Custom target absolute paths'. 2016-03-20 21:39:49 +02:00
Jussi Pakkanen c1a0bd9a52 Merge pull request #441 from nioncode/vs-compile-args
vs2010: fix compile args
2016-03-20 21:24:48 +02:00
Jussi Pakkanen a3d49ca1ce Merge pull request #453 from nioncode/vs-customTargetDependencies
vs2010: fix dependencies of CustomTarget
2016-03-20 18:49:53 +02:00
Nicolas Schneider 147b7aa356 vs2010: add explicit objects as 'Object' ItemGroup instead of link dependency
This has two effects:
1. It makes targets with only object files work (test case 88).
2. It adds the object files to the project in the VS IDE.
2016-03-17 13:13:28 +01:00
Nicolas Schneider d72cc6e6f8 vs2010: fix object extraction
1. Dependencies must be set up with the target's id instead of its
basename.
2. Extracted object output file names must not include the directory
prefix, because MSBuild puts all object files into the same directory
and names them srcfilename.obj instead of dir/filename.obj or
dir_filename.obj.
2016-03-17 12:37:38 +01:00
Nicolas Schneider 4d9db21039 vs2010: fix dependencies of CustomTarget 2016-03-16 00:00:39 +01:00
Nicolas Schneider 3871f22cc3 remove unnecessary os.path.join() calls
ofilenames and srcs are already absolute paths.
2016-03-15 23:37:50 +01:00
Nicolas Schneider 2761f96fe9 vs2010: give each target an own temp dir
The 'Rebuild' target fails in mysterious ways if multiple targets use
the same directories because of output files being deleted between two
build steps (e.g. test case 78 fails on Rebuild, whereas Clean + Build
work just fine).
2016-03-14 09:56:42 +01:00
Nicolas Schneider 2511ff0970 check is_header() first, since it is a subset of is_source() 2016-03-14 00:03:16 +01:00
Nicolas Schneider 1f907e75da add everything that is not an object or source file to headers list 2016-03-13 23:08:37 +01:00
Nicolas Schneider c72cefaac4 only include known source file extensions into sources list 2016-03-13 19:07:44 +01:00
Nicolas Schneider baa639031b not all dependencies have a compile_args attribute 2016-03-13 19:01:46 +01:00
Nicolas Schneider e366631e9e don't fail if we don't compile anything (we might just bundle object files) 2016-03-13 18:58:41 +01:00
Nicolas Schneider 5503939866 only guess language for source files, not for header or object files 2016-03-13 18:03:14 +01:00
Nicolas Schneider 8eac78b861 vs2010: support language specific extra_args 2016-03-13 17:08:30 +01:00
Jussi Pakkanen 0d5eaa2721 Merge pull request #442 from nioncode/vs-linker-args
vs2010: fix linker args
2016-03-12 16:44:33 +02:00
Nicolas Schneider 17f1323aca vs2010: fix linker args 2016-03-12 14:18:51 +01:00
Nicolas Schneider 49418cfe8a vs2010: support multiple precompiled headers (one per language)
This creates the PrecompiledHeader properties for every source file in the
project if multiple languages are present. Otherwise, the global pch
settings are used.
The pch to use is determined by checking the suffix of the source file.
2016-03-12 02:02:36 +01:00
Nicolas Schneider 5ba7680a0d vs2010: fail on multiple precompiled headers 2016-03-12 00:41:04 +01:00
Nicolas Schneider 18ae344be4 vs2010: support precompiled headers 2016-03-11 19:33:53 +01:00
Nicolas Schneider 40a7287a59 vs2010: properly check whether solution needs to be regenerated 2016-02-25 23:13:29 +01:00
Nicolas Schneider bffc84e77e vs2010: write regen.rule in gen_regenproj 2016-02-25 23:13:14 +01:00
Nicolas Schneider 4651ec8f77 vs2010: fix REGEN project input files 2016-02-25 23:12:56 +01:00
Jussi Pakkanen 003696fc27 Merge VS2010 path fix branch. 2016-02-25 22:49:44 +02:00
Nicolas Schneider c5001a3a5a call os.path.normpath before splitting a file path into its components
This makes sure that any '/' are converted to native directory separators
on Windows.
2016-02-25 21:36:57 +01:00
Nicolas Schneider 6de2fd6ab5 vs2010: fix target_to_build_root method
Python's os.path.split() does not split the path into its components.
Instead, split the path with str.split() using the OS's file system
separator.
2016-02-24 00:40:14 +01:00
Nicolas Schneider 78551ae242 vs2010: do not add generated object files to project
MSBuild automatically includes the output objects of the CustomBuildStep
in the link command. If the objects are additionally added to the project,
they will be put twice on the linker command, which leads to LNK4042
warning.
2016-02-23 23:46:34 +01:00
Nicolas Schneider 2dcac38624 vs2010: write CustomBuildStep only if there is at least 1 command to be run 2016-02-23 22:55:13 +01:00
Nicolas Schneider ed6c0e1fa6 vs2010: merge all generators into single command invocation
MSBuild does not allow multiple CustomBuildStep elements. Therefore, all
input / output files and generator commands must be concatenated and put
into a single CustomBuildStep.
2016-02-23 01:04:27 +01:00
Nicolas Schneider d79f402769 vs2010: fix including a precompiled / generated object file in compilation
MSBuild uses the <Object Include='FILE'/> syntax to add prebuilt object
files to the project.
2016-02-23 01:04:27 +01:00
Nicolas Schneider c2e406295e vs2010: fix wrong generator command concatenation 2016-02-23 01:03:52 +01:00
Jussi Pakkanen 7435df8399 Moved backends to their own module. 2016-01-23 20:02:52 +02:00