Skip to content

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

Open
themikelester wants to merge 16 commits into
Celtoys:masterfrom
themikelester:master
Open

Allow compilation with modern CMake versions (>3.0)#8
themikelester wants to merge 16 commits into
Celtoys:masterfrom
themikelester:master

Conversation

@themikelester

Copy link
Copy Markdown

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

@dwilliamson dwilliamson left a comment

Copy link
Copy Markdown
Collaborator

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...

Comment thread src/CMakeLists.txt
add_subdirectory(clReflectMerge)
add_subdirectory(clReflectScan)
add_subdirectory(clReflectTest)
#add_subdirectory(clReflectTest)

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