-
Notifications
You must be signed in to change notification settings - Fork 65
build: Add ClangCL profiles #791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
60e1e5b
114c549
ff5513b
44acfcf
dbff78d
616f7d7
aad8bb1
7b8cb61
062b5ba
39bb3e1
cbb4db1
c1cc48b
16088b9
8f454a9
b4e722a
eda05ee
25e0120
b5d6795
d1bb5c6
a1b9b99
77ed416
a2a7e72
cde9e79
8246891
6e4392e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,11 +63,7 @@ if(WIN32) | |
endif() | ||
endif() | ||
|
||
if(NBL_DYNAMIC_MSVC_RUNTIME) | ||
list(APPEND NBL_DXC_CMAKE_OPTIONS "-DCMAKE_MSVC_RUNTIME_LIBRARY:STATIC=MultiThreaded$<$<CONFIG:Debug>:Debug>DLL") | ||
else() | ||
list(APPEND NBL_DXC_CMAKE_OPTIONS "-DCMAKE_MSVC_RUNTIME_LIBRARY:STATIC=MultiThreaded$<$<CONFIG:Debug>:Debug>") | ||
endif() | ||
list(APPEND NBL_DXC_CMAKE_OPTIONS "-DCMAKE_MSVC_RUNTIME_LIBRARY:STATIC=MultiThreaded$<$<CONFIG:Debug>:Debug>$<$<BOOL:${NBL_COMPILER_DYNAMIC_RUNTIME}>:DLL>") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as with the general nabla comment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
# perform DXC compile standard requirement test | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
+2 −2 | include/dxc/Support/dxcapi.use.h | |
+3 −3 | include/llvm/CodeGen/SchedulerRegistry.h | |
+2 −1 | lib/IR/Core.cpp | |
+3 −2 | lib/MSSupport/MSFileSystemImpl.cpp | |
+11 −15 | lib/Support/Windows/RWMutex.inc |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,13 @@ | |
# This file is part of the "Nabla Engine". | ||
# For conditions of distribution and use, see copyright notice in nabla.h.in or nabla.h | ||
|
||
cmake_minimum_required(VERSION 3.29) | ||
cmake_policy(SET CMP0112 NEW) | ||
cmake_minimum_required(VERSION 3.31) | ||
# TODO: Yas - once we deploy 4.x we will fire `cmake_policy` instead of manually picking policies | ||
# https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html#policy-version | ||
# also we should update deps which throw warnings about < 3.10 compatibility | ||
cmake_policy(SET CMP0003 NEW) # https://cmake.org/cmake/help/latest/policy/CMP0077.html#cmp0077 | ||
cmake_policy(SET CMP0077 NEW) # https://cmake.org/cmake/help/latest/policy/CMP0077.html#cmp0077 | ||
cmake_policy(SET CMP0112 NEW) # https://cmake.org/cmake/help/latest/policy/CMP0112.html#cmp0112 | ||
cmake_policy(SET CMP0141 NEW) # https://cmake.org/cmake/help/latest/policy/CMP0141.html#policy:CMP0141 | ||
cmake_policy(SET CMP0118 NEW) # https://cmake.org/cmake/help/latest/policy/CMP0118.html#policy:CMP0118 | ||
|
||
|
@@ -21,28 +26,16 @@ if(MSVC) | |
endif() | ||
|
||
option(NBL_STATIC_BUILD "" OFF) # ON for static builds, OFF for shared | ||
option(NBL_DYNAMIC_MSVC_RUNTIME "" ON) | ||
option(NBL_COMPILER_DYNAMIC_RUNTIME "" ON) | ||
option(NBL_SANITIZE_ADDRESS OFF) | ||
|
||
if(MSVC) | ||
if(NBL_SANITIZE_ADDRESS) | ||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>") | ||
else() | ||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug>:EditAndContinue>$<$<CONFIG:RelWithDebInfo>:ProgramDatabase>") | ||
endif() | ||
endif() | ||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT $<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>) # ignored on non xMSVC-ABI targets | ||
|
||
if(NBL_STATIC_BUILD) | ||
message(STATUS "Static Nabla build enabled!") | ||
else() | ||
if(MSVC) | ||
if(NBL_DYNAMIC_MSVC_RUNTIME) | ||
message(STATUS "Shared Nabla build enabled!") | ||
else() | ||
message(FATAL_ERROR "Turn NBL_DYNAMIC_MSVC_RUNTIME on! For dynamic Nabla builds dynamic MSVC runtime is mandatory!") | ||
endif() | ||
else() | ||
message(FATAL_ERROR "Nabla can't be built with shared libraries! Please make sure you are targetting Windows OS and MSVC compiler!") | ||
if(NOT NBL_COMPILER_DYNAMIC_RUNTIME) | ||
message(FATAL_ERROR "Turn NBL_COMPILER_DYNAMIC_RUNTIME on! For dynamic Nabla builds dynamic runtime is mandatory!") | ||
endif() | ||
Comment on lines
+37
to
39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aah ok so we want to ban compiling with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes we agreed it must match |
||
endif() | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK in Clang and GCC there are options about static linking of libstd-c++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes there are and this property has effect only if MSVC ABI is the target