as suggested by config/Example-aocc-linux-x86.cfg (v1.1) or config/Example-clang-llvm-linux-x86.cfg (v1.0)
Otherwise, it may fail to compile.
Details
- Reviewers
Meinersbur kristof.beyls MatzeB
Diff Detail
- Repository
- rOLDT svn-test-suite
- Build Status
Buildable 43274 Build 44049: arc lint + arc unit
Event Timeline
[serious] Overriding CMAKE_CXX_FLAGS applies the change globally to everything in the test-suite. The file itself shows how it is done correctly right before the line you added.
Thanks for the feedback. Obviously, my CMake skills needs to catch up. My
intention was to add the macro definition only for CXX compilation, but
add_definitions, add_compile_options change both C and CXX flags AFAIK at
the time. After some digging, it seems add_compile_options and
add_compile_definitions support cmake-generator-expressions that could be
used to implement this perfectly. However, add_compile_definitions was not
available until CMake v3.12, so I use add_compile_options here.
N.B. The cmake generator expression used here is not supported for Visual
Studio generator which does not need the macro definition. Do we actually care about build this on windows at all?
Does defining __BOOL_DEFINED for C as well have any effect? If not, I'd define it for both languages for simplicity.
N.B. The cmake generator expression used here is not supported for Visual
Studio generator which does not need the macro definition. Do we actually care about build this on windows at all?
Many programs in the test-suite are POSIX-specific, e.g. they include unistd.h, sched.h, etc. I some point I gave up maintaining compatibility headers for windows and just compile the test-suite under WSL.
External/SPEC/CFP2017rate/526.blender_r/CMakeLists.txt | ||
---|---|---|
17 | Did you consider using add_compile_options just for the generator-expression and keep the other as-is? We can do a clean-up once we raise the cmake requirement such that we can use add_compile_definitions. |
Defining __BOOL_DEFINED for C would cause build error.
N.B. The cmake generator expression used here is not supported for Visual
Studio generator which does not need the macro definition. Do we actually care about build this on windows at all?Many programs in the test-suite are POSIX-specific, e.g. they include unistd.h, sched.h, etc. I some point I gave up maintaining compatibility headers for windows and just compile the test-suite under WSL.
Thanks. Good to know.
Did you consider using add_compile_options just for the generator-expression and keep the other as-is? We can do a clean-up once we raise the cmake requirement such that we can use add_compile_definitions.