-
Notifications
You must be signed in to change notification settings - Fork 0
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
Arantir wip branch: ham-cmake, better gen compile_commands.json, Clang on Windows. #9
base: master
Are you sure you want to change the base?
Conversation
rules/base-WINDOWS-rules.ham
Outdated
@@ -0,0 +1,31 @@ | |||
# base.ham is setup for GCC by default |
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.
This should be in toolkit-cpp-clang_33.ham. See the pierre-linux-clang
branch (PR #10) where I've done the same thing for Linux.
rules/base-WINDOWS.ham
Outdated
@@ -0,0 +1,68 @@ | |||
# CLANG_EXE_BASE ?= "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/bin" ; |
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.
Something like CLANG_EXE_BASE should be done in a setup-toolset.sh
. See the pierre-linux-clang
(PR #10) branch for how I've done that for Linux. In theory there should be much custom code for Clang on Windows.
The main issue should be to update the msvc_19_x64 toolset to have the Microsoft Clang binaries.
rules/toolkit-base-windows.ham
Outdated
@@ -0,0 +1,30 @@ | |||
#---------------------------------------------------------------------- |
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.
See other comments, I'd start from pierre-linux-clang
(PR #10) it should be very similar to this.
rules/toolkit-cpp-windows.ham
Outdated
@@ -0,0 +1,122 @@ | |||
if $(BUILD) = da { |
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.
See other comments, I'd start from pierre-linux-clang
(PR #10) it should be very similar to this.
@@ -0,0 +1,56 @@ | |||
::Import("lang.ni") |
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.
This looks good, I'd like to take that in.
scripts/gen_compile_commands.ni
Outdated
} | ||
else | ||
{ | ||
local key = " SRC_ABSPATH=" |
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.
why the two spaces at the begining?
toolsets/cmake/ham-cmake
Outdated
@@ -0,0 +1,103 @@ | |||
#!/bin/bash |
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.
How do you build with ham-cmake?
Is it possible to tell it to output .lib / public headers, etc... in a specific folder?
Could it keep the build stuff in ~/_ham/something and copy the .libs, etc... in the standard niLang/libs/ folder ?
toolsets/cmake/ham-cmake
Outdated
fi | ||
|
||
if [ -z "$BUILD_GENERATOR" ]; then | ||
# BUILD_GENERATOR="Ninja" |
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.
We could add Ninja in a toolset and make the cmake toolset depend on it, my worry though is how do we make it find ham's MSVC/Clang/GCC. With make it should be fairly simple? Or is that what the $BUILD_ARCH.cmake
files above do?
@@ -0,0 +1,44 @@ | |||
set(CMAKE_SYSTEM_NAME Windows) |
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.
Mmmm, x86_x64-msys? is that for Clang?
toolsets/cmake/tools.cmake
Outdated
|
||
# Global flags | ||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") | ||
add_c_flag( |
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.
So this one is on me, but we should stop disabling warnings in the build scripts - including the .ham. We can actually put all of those in pragmas. Which is a lot less ugly... even though ideally our code should need those at all in an ideal world...
d2b389a
to
d97153c
Compare
8135e11
to
313cfa2
Compare
c2f6cc6
to
e2323ad
Compare
c7899ca
to
2072ff3
Compare
d97153c
to
218391c
Compare
218391c
to
020af2c
Compare
Formal Notes
This PR fixes:
Description, Motivation and Context
How Has This Been Tested?
Command line to run all the tests that I run locally:
Types of changes