Merge pull request #15858 from willnationsdev/vs-hpp-support

Allow VS to include .hpp files in scons builds
This commit is contained in:
Rémi Verschelde 2018-01-19 08:28:38 +01:00 committed by GitHub
commit 0a469fc8ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -290,6 +290,8 @@ if selected_platform in platform_list:
basename = basename.replace('\\\\', '/')
if os.path.isfile(basename + ".h"):
env.vs_incs = env.vs_incs + [basename + ".h"]
elif os.path.isfile(basename + ".hpp"):
env.vs_incs = env.vs_incs + [basename + ".hpp"]
if os.path.isfile(basename + ".c"):
env.vs_srcs = env.vs_srcs + [basename + ".c"]
elif os.path.isfile(basename + ".cpp"):

View File

@ -1598,7 +1598,7 @@ def detect_visual_c_compiler_version(tools_env):
# and not scons setup environment (env)... so make sure you call the right environment on it or it will fail to detect
# the proper vc version that will be called
# These is no flag to give to visual c compilers to set the architecture, ie scons bits argument (32,64,ARM etc)
# There is no flag to give to visual c compilers to set the architecture, ie scons bits argument (32,64,ARM etc)
# There are many different cl.exe files that are run, and each one compiles & links to a different architecture
# As far as I know, the only way to figure out what compiler will be run when Scons calls cl.exe via Program()
# is to check the PATH variable and figure out which one will be called first. Code bellow does that and returns: