How can I specify different compile options for each source file in a project
-
How can I set up the projects file to have different compile options for each C/C++ source code module.
N.B.: The actual usage is radically different than this grossly simplified example. It is NOT possible to use a different name.
DEFINES += USE_MAX=3
DEFINES += USE_MAX=5SOURCES +=
main.c \
Mod1.c \ (Would like to have DEFINES += USE_MAX=3)
Mod2.c (Would like to have DEFINES += USE_MAX=5)Thanks
-
How can I set up the projects file to have different compile options for each C/C++ source code module.
N.B.: The actual usage is radically different than this grossly simplified example. It is NOT possible to use a different name.
DEFINES += USE_MAX=3
DEFINES += USE_MAX=5SOURCES +=
main.c \
Mod1.c \ (Would like to have DEFINES += USE_MAX=3)
Mod2.c (Would like to have DEFINES += USE_MAX=5)Thanks
-
-
Use cmake with set_properties() and COMPILE_DEFINITIONS.