Skip to content
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

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft

Conversation

rptb1
Copy link
Member

@rptb1 rptb1 commented Feb 10, 2023

See issue #146

@rptb1 rptb1 added the build Problems with builds and build automation label Feb 10, 2023
@rptb1
Copy link
Member Author

rptb1 commented Feb 16, 2023

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
Copy link
Contributor

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)
Copy link
Contributor

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.

@rptb1 rptb1 self-assigned this Feb 26, 2023
@rptb1 rptb1 added the optional Will cause failures / of benefit. Worth assigning resources. label Feb 26, 2023
@mgood7123
Copy link

OS and architecture specifics should be detectable at the compiler level, combined with try_compile to test for specifics while configuring cmake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Problems with builds and build automation optional Will cause failures / of benefit. Worth assigning resources.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants