Draft
Conversation
Member
Author
|
TargetArch.cmake resembles mpstd.h. Perhaps we could use the latter to achieve the same result, so that we don't duplicate code. |
| # CMake output | ||
| CMakeFiles | ||
| CMakeCache.txt | ||
| cmake_install.cmake |
Contributor
There was a problem hiding this comment.
CMakeFiles, CMakeCache.txt and cmake_install.cmake and friends shouldn't be present here since they should only be in build directories. I tend to always build in a separate build directory and it doesn't even have to be under the root mps directory.
| target_compile_options(gcbench PRIVATE ${CFLAGSCOMPILERSTRICT}) | ||
| # FIXME: Should be C89 but CMake doesn't know it. | ||
| # FIXME: How to set this for all targets not just gcbench? | ||
| # target_compile_features(gcbench PRIVATE c_std_90) |
Contributor
There was a problem hiding this comment.
Towards the top of the file, you can do:
SET(CMAKE_C_STANDARD 90)
That will set it for all subsequent targets.
|
OS and architecture specifics should be detectable at the compiler level, combined with try_compile to test for specifics while configuring cmake |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See issue #146