-
Notifications
You must be signed in to change notification settings - Fork 77
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
Experimenting with CMake configuration #148
base: master
Are you sure you want to change the base?
Conversation
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 |
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.
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) |
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.
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 |
See issue #146