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

Allow compilation with modern CMake versions (>3.0) #8

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

themikelester
Copy link

The current CMakeLists.txt files will not compile on CMake 2.8 or CMake 3.0+. This PR fixes the following issues:

  • The clReflectScan project attempts to add the ClangFrontend.cpp file, which was removed in d11b789
  • The project(...) call in the root CMakeLists.txt now specifies a version (currently 0.5.12)
  • Getting the LOCATION property of a target is deprecated. clReflectTest uses the $<TARGET_FILE:clReflectTest> syntax instead.

* The `project(...)` call now specifies a version
* clReflectTest uses the $<TARGET_FILE> syntax rather than the LOCATION property

Both of these are errors for cmake 3.0 or greater
Fixes:
- error: unknown type name 'constexpr'
- warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
…sembly instructions

This was breaking arm64 compilation on Apple's M1/2 architectures
…es so that generators are evaluated correctly
The "-i" command line arguments must be preceded by a "--" in order to pass them to clang, and they're now "-I" arguments
Copy link
Collaborator

@dwilliamson dwilliamson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR, just one comment...

@@ -3,5 +3,5 @@ add_subdirectory(clReflectCpp)
add_subdirectory(clReflectExport)
add_subdirectory(clReflectMerge)
add_subdirectory(clReflectScan)
add_subdirectory(clReflectTest)
#add_subdirectory(clReflectTest)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this absolutely necessary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants