jeudi 24 mai 2018

Same path as both a system and normal include CMake

Problem: When using the following target_include_directories call on the same path, CMake is overwriting the normal,-I flag with the -isystem flag.

Call: add_library(lib SHARED libSource.cpp) target_include_directories(lib PUBLIC pathA) target_include_directories(lib SYSTEM PUBLIC pathA)

Question: How do I prevent CMake from overwriting the -I flag for pathA, so that it builds the object file with both flags and that in the make VERBOSE=1 output I am able to see both the -isystem pathA and -IpathA?

Aucun commentaire:

Enregistrer un commentaire