filipdutescu / modern-cpp-template

A template for modern C++ projects using CMake, Clang-Format, CI, unit testing and more, with support for downstream inclusion.
The Unlicense
1.69k stars 214 forks source link

[BUG] Project_BUILD_HEADERS_ONLY=ON results in an error #11

Closed hanzmaharajh closed 4 years ago

hanzmaharajh commented 4 years ago

Describe the bug Building with Project_BUILD_HEADERS_ONLY=ON results in an error.

CMake Error at cmake/CompilerWarnings.cmake:93 (target_compile_options): target_compile_options may only set INTERFACE properties on INTERFACE targets

To Reproduce cmake -DProject_BUILD_HEADERS_ONLY=ON

Expected behavior This should succeed.