-
Notifications
You must be signed in to change notification settings - Fork 397
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
Initial commit of CMake build system #992
Conversation
67fa8cb
to
e9e2cc8
Compare
If you take a look at the CI, you'll see some changes to the way things are being built. The big one is an experimental build with CMake on x86-64, which is allowed to fail. We've also moved to the "Trusty" Ubuntu distribution. Since the OMRChecker isn't building on Trusty (yet), there is a new build on Precise for running the linter. As well, there is a new Appveyor configuration using CMake. |
Would you be able to send me a link to one of the logs that failed with the linter on Trusty so I can get a fix in? |
add_subdirectory(omrGtestGlue) | ||
add_subdirectory(algotest) | ||
# add_subdirectory(compilertest) | ||
add_subdirectory(gctest) |
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.
Would it be possible to also add jitbuildertest
to the list?
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.
Yep! We can't build the test yet, but we can leave a note.
omrversionstrings.CMakeTemplate.h
Outdated
@@ -0,0 +1,29 @@ | |||
/******************************************************************************* | |||
* | |||
* (c) Copyright IBM Corp. 2015 |
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 needs a copyright update. Is this a tool-generated file?
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 is a written file that is used to generate omrversionstrings.h
. Will update the copyright.
f3a0d8e
to
17e10f0
Compare
a222017
to
8797117
Compare
This is good to go. |
General question: Are the two build systems going to be running concurrently for a while? |
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.
I think this is a great starting point. Thanks! This will likely need an Eclipse CQ before it gets merged.
@fjeremic Yes the two build systems will run side by side for the time being. This pr adds an allowed failure cmake build to the travis config. |
Thanks for the extra @ mention, I had missed the original request to review. Will review by EOD. |
First observation: the commit message is pretty terse :) . |
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.
Two general comments (which you'll find embedded in the review comments as well):
-
Please make sure every file has a correct copyright header. Please make sure every new file is marked copyright 2017, and please update the "rightmost" copyright date in every existing file to 2017.
-
There are many blocks of commented out statements in this commit. Some have clear TODO comments, some have unclear TODO comments, and many have no comment to explain why the statements are commented out. You'll probably never understand these blocks of statements better than you do right now, so please write reminders to yourself/informative descriptions for future developers who happen across it. If the code is just vestigial stuff from trying to get this working, then please remove those statements completely to avoid confusion.
It seems like a lot of comments to work through, but those two categories probably capture at least 95% of the spots I marked.
.appveyor.yml
Outdated
@@ -0,0 +1,36 @@ | |||
############################################################################### | |||
# | |||
# (c) Copyright IBM Corp. 2016 |
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.
new file, we're 4 months into 2017 already :)
@@ -16,6 +16,15 @@ | |||
# Multiple authors (IBM Corp.) - initial implementation and documentation | |||
############################################################################### |
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.
general comment: modified files should have their "rightmost" copyright date updated to the current year
CMakeLists.txt
Outdated
@@ -0,0 +1,115 @@ | |||
############################################################################### | |||
# | |||
# (c) Copyright IBM Corp. 2016 |
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.
should be 2017
CMakeLists.txt
Outdated
|
||
cmake_minimum_required(VERSION 3.2 FATAL_ERROR) | ||
|
||
set(OMR_VERSION_MAJOR 0) |
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.
would it be better for this version identification piece to live in a separate file, isolated from the rest of the cmake machinery?
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.
It would appear this is how LLVM does it. I find they are usually a good standard for accepted practice.
https://github.com/llvm-mirror/llvm/blob/master/CMakeLists.txt
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.
Also, now that I think about it, this is really more of a place holder. Ideally we need figure out a system where we can store version information once and consume in both build systems
@@ -0,0 +1,102 @@ | |||
|
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.
is this a generated file? is that why there is no copyright header?
cmake/platform.cmake
Outdated
|
||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${linker_common} /INCREMENTAL:NO /NOLOGO /LARGEADDRESSAWARE wsetargv.obj") | ||
if(OMR_ENV_DATA64) | ||
#TODO: makefile has this but it seems to break shit |
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.
please remove the profanity
cmake/platform.cmake
Outdated
else() | ||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -entry:_DllMainCRTStartup@12") | ||
endif() | ||
#set(CMAKE_C_FLAGS "${common_flags}") |
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.
please document why commented out
cmake/platform.cmake
Outdated
|
||
# # This is the first option applied to the C++ linking command. | ||
# # It is not applied to the C linking command. | ||
# OMR_MK_CXXLINKFLAGS=-Wc,"langlvl(extended)" -+ |
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.
please document why commented out
fvtest/gctest/CMakeLists.txt
Outdated
omrutil | ||
omrglue | ||
) | ||
# ./omrgctest -configListFile=fvtest/gctest/configuration/fvConfigListFile.txt |
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.
please document why these lines are commented out
fvtest/omrGtestGlue/CMakeLists.txt
Outdated
|
||
target_link_libraries(omrGtestGlue INTERFACE omrGtest) | ||
|
||
#TODO there is platform specific stuff here |
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.
doesn't sound like an action to me, could you please make this comment more clear?
Lest it be lost in the massive dump of review comments, I think this PR represents some amazing work, and I'm really happy to see it. Thanks @dnakamura and @rwy0717 for putting it all together! |
Just curious, what motivated the switch to use Ubuntu Trusty? |
@mstoodle thanks for the feedback
|
@mstoodle I've addressed the comments you have made. I've left it as a separate commit in order to make it easier to track changes, but will squash it done before we merge in |
@marti4d : FYI, you may want to take a peek at this |
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.
much better, thanks @dnakamura ! only one remaining comment to fix, please.
thread/CMakeLists.txt
Outdated
@@ -42,6 +42,7 @@ list(APPEND OBJECTS | |||
rwmutex.c | |||
) | |||
|
|||
#TODO need to add te |
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.
te? either a typo or please explain a bit more
@mstoodle should be good to go |
I opened an Eclipse CQ for this pull request here. I'll update here with any CQ status updates. |
Adds experimental support for building with cmake. To test the cmake build system: ```sh mkdir -p build/ && cd build cmake .. cmake --build . ctest ``` The cmake build system is incomplete. Currently building: * gc * omr (core/misc) * fvtest * thread * port Not yet done: * jitbuilder * Compiler Issue: eclipse-omr#933 Also-by: Robert Young <[email protected]> Signed-off-by: Robert Young <[email protected]> Signed-off-by: Devin Nakamura <[email protected]>
I've rebased against latest, and added a new tracegen definition file, |
The Eclipse CQ has received "PMC approval", but we are still waiting for a preliminary legal review before we can check in this code. I'm guessing the review will be completed sometime tomorrow. You can read more about this process here. |
The CQ has not been approved for release yet. I will keep monitoring it |
CQ has been completely approved :). |
Discussed with @youngar that if it got approved while he was away I would handle merging. |
Adds experimental support for building with cmake
Issue: #933
Signed-off-by: Robert Young [email protected]
Signed-off-by: Devin Nakamura [email protected]