[buildcore] Add support for MSVC
This commit is contained in:
parent
6e51c221af
commit
399f117eab
4
deps/buildcore/base.cmake
vendored
4
deps/buildcore/base.cmake
vendored
@ -31,7 +31,9 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(MSVC)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:preprocessor")
|
||||||
|
else()
|
||||||
# forces colored output when using ninja
|
# forces colored output when using ninja
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color")
|
||||||
# enable warnings
|
# enable warnings
|
||||||
|
5
deps/buildcore/base.mk
vendored
5
deps/buildcore/base.mk
vendored
@ -135,6 +135,11 @@ conan-config:
|
|||||||
${ENV_RUN} conan profile new ${PROJECT_NAME} --detect --force
|
${ENV_RUN} conan profile new ${PROJECT_NAME} --detect --force
|
||||||
ifeq ($(OS),linux)
|
ifeq ($(OS),linux)
|
||||||
${ENV_RUN} conan profile update settings.compiler.libcxx=libstdc++11 ${PROJECT_NAME}
|
${ENV_RUN} conan profile update settings.compiler.libcxx=libstdc++11 ${PROJECT_NAME}
|
||||||
|
else
|
||||||
|
${ENV_RUN} conan profile update settings.compiler.cppstd=20 ${PROJECT_NAME}
|
||||||
|
ifeq ($(OS),windows)
|
||||||
|
${ENV_RUN} conan profile update settings.compiler.runtime=static ${PROJECT_NAME}
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
.PHONY: conan
|
.PHONY: conan
|
||||||
conan:
|
conan:
|
||||||
|
5
deps/buildcore/scripts/setup-build.py
vendored
5
deps/buildcore/scripts/setup-build.py
vendored
@ -62,6 +62,10 @@ def main():
|
|||||||
print('Error: Invalid build tool')
|
print('Error: Invalid build tool')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
win_target = ''
|
||||||
|
if platform.system() != 'Windows':
|
||||||
|
win_target = '-A x64'
|
||||||
|
|
||||||
project_dir = os.getcwd()
|
project_dir = os.getcwd()
|
||||||
build_dir = '{:s}/build/{:s}'.format(project_dir, build_config)
|
build_dir = '{:s}/build/{:s}'.format(project_dir, build_config)
|
||||||
rm(build_dir)
|
rm(build_dir)
|
||||||
@ -73,6 +77,7 @@ def main():
|
|||||||
'-DUSE_ASAN={:s}'.format(sanitizer_status),
|
'-DUSE_ASAN={:s}'.format(sanitizer_status),
|
||||||
'-DBUILDCORE_BUILD_CONFIG={:s}'.format(build_config),
|
'-DBUILDCORE_BUILD_CONFIG={:s}'.format(build_config),
|
||||||
'-DBUILDCORE_TARGET={:s}'.format(args.target),
|
'-DBUILDCORE_TARGET={:s}'.format(args.target),
|
||||||
|
win_target,
|
||||||
]
|
]
|
||||||
if qt_path != '':
|
if qt_path != '':
|
||||||
cmake_cmd.append(qt_path)
|
cmake_cmd.append(qt_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user