Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for alex
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #280598 |
Post edited: |
— | over 3 years ago |
Comment | Post #278299 |
_Never_, _**ever**_ use `include_directories`. It's effectively deprecated and bad practice. My team automatically rejects any PR that uses it. Use `target_include_directories` instead. (more) |
— | almost 4 years ago |
Comment | Post #278296 |
Never put absolute paths in your lists file. There are _so_ many alternatives: import OtherProject with `find_package`, add its CMake build to yours with add_subdirectory, include it as a git submodule and use relative paths, etc. (more) |
— | almost 4 years ago |
Edit | Post #280598 | Initial revision | — | almost 4 years ago |
Answer | — |
A: How to do "out-of-source" build properly with cmake? Use the following layout: ```cmake project/ CMakeLists.txt project1.cpp project2.cpp libA CMakeLists.txt libA1.cpp libA2.cpp libB CMakeLists.txt libB1.cpp libB2.cpp ``` In `project/CMakeLists.txt`, you would have: ... (more) |
— | almost 4 years ago |